mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-06-20 04:13:08 +08:00
Lexical: Finished up core drawing insert/editing
Added new options that sits on the context, for things needed but not for the core editor, which are defined out of the editor (drawio URL, error message text, pageId etc...)
This commit is contained in:
@ -12,7 +12,14 @@ export class WysiwygEditor extends Component {
|
||||
|
||||
window.importVersioned('wysiwyg').then(wysiwyg => {
|
||||
const editorContent = this.input.value;
|
||||
this.editor = wysiwyg.createPageEditorInstance(this.editContainer, editorContent);
|
||||
this.editor = wysiwyg.createPageEditorInstance(this.editContainer, editorContent, {
|
||||
drawioUrl: this.getDrawIoUrl(),
|
||||
pageId: Number(this.$opts.pageId),
|
||||
translations: {
|
||||
imageUploadErrorText: this.$opts.imageUploadErrorText,
|
||||
serverUploadLimitText: this.$opts.serverUploadLimitText,
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
let handlingFormSubmit = false;
|
||||
@ -35,7 +42,6 @@ export class WysiwygEditor extends Component {
|
||||
}
|
||||
|
||||
getDrawIoUrl() {
|
||||
// TODO
|
||||
const drawioUrlElem = document.querySelector('[drawio-url]');
|
||||
if (drawioUrlElem) {
|
||||
return drawioUrlElem.getAttribute('drawio-url');
|
||||
|
Reference in New Issue
Block a user