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
Im trying to use prosemirror adapter in vue. im using this code from the vue documentation to create a editor with a paragraph. The only thing i changed in my code is that i added code for the state and schema. When i run the code i always get this error:
TypeError: initialVNode is null
componentUpdateFn runtime-core.esm-bundler.js:5158
run reactivity.esm-bundler.js:181
update runtime-core.esm-bundler.js:5270
setupRenderEffect runtime-core.esm-bundler.js:5280
mountComponent runtime-core.esm-bundler.js:5048
processComponent runtime-core.esm-bundler.js:5002
patch runtime-core.esm-bundler.js:4471
componentUpdateFn runtime-core.esm-bundler.js:5146
run reactivity.esm-bundler.js:181
update runtime-core.esm-bundler.js:5270
setupRenderEffect runtime-core.esm-bundler.js:5280
mountComponent runtime-core.esm-bundler.js:5048
processComponent runtime-core.esm-bundler.js:5002
patch runtime-core.esm-bundler.js:4471
componentUpdateFn runtime-core.esm-bundler.js:5146
run reactivity.esm-bundler.js:181
update runtime-core.esm-bundler.js:5270
setupRenderEffect runtime-core.esm-bundler.js:5280
mountComponent runtime-core.esm-bundler.js:5048
processComponent runtime-core.esm-bundler.js:5002
patch runtime-core.esm-bundler.js:4471
componentUpdateFn runtime-core.esm-bundler.js:5146
run reactivity.esm-bundler.js:181
update runtime-core.esm-bundler.js:5270
setupRenderEffect runtime-core.esm-bundler.js:5280
mountComponent runtime-core.esm-bundler.js:5048
processComponent runtime-core.esm-bundler.js:5002
patch runtime-core.esm-bundler.js:4471
componentUpdateFn runtime-core.esm-bundler.js:5146
run reactivity.esm-bundler.js:181
update runtime-core.esm-bundler.js:5270
setupRenderEffect runtime-core.esm-bundler.js:5280
mountComponent runtime-core.esm-bundler.js:5048
processComponent runtime-core.esm-bundler.js:5002
patch runtime-core.esm-bundler.js:4471
render2 runtime-core.esm-bundler.js:5796
mount runtime-core.esm-bundler.js:3063
mount runtime-dom.esm-bundler.js:1527
renderToCanvas chunk-ERN3BQXJ.mjs:5
renderToCanvas runtime.js:8247
mount chunk-ERN3BQXJ.mjs:5
mount runtime.js:8260
runPhase runtime.js:8185
mount runtime.js:8259
render runtime.js:8285
renderToElement runtime.js:8207
renderSelection runtime.js:9097
selectSpecifiedStory runtime.js:8976
initializeWithStoryIndex runtime.js:8950
initializeWithProjectAnnotations runtime.js:8433
initialize runtime.js:8406
gi runtime.js:8934
ts runtime.js:9365
<anonymous> vite-app.js:22
<scriptsetuplang="ts">importtype{VNodeRef}from'vue'import{useNodeViewFactory}from'@prosemirror-adapter/vue'importParagraphfrom'./Blocks/Paragraph.vue'import{EditorState}from'prosemirror-state'import{EditorView}from'prosemirror-view';import{Schema}from'prosemirror-model'constnodeViewFactory=useNodeViewFactory()constschema=newSchema({nodes: {doc: {content: "block+"},paragraph: {group: "block",},text: {group: "inline"}},marks: {}})letstate=EditorState.create({schema: schema,})consteditorRef: VNodeRef=(element)=>{constel=elementasHTMLElementif(!el||el.firstChild)returnconsteditorView=newEditorView(el,{state: state,nodeViews: {paragraph: nodeViewFactory({component: Paragraph,as: 'div',// Ensure this matches the expected tag of the componentcontentAs: 'p',// Ensure this matches the expected tag in the Paragraph component}),}})}</script><template><div:ref="editorRef" class="editor" /></template>
Im trying to use prosemirror adapter in vue. im using this code from the vue documentation to create a editor with a paragraph. The only thing i changed in my code is that i added code for the state and schema. When i run the code i always get this error:
This is my code:
BlockEditorProvider.vue
BlockEditor.vue
Paragraph.vue
What am i doing wrong here ?
The text was updated successfully, but these errors were encountered: