Skip to content

Conversation

e111077
Copy link

@e111077 e111077 commented Mar 18, 2025

I ran into this being a problem while upgrading Codemirror 5 to 6 in playground-elements

See:

https://github.com/codemirror/lang-javascript/blob/main/src/javascript.ts#L73

@justinfagnani

@e111077
Copy link
Author

e111077 commented Mar 18, 2025

You also need to catch errors or else you can't delete a backtick e.g. you can type html but not html` because of a range error. You also can't backspace either of them.

Here is my implementation that worked for me on playground-elements

https://github.com/google/playground-elements/pull/421/files#diff-1c131b887acb41c86e577619a44b473c78fb71b6e90e92a26c28ed9ac619f729

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant