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

how to json for extensions? #199

Open
4 tasks done
xuxweei opened this issue May 25, 2023 · 0 comments
Open
4 tasks done

how to json for extensions? #199

xuxweei opened this issue May 25, 2023 · 0 comments

Comments

@xuxweei
Copy link

xuxweei commented May 25, 2023

Describe the bug

i use @codemirror/lang-json and i refer to the document to use javascript to write but it gives me the prompt “Unrecognized extension value in extension set ([object Object])“. can tell me how to use it?
this is my code:

<Codemirror
        v-model="codemirrorContent"
        style="
          height: 450px;
          overflow: hidden;
          text-align: left;
          border: 1px solid #ccc;
	"
	:extensions="extensions" 
>
</Codemirror>
<script setup lang="ts">
import { json } from "@codemirror/lang-json";
import { oneDark } from "@codemirror/theme-one-dark";
const extensions = [json(),oneDark]
</script>

Reproduction

image

System Info

![image](https://github.com/surmon-china/vue-codemirror/assets/62375498/4dba25af-c29b-4b3b-896a-31366303bf35)

Used Package Manager

npm

Validations

  • Read the the documentation in detail.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
  • The provided reproduction is a minimal reproducible example of the bug.
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

1 participant