mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-07-28 17:02:04 +03:00
Lexical: Added some styling and tweaks for basic editors
This commit is contained in:
@ -200,7 +200,7 @@ export class PageComments extends Component {
|
||||
this.formInput.parentElement?.appendChild(container);
|
||||
this.formInput.hidden = true;
|
||||
|
||||
this.wysiwygEditor = wysiwygModule.createBasicEditorInstance(container as HTMLElement, '', {
|
||||
this.wysiwygEditor = wysiwygModule.createBasicEditorInstance(container as HTMLElement, '<p></p>', {
|
||||
darkMode: document.documentElement.classList.contains('dark-mode'),
|
||||
textDirection: this.wysiwygTextDirection,
|
||||
translations: (window as unknown as Record<string, Object>).editor_translations,
|
||||
|
@ -13,7 +13,7 @@ export class WysiwygInput extends Component {
|
||||
|
||||
type WysiwygModule = typeof import('../wysiwyg');
|
||||
const wysiwygModule = (await window.importVersioned('wysiwyg')) as WysiwygModule;
|
||||
const container = el('div', {class: 'comment-editor-container'});
|
||||
const container = el('div', {class: 'basic-editor-container'});
|
||||
this.elem.parentElement?.appendChild(container);
|
||||
this.elem.hidden = true;
|
||||
|
||||
|
@ -144,8 +144,8 @@ export class SimpleWysiwygEditorInterface {
|
||||
}
|
||||
|
||||
remove() {
|
||||
this.context.editorDOM.remove();
|
||||
this.context.manager.teardown();
|
||||
this.context.containerDOM.remove();
|
||||
if (this.editorListenerTeardown) {
|
||||
this.editorListenerTeardown();
|
||||
}
|
||||
|
Reference in New Issue
Block a user