ueditor 常用配置
Posted haosit
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ueditor 常用配置相关的知识,希望对你有一定的参考价值。
autoHeightEnabled:是否自动长高,默认true
catchRemoteImageEnable:设置远程图片是否抓取到本地保存。(复制粘贴其他网站图片,是否本地存一份)
enableAutoSave:启用自动保存
saveInterval:自动保存间隔时间
imagePopup:图片操作的浮层开关
maximumWords:允许的最大字符数
whitList:xss过滤白名单,去掉部分标签默认的href,title,src属性.添加Iframe,和section
whitList: { a: [‘target‘, ‘class‘, ‘style‘], abbr: [‘class‘, ‘style‘], address: [‘class‘, ‘style‘], area: [‘shape‘, ‘coords‘, ‘href‘, ‘alt‘], article: [], aside: [], audio: [‘autoplay‘, ‘controls‘, ‘loop‘, ‘preload‘, ‘src‘, ‘class‘, ‘style‘], b: [‘class‘, ‘style‘], bdi: [‘dir‘], bdo: [‘dir‘], big: [], blockquote: [‘cite‘, ‘class‘, ‘style‘], br: [], caption: [‘class‘, ‘style‘], center: [], cite: [], code: [‘class‘, ‘style‘], col: [‘align‘, ‘valign‘, ‘span‘, ‘width‘, ‘class‘, ‘style‘], colgroup: [‘align‘, ‘valign‘, ‘span‘, ‘width‘, ‘class‘, ‘style‘], dd: [‘class‘, ‘style‘], del: [‘datetime‘], details: [‘open‘], div: [‘class‘, ‘style‘], dl: [‘class‘, ‘style‘], dt: [‘class‘, ‘style‘], em: [‘class‘, ‘style‘], font: [‘color‘, ‘size‘, ‘face‘], footer: [], h1: [‘class‘, ‘style‘], h2: [‘class‘, ‘style‘], h3: [‘class‘, ‘style‘], h4: [‘class‘, ‘style‘], h5: [‘class‘, ‘style‘], h6: [‘class‘, ‘style‘], header: [‘class‘, ‘style‘], hr: [‘class‘, ‘style‘], i: [‘class‘, ‘style‘], img: [‘src‘, ‘alt‘,‘width‘, ‘height‘, ‘id‘, ‘_src‘, ‘loadingclass‘, ‘class‘, ‘data-latex‘], ins: [‘datetime‘], li: [‘class‘, ‘style‘], mark: [], nav: [], ol: [‘class‘, ‘style‘], p: [‘class‘, ‘style‘], pre: [‘class‘, ‘style‘], s: [], section:[], small: [], span: [‘class‘, ‘style‘], sub: [‘class‘, ‘style‘], sup: [‘class‘, ‘style‘], strong: [‘class‘, ‘style‘], table: [‘width‘, ‘border‘, ‘align‘, ‘valign‘, ‘class‘, ‘style‘], tbody: [‘align‘, ‘valign‘, ‘class‘, ‘style‘], td: [‘width‘, ‘rowspan‘, ‘colspan‘, ‘align‘, ‘valign‘, ‘class‘, ‘style‘], tfoot: [‘align‘, ‘valign‘, ‘class‘, ‘style‘], th: [‘width‘, ‘rowspan‘, ‘colspan‘, ‘align‘, ‘valign‘, ‘class‘, ‘style‘], thead: [‘align‘, ‘valign‘, ‘class‘, ‘style‘], tr: [‘rowspan‘, ‘align‘, ‘valign‘, ‘class‘, ‘style‘], tt: [], u: [], ul: [‘class‘, ‘style‘], video: [‘autoplay‘, ‘controls‘, ‘loop‘, ‘preload‘, ‘src‘, ‘height‘, ‘width‘, ‘class‘, ‘style‘], iframe: [‘frameborder‘, ‘border‘, ‘marginwidth‘, ‘marginheight‘, ‘width‘, ‘height‘, ‘src‘, ‘id‘], section: [‘class‘,‘style‘] }
以上是关于ueditor 常用配置的主要内容,如果未能解决你的问题,请参考以下文章