CM6 dynamically switching syntax theme w/ reconfigure

@marijn It seems like this API changed at some point but I’m having trouble finding it in the docs.

Is there an official method for reconfiguring the editor without destroying / rebuilding it?

EDIT: Seem to have found it:

editor.current.dispatch({
    effects: StateEffect.reconfigure.of(extensions)
});
4 Likes