diff options
| author | Shulhan <ms@kilabit.info> | 2023-11-11 13:10:52 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2023-11-11 13:10:52 +0700 |
| commit | df04aa96367b18638ab3dbf4e45eae37a21b399c (patch) | |
| tree | dc860e1f5df18720e57f099f9ed7dcd2e83dd73a | |
| parent | f205d88121d1ec31a9db64a8268d5b8913380111 (diff) | |
| download | pakakeh.ts-df04aa96367b18638ab3dbf4e45eae37a21b399c.tar.xz | |
editor: re-render content after save
This is to make the content that we save and the content on editor
is always same.
| -rw-r--r-- | editor/editor.ts | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/editor/editor.ts b/editor/editor.ts index 6bdbfca..e949951 100644 --- a/editor/editor.ts +++ b/editor/editor.ts @@ -171,7 +171,9 @@ export class WuiEditor { ev.preventDefault(); ev.stopPropagation(); if (ed.opts.onSave) { - ed.opts.onSave(ed.getContent()); + const content = ed.getContent(); + ed.opts.onSave(content); + ed.render(content); } } break; |
