X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/c7c0df096487a10f879d2a427373c5198bf2435c..refs/pull/5280/head:/resources/js/components/wysiwyg-editor.js diff --git a/resources/js/components/wysiwyg-editor.js b/resources/js/components/wysiwyg-editor.js index ebc142e2a..56dbe8d7c 100644 --- a/resources/js/components/wysiwyg-editor.js +++ b/resources/js/components/wysiwyg-editor.js @@ -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, }); });