diff --git a/config/current.ver b/config/current.ver index a236ff4..2b5429a 100644 --- a/config/current.ver +++ b/config/current.ver @@ -1 +1 @@ -1.1.73 \ No newline at end of file +1.1.74 \ 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 ed58ee0..e71b2e1 100644 --- a/public/assets/js/bridge/rte-editor.js +++ b/public/assets/js/bridge/rte-editor.js @@ -424,7 +424,20 @@ const modelContent = (component.get && component.get('content')) || ''; const viewHtml = (component.view && component.view.el && component.view.el.innerHTML) || ''; - let htmlSource = viewHtml || modelContent || ''; + const pickHtmlSource = (view, model) => { + const v = String(view || ''); + const m = String(model || ''); + if (!v && m) return m; + if (!m) return v; + const vHasSpan = / v.length + 20) return m; + return v; + }; + let htmlSource = pickHtmlSource(viewHtml, modelContent) || ''; if (!htmlSource && component && typeof component.toHTML === 'function') { try { const fullHtml = String(component.toHTML() || '');