KindEditor的htmlTags属性可以过滤不需要的html

KindEditor的htmlTags属性可以过滤不需要的html

  KE.show({
        id : 'description1',
        items : [
            'fullscreen', 'undo', 'redo', 'print', 'cut', 'copy', 'paste',
            'plainpaste', 'wordpaste', '|', 'justifyleft', 'justifycenter', 'justifyright',
            'justifyfull', 'insertorderedlist', 'insertunorderedlist', 'indent', 'outdent', 'subscript',
            'superscript', '|', 'selectall', '-',
            'fontname', 'fontsize', '|', 'textcolor', 'bgcolor', 'bold',
            'italic', 'underline', 'strikethrough', 'removeformat', 'link', 'unlink','|','about'
        ],
        filterMode :true,
       htmlTags:{    //以下为不需要过滤过的字符
            font : ['color', 'size', 'face', '.background-color'],
            span : ['style'],  
           
            hr : ['class', '/'],
            br : ['/'],
            'p,ol,ul,li,blockquote,h1,h2,h3,h4,h5,h6' : ['align', 'style'],
            'strong,b,sub,sup,em,i,u,strike' : []
        }
    });

转自百度http://hi.baidu.com/jwx_1170/item/d34247e3238bd6226dabb8bb

原文地址:https://www.cnblogs.com/liziqiang/p/3491839.html