]> BookStack Code Mirror - bookstack/blobdiff - resources/js/wysiwyg/index.ts
respective book and chapter structure added.
[bookstack] / resources / js / wysiwyg / index.ts
index c5dd151af6789789b39625361cadb2c303b527ad..c4403773bf2a93f6dfb3551da78bc10493643766 100644 (file)
@@ -42,8 +42,13 @@ export function createPageEditorInstance(container: HTMLElement, htmlContent: st
     const editWrap = el('div', {
         class: 'editor-content-wrap',
     }, [editArea]);
+
     container.append(editWrap);
     container.classList.add('editor-container');
+    container.setAttribute('dir', options.textDirection);
+    if (options.darkMode) {
+        container.classList.add('editor-dark');
+    }
 
     const editor = createEditor(config);
     editor.setRootElement(editArea);