Skip to content

Commit 408a222

Browse files
mattygSomaticIT
authored andcommitted
feat: expose editorview on reconfigure via emit
1 parent 5adac2a commit 408a222

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/lib/CodeMirror.svelte

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
export let nodebounce = false;
3636
3737
const is_browser = typeof window !== "undefined";
38-
const dispatch = createEventDispatcher<{ change: string, ready: EditorView }>();
38+
const dispatch = createEventDispatcher<{ change: string, ready: EditorView, reconfigure: EditorView }>();
3939
4040
let element: HTMLDivElement;
4141
let view: EditorView;
@@ -85,6 +85,8 @@
8585
view.dispatch({
8686
effects: StateEffect.reconfigure.of(state_extensions),
8787
});
88+
89+
dispatch('reconfigure', view);
8890
}
8991
9092
function update(value: string | null | undefined): void {

0 commit comments

Comments
 (0)