建站常识

kindeditor编辑器过滤dl、dd、dt的两种方法

发布时间 | 2017/3/20  点击 | 

方法一:filterMode

true或false,true时过滤HTML代码,false时允许输入任何代码。

默认值:true

方法二:

把htmlTags整个变量替换成下面的就可以

htmlTags:{

font:['color','size','face','.background-color'],

span:['class','.color','.background-color','.font-size','.font-family','.font-weight','.font-style','.text-decoration','.vertical-align'],

div:['class','align','.border','.margin','.padding','.text-align','.color','.background-color','.font-size','.font-family','.font-weight','.font-style','.text-decoration','.vertical-align'],

table:['class','border','cellspacing','cellpadding','width','height','align','.padding','.margin','.border','bgcolor','.text-align','.color','.background-color','.font-size','.font-family','.font-weight','.font-style','.text-decoration'],'td,th':['class','align','valign','width','height','colspan','rowspan','bgcolor','.text-align','.color','.background-color','.font-size','.font-family','.font-weight','.font-style','.text-decoration','.vertical-align'],

a:['class','href','target','name'],

embed:['src','type','loop','autostart','quality','.width','.height','/'],

img:['src','width','height','border','alt','title','.width','.height','/'],

hr:['class','/'],

br:['/'],'p,ol,ul,li, dl,dt,dd, blockquote,h1,h2,h3,h4,h5,h6':['class','align','.text-align','.color','.background-color','.font-size','.font-family','.font-weight','.font-style','.text-decoration','.vertical-align'],'tbody,tr,strong,b,sub,sup,em,i,u,strike':[]}

相关信息