Fix createEditor function definition using destructuration

This commit is contained in:
relhamdi
2026-05-21 13:53:09 +02:00
parent 63af11db01
commit 63ed8e85e2
+4 -1
View File
@@ -172,7 +172,10 @@ export const adjustWeight = (text, delta) => {
return text.replace(trimmed, `(${trimmed}:${weight.toFixed(1)})`);
};
export const createEditor = (textarea, activeColor = "#e0e0e0", onInput) => {
export const createEditor = (
textarea,
{ activeColor = "#e0e0e0", onInput } = {},
) => {
// Hide native textarea
textarea.style.display = "none";