Kindeditor在线文本编辑器过滤HTML
2024-09-06 00:14:11
KindEditor.ready(
function
(K) {
editor = K.create(
'textarea[name="content"]'
, {
filterMode:
true
,
//是否开启过滤模式
htmlTags : {
font : [
'id'
,
'class'
,
'color'
,
'size'
,
'face'
,
'.background-color'
],
div : [
'id'
,
'class'
,
'align'
,
'.border'
,
'.margin'
,
'.padding'
,
'.text-align'
,
'.color'
,
'.background-color'
,
'.font-size'
,
'.font-family'
,
'.font-weight'
,
'.background'
,
'.font-style'
,
'.text-decoration'
,
'.vertical-align'
,
'.margin-left'
],
a : [
'id'
,
'class'
,
'href'
,
'target'
,
'name'
],
embed : [
'id'
,
'class'
,
'src'
,
'width'
,
'height'
,
'type'
,
'loop'
,
'autostart'
,
'quality'
,
'.width'
,
'.height'
,
'align'
,
'allowscriptaccess'
],
img : [
'id'
,
'class'
,
'src'
,
'width'
,
'height'
,
'border'
,
'alt'
,
'title'
,
'align'
,
'.width'
,
'.height'
,
'.border'
],
'p,ol,ul,li,blockquote,h1,h2,h3,h4,h5,h6'
: [
'id'
,
'class'
,
'align'
,
'.text-align'
,
'.color'
,
'.background-color'
,
'.font-size'
,
'.font-family'
,
'.background'
,
'.font-weight'
,
'.font-style'
,
'.text-decoration'
,
'.vertical-align'
,
'.text-indent'
,
'.margin-left'
],
pre : [
'id'
,
'class'
],
hr : [
'id'
,
'class'
,
'.page-break-after'
],
'br,tbody,tr,strong,b,sub,sup,em,i,u,strike,s,del'
: [
'id'
,
'class'
],
iframe : [
'id'
,
'class'
,
'src'
,
'frameborder'
,
'width'
,
'height'
,
'.width'
,
'.height'
]
}
});
});
最新文章
- ASE周会记录
- 支持10种格式的 HTML 表格导出 jQuery 插件
- css选择器中:first-child与:first-of-type的区别
- 不安装oracle客户端也可以使用pl/sql developer
- windows下安装python的C扩展编译环境(解决“Unable to find vcvarsall.bat”)
- HDU2084 数塔 (DP入门题)
- Node.js模块os
- 修改html很实用的insertAdjacentHTML方法
- 在MacOS下Python安装lxml报错xmlversion.h not found 报错的解决方案
- GDI+ 读取jpg图片每个像素的值
- 使用.Net Core+IView+Vue集成上传图片功能
- 【Python3练习题 014】 一个数如果恰好等于它的因子之和,这个数就称为“完数”。例如6=1+2+3。编程找出1000以内的所有完数。
- Android 常见异常及解决办法
- 使用 JS 实现文字左右跑马灯
- <;转>;ajax 同步异步问题
- POJ-3693/HDU-2459 Maximum repetition substring 最多重复次数的子串(需要输出具体子串,按字典序)
- SpringSecurity入门例子及遇到的问题解决
- git 放弃本地修改操作
- partition的分配策略简单代码实现
- 002-spring cache 基于声明式注解的缓存-01-Cacheable annotation