From 730d32ab299d85775b5786b4a851dbf12daf28fe Mon Sep 17 00:00:00 2001 From: Kendrick Bollens Date: Thu, 23 Jul 2026 11:37:29 +0200 Subject: [PATCH] =?UTF-8?q?Web-Editor:=20Farben/Inline-Styles=20beim=20Ein?= =?UTF-8?q?f=C3=BCgen=20aus=20E-Mails=20behalten?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit TinyMCE registriert unter Chromium (Chrome/Edge) und Safari einen PastePreProcess-Filter, der bei der Default-Einstellung paste_webkit_styles:'none' ALLE inline-Styles (inkl. color) aus extern eingefügtem Inhalt entfernt. Interner Copy/Paste ist ausgenommen — daher ging webapp->webapp, aber E-Mail->Editor verlor die Farbe. paste_webkit_styles:'all' schaltet den Stripper ab und behält die Styles. Co-Authored-By: Claude Opus 4.8 Claude-Session: https://claude.ai/code/session_011GkKJBbiNV421xfCbXikGV --- web-editor/public/app.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/web-editor/public/app.js b/web-editor/public/app.js index 0c303c3..aac304e 100644 --- a/web-editor/public/app.js +++ b/web-editor/public/app.js @@ -364,7 +364,9 @@ valid_elements: '*[*]', extended_valid_elements: '*[*]', valid_children: '+body[style]', verify_html: false, convert_urls: false, content_style: 'body{font-family:Arial,Helvetica,sans-serif;font-size:14px;color:#1f2a30;line-height:1.6;padding:10px 12px;} img{max-width:100%;height:auto;} table{border-collapse:collapse;}', - paste_data_images: true, automatic_uploads: false, file_picker_types: 'image', + // Chrome/Edge/Safari entfernen sonst beim Einfügen aus externen Quellen (E-Mails) + // ALLE inline-Styles inkl. Farben ('paste_webkit_styles' default 'none'). 'all' behält sie. + paste_data_images: true, paste_webkit_styles: 'all', automatic_uploads: false, file_picker_types: 'image', file_picker_callback: function (cb) { const input = document.createElement('input'); input.type = 'file'; input.accept = 'image/*'; input.onchange = function () { const file = input.files[0]; if (!file) return; const r = new FileReader(); r.onload = function () { cb(r.result, { title: file.name }); }; r.readAsDataURL(file); };