mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-21 09:35:49 +02:00
Improved styling of the label dialog editor, so that the appearance is closer to the Label result
This commit is contained in:
parent
9c87202509
commit
ab8be58c0d
6 changed files with 33 additions and 4 deletions
|
@ -6,6 +6,7 @@ import { default as HTMLLabelEditor } from "../../ckeditor/html_label";
|
|||
|
||||
import EditorWatchdog from '@ckeditor/ckeditor5-watchdog/src/editorwatchdog';
|
||||
|
||||
import "../../css/ckeditor.css";
|
||||
|
||||
/* stimulusFetch: 'lazy' */
|
||||
export default class extends Controller {
|
||||
|
@ -43,6 +44,13 @@ export default class extends Controller {
|
|||
editor.enableReadOnlyMode("readonly");
|
||||
}
|
||||
|
||||
//Apply additional styles
|
||||
const editor_div = editor.ui.view.element;
|
||||
const new_classes = this.element.dataset.ckClass;
|
||||
if (editor_div && new_classes) {
|
||||
editor_div.classList.add(...new_classes.split(","));
|
||||
}
|
||||
|
||||
console.log(editor);
|
||||
})
|
||||
.catch(error => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue