]> BookStack Code Mirror - bookstack/blobdiff - resources/js/components/wysiwyg-editor.js
respective book and chapter structure added.
[bookstack] / resources / js / components / wysiwyg-editor.js
index ebc142e2abc414184f58fff607eb0554d176bf10..56dbe8d7c5f199d06a50facf5394d8e9a1034bc7 100644 (file)
@@ -10,15 +10,20 @@ export class WysiwygEditor extends Component {
         /** @var {SimpleWysiwygEditorInterface|null} */
         this.editor = null;
 
+        const translations = {
+            ...window.editor_translations,
+            imageUploadErrorText: this.$opts.imageUploadErrorText,
+            serverUploadLimitText: this.$opts.serverUploadLimitText,
+        };
+
         window.importVersioned('wysiwyg').then(wysiwyg => {
             const editorContent = this.input.value;
             this.editor = wysiwyg.createPageEditorInstance(this.editContainer, editorContent, {
                 drawioUrl: this.getDrawIoUrl(),
                 pageId: Number(this.$opts.pageId),
-                translations: {
-                    imageUploadErrorText: this.$opts.imageUploadErrorText,
-                    serverUploadLimitText: this.$opts.serverUploadLimitText,
-                },
+                darkMode: document.documentElement.classList.contains('dark-mode'),
+                textDirection: this.$opts.textDirection,
+                translations,
             });
         });