Align the generated HTML of quotes with the editor’s expectations
authorAlexander Ebert <ebert@woltlab.com>
Fri, 14 Apr 2023 13:39:59 +0000 (15:39 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Fri, 14 Apr 2023 13:39:59 +0000 (15:39 +0200)
Fixes WoltLab/editor#32

ts/WoltLabSuite/Core/Component/Ckeditor/Quote.ts
wcfsetup/install/files/js/WoltLabSuite/Core/Component/Ckeditor/Quote.js

index dc93720095507fe51fdcbfa96a9b79f25f714de2..1b3fbe8ba9bc4f731da0f896b01610950f619314 100644 (file)
@@ -23,7 +23,7 @@ function insertQuote(editor: CKEditor, payload: InsertQuoteEventPayload) {
   link = escapeHTML(link);
 
   editor.insertHtml(
-    `<woltlab-ckeditor-blockquote author="${author}" link="${link}">${content}</woltlab-ckeditor-blockquote>`,
+    `<woltlab-quote data-author="${author}" data-link="${link}">${content}</woltlab-quote>`,
   );
 }
 
index 9543b16451c9b38ad4907655021c15e865979637..f078ca53a4db747fec219c67174ebbcf6d3e6b39 100644 (file)
@@ -17,7 +17,7 @@ define(["require", "exports", "../../StringUtil", "./Event"], function (require,
         }
         author = (0, StringUtil_1.escapeHTML)(author);
         link = (0, StringUtil_1.escapeHTML)(link);
-        editor.insertHtml(`<woltlab-ckeditor-blockquote author="${author}" link="${link}">${content}</woltlab-ckeditor-blockquote>`);
+        editor.insertHtml(`<woltlab-quote data-author="${author}" data-link="${link}">${content}</woltlab-quote>`);
     }
     function setup(element) {
         (0, Event_1.listenToCkeditor)(element).ready(({ ckeditor }) => {