From 45789e8ad2d5ddc87cfdd334ecc601aa50e7ac19 Mon Sep 17 00:00:00 2001 From: Lars Gebhardt-Kusche Date: Sun, 1 Feb 2026 00:29:35 +0100 Subject: [PATCH] asdsad --- config/current.ver | 2 +- public/assets/js/bridge/rte-editor.js | 63 +++++++++++++-------------- 2 files changed, 31 insertions(+), 34 deletions(-) diff --git a/config/current.ver b/config/current.ver index 3b495c7..cd03ed9 100644 --- a/config/current.ver +++ b/config/current.ver @@ -1 +1 @@ -1.1.78 \ No newline at end of file +1.1.79 \ 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 b5d0a7e..fedb024 100644 --- a/public/assets/js/bridge/rte-editor.js +++ b/public/assets/js/bridge/rte-editor.js @@ -484,7 +484,6 @@ } if (component && component.view && component.view.el) { const viewEl = component.view.el; - const hasInline = / { try { const docRef = sourceEl.ownerDocument || document; @@ -532,38 +531,36 @@ return ''; } }; - if (!hasInline) { - const inlined = inlineComputedStyles(viewEl); - if (inlined) { - htmlSource = inlined; - } else { - try { - const cs = (viewEl.ownerDocument || document).defaultView.getComputedStyle(viewEl); - const styles = []; - const pushStyle = (prop, val) => { - if (val) styles.push(`${prop}:${val}`); - }; - pushStyle('font-family', cs.fontFamily); - pushStyle('font-size', cs.fontSize); - pushStyle('font-weight', cs.fontWeight); - pushStyle('font-style', cs.fontStyle); - if (cs.textDecorationLine && cs.textDecorationLine !== 'none') { - pushStyle('text-decoration', cs.textDecorationLine); - } - if (cs.textAlign && cs.textAlign !== 'start') { - pushStyle('text-align', cs.textAlign); - } - if (cs.lineHeight && cs.lineHeight !== 'normal') { - pushStyle('line-height', cs.lineHeight); - } - if (cs.color) { - pushStyle('color', cs.color); - } - if (styles.length) { - htmlSource = `${htmlSource}`; - } - } catch {} - } + const inlined = inlineComputedStyles(viewEl); + if (inlined) { + htmlSource = inlined; + } else { + try { + const cs = (viewEl.ownerDocument || document).defaultView.getComputedStyle(viewEl); + const styles = []; + const pushStyle = (prop, val) => { + if (val) styles.push(`${prop}:${val}`); + }; + pushStyle('font-family', cs.fontFamily); + pushStyle('font-size', cs.fontSize); + pushStyle('font-weight', cs.fontWeight); + pushStyle('font-style', cs.fontStyle); + if (cs.textDecorationLine && cs.textDecorationLine !== 'none') { + pushStyle('text-decoration', cs.textDecorationLine); + } + if (cs.textAlign && cs.textAlign !== 'start') { + pushStyle('text-align', cs.textAlign); + } + if (cs.lineHeight && cs.lineHeight !== 'normal') { + pushStyle('line-height', cs.lineHeight); + } + if (cs.color) { + pushStyle('color', cs.color); + } + if (styles.length) { + htmlSource = `${htmlSource}`; + } + } catch {} } } const initialHtml = this.sanitizeInlineHtml(htmlSource, modelContent || '');