Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Unable to use extensions #3

Open
abreumatheus opened this issue Apr 24, 2022 · 7 comments
Open

[Bug] Unable to use extensions #3

abreumatheus opened this issue Apr 24, 2022 · 7 comments

Comments

@abreumatheus
Copy link

Hi. First, thank you for your great work on this package.

I'm trying to use codemirror extensions but almos all of them results in the same error in the console:

Error: Unrecognized extension value in extension set ([object Object]). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.

I tried uninstalling the @codemirror/state or updating to its last version but none of that worked.

To reproduce just try to add the @codemirror/history extension to the bare bones example.

@logue
Copy link
Owner

logue commented Apr 26, 2022

Did you call @codemirror/basic-setup for the extension? In that case, it is not necessary because it is included.

Also, @codemirror/history seems to have been migrated to @codemirror/commands because the repository is locked. Please change to this and try.

@abreumatheus
Copy link
Author

It's true, but even using just basic-setup, that has both history and its keymap, I can't undo anything :(
OBS: I'm using the full example and version 0.3.5

@logue
Copy link
Owner

logue commented May 17, 2022

The search popup that appears with CTRL + F is working, so it's not immediately clear why only history doesn't work.

It may be interfering with some processing on the vue side, and it seems that it will take time to isolate the problem.

@logue
Copy link
Owner

logue commented May 19, 2022

It was solved in 0.3.6 and 0.1.6.
From this version, load basic-setup with basic prop.

<code-mirror v-model="text" basic />

@logue
Copy link
Owner

logue commented Jun 10, 2022

In 0.6.0 or later, @codemirror/basic-setup is no longer needed.
If it is included in the package of the project you are using, it may not work properly. Please remove the package.

@liu-xinhui
Copy link

liu-xinhui commented Jun 25, 2024

image image

I have same problem with "vue-codemirror6": "^1.3.2"

@liu-xinhui
Copy link

image image
I have same problem with "vue-codemirror6": "^1.3.2"

I saved.
delete node_modules,pnpm-lock.yaml and reinstall ,its work

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

No branches or pull requests

3 participants