We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5adac2a commit 408a222Copy full SHA for 408a222
src/lib/CodeMirror.svelte
@@ -35,7 +35,7 @@
35
export let nodebounce = false;
36
37
const is_browser = typeof window !== "undefined";
38
- const dispatch = createEventDispatcher<{ change: string, ready: EditorView }>();
+ const dispatch = createEventDispatcher<{ change: string, ready: EditorView, reconfigure: EditorView }>();
39
40
let element: HTMLDivElement;
41
let view: EditorView;
@@ -85,6 +85,8 @@
85
view.dispatch({
86
effects: StateEffect.reconfigure.of(state_extensions),
87
});
88
+
89
+ dispatch('reconfigure', view);
90
}
91
92
function update(value: string | null | undefined): void {
0 commit comments