1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-31 15:24:31 +03:00

Lexical: Fixed a range of issues in RTL mode

This commit is contained in:
Dan Brown
2024-09-15 16:10:46 +01:00
parent 6872eb802c
commit 5f46d71af0
5 changed files with 17 additions and 5 deletions

View File

@ -15,6 +15,8 @@ export class WysiwygEditor extends Component {
this.editor = wysiwyg.createPageEditorInstance(this.editContainer, editorContent, {
drawioUrl: this.getDrawIoUrl(),
pageId: Number(this.$opts.pageId),
darkMode: document.documentElement.classList.contains('dark-mode'),
textDirection: this.$opts.textDirection,
translations: {
imageUploadErrorText: this.$opts.imageUploadErrorText,
serverUploadLimitText: this.$opts.serverUploadLimitText,

View 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);

View File

@ -2,12 +2,12 @@
## In progress
//
- RTL/LTR support
## Main Todo
- Mac: Shortcut support via command.
- RTL/LTR support
- Translations
## Secondary Todo