set styling for jodit editor and settings

This commit is contained in:
Florian Zumpe
2026-05-20 14:03:19 +02:00
parent 0b89998c23
commit d4671086a4
4 changed files with 256 additions and 39 deletions
+5
View File
@@ -121,6 +121,11 @@ export function userNotesApplySettingsToOpenWindow() {
export function userNotesApplyWindowSettings(win) {
const appearance = userNotesLoadValidatedAppearance();
win.style.setProperty(
"--user-notes-window-background-solid",
appearance.windowBackgroundColor
);
win.style.setProperty(
"--user-notes-window-background",
userNotesHexToRgba(
+39 -1
View File
@@ -171,6 +171,12 @@ export function userNotesResetPositionAndSize() {
);
userNotesSavePosition(win);
const editor = win.__userNotesEditor;
if (editor?.events) {
editor.events.fire("resize");
}
}
}
@@ -234,6 +240,12 @@ export function userNotesMakeDraggable(win) {
drag = null;
userNotesSavePosition(win);
const editor = win.__userNotesEditor;
if (editor?.events) {
editor.events.fire("resize");
}
});
handle.addEventListener("pointercancel", event => {
@@ -243,6 +255,12 @@ export function userNotesMakeDraggable(win) {
drag = null;
userNotesSavePosition(win);
const editor = win.__userNotesEditor;
if (editor?.events) {
editor.events.fire("resize");
}
});
}
@@ -397,6 +415,10 @@ export function userNotesOpenNotes() {
if (editor) {
editor.focus();
if (editor.events) {
editor.events.fire("resize");
}
} else {
win.querySelector(".user-notes-editor")?.focus();
}
@@ -451,6 +473,12 @@ export function userNotesOpenNotes() {
userNotesSaveNotes(userNotesGetEditorValue(win));
userNotesSetStatus("Gespeichert");
userNotesSavePosition(win);
const editor = win.__userNotesEditor;
if (editor?.events) {
editor.events.fire("resize");
}
});
win.querySelector(".user-notes-close")?.addEventListener("click", () => {
@@ -475,6 +503,12 @@ export function userNotesOpenNotes() {
}
userNotesSavePosition(win);
const editor = win.__userNotesEditor;
if (editor?.events) {
editor.events.fire("resize");
}
});
resizeObserver.observe(win);
@@ -484,6 +518,10 @@ export function userNotesOpenNotes() {
if (win.__userNotesEditor) {
win.__userNotesEditor.focus();
if (win.__userNotesEditor.events) {
win.__userNotesEditor.events.fire("resize");
}
} else {
editorElement.focus();
}
@@ -502,4 +540,4 @@ export function userNotesRefreshOpenWindow() {
oldWin.remove();
userNotesOpenNotes();
}
}