diff --git a/public/static/admin/js/content.editor.js b/public/static/admin/js/content.editor.js index 60b32074..c14cbb7a 100644 --- a/public/static/admin/js/content.editor.js +++ b/public/static/admin/js/content.editor.js @@ -17,7 +17,20 @@ layui.use(['jquery'], function () { 'image', 'link', 'unlink', '|', '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: { csrf_token: $('meta[name="csrf-token"]').attr('content') } diff --git a/public/static/home/js/content.editor.js b/public/static/home/js/content.editor.js index 269d8aab..01c091f3 100644 --- a/public/static/home/js/content.editor.js +++ b/public/static/home/js/content.editor.js @@ -17,7 +17,18 @@ layui.use(['jquery'], function () { 'image', 'link', 'unlink', '|', '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: { csrf_token: $('meta[name="csrf-token"]').attr('content') }