fix brush editor not saving your brush
This commit is contained in:
parent
b8d6b3edb3
commit
09a81ec032
|
@ -19,6 +19,8 @@ export class BrushEditor extends HTMLElement {
|
|||
this.codeEditor = this.appendChild(new CodeEditor());
|
||||
this.codeEditor.setCode(localStorage.getItem("rkgk.brushEditor.code") ?? defaultBrush);
|
||||
this.codeEditor.addEventListener(".codeChanged", (event) => {
|
||||
localStorage.setItem("rkgk.brushEditor.code", event.newCode);
|
||||
|
||||
this.dispatchEvent(
|
||||
Object.assign(new Event(".codeChanged"), {
|
||||
newCode: event.newCode,
|
||||
|
|
Loading…
Reference in a new issue