mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-21 09:35:49 +02:00
Use watchdog to load CKEDITOR5.
This commit is contained in:
parent
b18284cfd7
commit
6ba2fe5847
1 changed files with 4 additions and 15 deletions
|
@ -30,20 +30,10 @@ export default class extends Controller {
|
|||
|
||||
const language = document.body.dataset.locale ?? "en";
|
||||
|
||||
EDITOR_TYPE.create(this.element, {
|
||||
const config = {
|
||||
language: language,
|
||||
})
|
||||
.then(editor => {
|
||||
if(this.element.disabled) {
|
||||
editor.enableReadOnlyMode("readonly");
|
||||
}
|
||||
|
||||
console.log(editor);
|
||||
})
|
||||
.catch(error => {
|
||||
console.error(error);
|
||||
});
|
||||
/*
|
||||
const watchdog = new EditorWatchdog();
|
||||
watchdog.setCreator((elementOrData, editorConfig) => {
|
||||
return EDITOR_TYPE.create(elementOrData, editorConfig)
|
||||
|
@ -59,9 +49,8 @@ export default class extends Controller {
|
|||
});
|
||||
});
|
||||
|
||||
watchdog.create(this.element, {
|
||||
}).catch(error => {
|
||||
watchdog.create(this.element, config).catch(error => {
|
||||
console.error(error);
|
||||
}); */
|
||||
});
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue