1
0
mirror of https://gitee.com/koogua/course-tencent-cloud.git synced 2025-07-15 21:02:20 +08:00

调整编辑器htmlTags属性

This commit is contained in:
xiaochong0302 2024-05-05 21:52:13 +08:00
parent 4e80f3938a
commit bd14979e9b
2 changed files with 26 additions and 2 deletions

View File

@ -17,7 +17,20 @@ layui.use(['jquery'], function () {
'image', 'link', 'unlink', '|', 'image', 'link', 'unlink', '|',
'source', 'about' 'source', 'about'
], ],
pasteType: 1, htmlTags: {
span: ['.color', '.background-color'],
a: ['id', 'class', 'href', 'target', 'name'],
img: ['id', 'class', 'src', 'width', 'height', 'alt', 'title'],
table: ['id', 'class'],
div: ['id', 'class'],
pre: ['id', 'class'],
hr: ['id', 'class'],
embed: ['id', 'class', 'src', 'width', 'height', 'type', 'loop', 'autostart', 'quality', 'align', 'wmode'],
iframe: ['id', 'class', 'src', 'width', 'height'],
'td,th': ['id', 'class'],
'p,ol,ul,li,blockquote,h1,h2,h3,h4,h5,h6': ['id', 'class'],
'br,tbody,tr,strong,b,sub,sup,em,i,u,strike,s,del': ['id', 'class'],
},
extraFileUploadParams: { extraFileUploadParams: {
csrf_token: $('meta[name="csrf-token"]').attr('content') csrf_token: $('meta[name="csrf-token"]').attr('content')
} }

View File

@ -17,7 +17,18 @@ layui.use(['jquery'], function () {
'image', 'link', 'unlink', '|', 'image', 'link', 'unlink', '|',
'source', 'about' 'source', 'about'
], ],
pasteType: 1, htmlTags: {
span: ['.color', '.background-color'],
a: ['id', 'class', 'href', 'target', 'name'],
img: ['id', 'class', 'src', 'width', 'height', 'alt', 'title'],
table: ['id', 'class'],
div: ['id', 'class'],
pre: ['id', 'class'],
hr: ['id', 'class'],
'td,th': ['id', 'class'],
'p,ol,ul,li,blockquote,h1,h2,h3,h4,h5,h6': ['id', 'class'],
'br,tbody,tr,strong,b,sub,sup,em,i,u,strike,s,del': ['id', 'class'],
},
extraFileUploadParams: { extraFileUploadParams: {
csrf_token: $('meta[name="csrf-token"]').attr('content') csrf_token: $('meta[name="csrf-token"]').attr('content')
} }