diff --git a/config/current.ver b/config/current.ver index 38e6647..cb174d5 100644 --- a/config/current.ver +++ b/config/current.ver @@ -1 +1 @@ -1.1.80 \ No newline at end of file +1.2.1 \ No newline at end of file diff --git a/public/assets/js/bridge/rte-editor.js b/public/assets/js/bridge/rte-editor.js index 47617a0..1bd4d61 100644 --- a/public/assets/js/bridge/rte-editor.js +++ b/public/assets/js/bridge/rte-editor.js @@ -503,7 +503,9 @@ const walk = (orig, copy) => { if (!orig || !copy) return; if (orig.nodeType === 1 && copy.nodeType === 1) { - if (styleTags.has(orig.tagName) && orig.getAttribute('data-gjs-type') !== 'default') { + const gjsType = orig.getAttribute('data-gjs-type'); + const isTextNode = gjsType === 'text'; + if ((styleTags.has(orig.tagName) || isTextNode) && gjsType !== 'default' && orig.tagName !== 'BR') { const cs = winRef.getComputedStyle(orig); let style = copy.getAttribute('style') || ''; const hasStyle = (name) => new RegExp(`${name}\\s*:`, 'i').test(style);