You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Extension values can be [provided](https://codemirror.net/6/docs/ref/#state.EditorStateConfig.extensions) when creating a state to attach various kinds of configuration and behavior information.
95
+
* They can either be built-in extension-providing objects,
96
+
* such as [state fields](https://codemirror.net/6/docs/ref/#state.StateField) or [facet providers](https://codemirror.net/6/docs/ref/#state.Facet.of),
97
+
* or objects with an extension in its `extension` property. Extensions can be nested in arrays arbitrarily deep—they will be flattened when processed.
98
+
*/
99
+
extensions?: Extension[]
100
+
/**
101
+
* If the view is going to be mounted in a shadow root or document other than the one held by the global variable document (the default), you should pass it here.
102
+
* Originally from the [config of EditorView](https://codemirror.net/6/docs/ref/#view.EditorView.constructor%5Econfig.root)
103
+
*/
104
+
root?: ShadowRoot | Document
105
+
/**
106
+
* Create a state from its JSON representation serialized with [toJSON](https://codemirror.net/docs/ref/#state.EditorState.toJSON) function
For more information on how this is implemented see the [source](https://github.com/ThimoDEV/nuxt-codemirror/blob/master/src/runtime/components/NuxtCodeMirror.vue), to get inspiration for your own version
170
+
171
+
172
+
25
173
## Credits
26
174
27
175
This Nuxt module wouldn't be possible without:
@@ -41,6 +189,10 @@ That's it! You can now use Nuxt-codemirror in your Nuxt app ✨
41
189
42
190
## Contribution
43
191
192
+
If you have ideas or bugs feel free to start by opening an issue. For ideas please start a Discussion.
193
+
194
+
I welcome any kind of contribution Thank you in advance!!
195
+
44
196
<details>
45
197
<summary>Local development</summary>
46
198
@@ -88,6 +240,8 @@ That's it! You can now use Nuxt-codemirror in your Nuxt app ✨
88
240
89
241
## FAQ
90
242
91
-
- I get an extension duplicate error: Fix Unrecognized extension value in extension set ([object Object]). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.
243
+
Issue
244
+
- I get errors when starting the dev server with your module: `Pre-transform error: Failed to resolve import "@codemirror/view"`, `Pre-transform error: Failed to resolve import "@codemirror/state"`.
92
245
93
-
For now write shamefully-hoist=true in your .npmrc file to solve this. We are working on a better solution
246
+
Solution
247
+
- Assuming you use pnpm with `shamefully-hoist=false` install `@codemirror/state` and `@codemirror/view` and these errors should disappear
0 commit comments