diff --git a/src/lib/core.js b/src/lib/core.js index 48aa27bd..3544999b 100755 --- a/src/lib/core.js +++ b/src/lib/core.js @@ -6431,6 +6431,10 @@ export default function (context, pluginCallButtons, plugins, lang, options, _re }, _applyTagEffects: function () { + if (util.hasClass(context.element.wysiwyg, 'se-read-only')) { + return false; + } + let selectionNode = core.getSelectionNode(); if (selectionNode === core.effectNode) return; core.effectNode = selectionNode; @@ -6612,6 +6616,11 @@ export default function (context, pluginCallButtons, plugins, lang, options, _re }, onClick_wysiwyg: function (e) { + // if (util.hasClass(context.element.wysiwyg, 'se-read-only')) { + // e.preventDefault(); + // return false; + // } + const targetElement = e.target; if (core.isReadOnly) { diff --git a/test/dev/suneditor_build_test.js b/test/dev/suneditor_build_test.js index 9a27799e..def9c1d2 100644 --- a/test/dev/suneditor_build_test.js +++ b/test/dev/suneditor_build_test.js @@ -1038,13 +1038,9 @@ let s2 = window.s2 = suneditor.create(document.getElementById('editor2'), { // addTagsWhitelist: "fld|sort|sortType|lst|lstfld|header|section", lineAttrReset: 'class', imageAccept: '*/*', - value: `
-
- -
-
- -

aaa

`, + value: `

Ôtez la complexité,
+M.Biz vous apporte des solutions utiles
+

`, // attributesWhitelist: { // all: 'style|class', // },