Hello,
I am trying to give users an option to switch between plaintext and a language as many times as they want. In order to do this, I am using an empty compartment that will be reconfigured with a language when they select it from a dropdown. However, when I dispatch the reconfigured compartment, I get the following error:
Cannot read property 'parser' of null
This error makes sense, but I’m not sure if there is a better way to switch back and forth between plaintext and a language. I’ve also tried adding on the compartment afterwards using StateEffect.appendConfig
but that throws the same error.
Here is a minimal reproduction. If you click the “JavaScript” radio button you will see the error.
Should I make an empty language extension for plaintext? I’m trying to avoid recreating the state.
Thanks for your help!