File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed
packages/core/src/schema/inlineContent Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -123,7 +123,7 @@ export function createInlineContentSpec<
123123
124124 addNodeView ( ) {
125125 return ( { node, getPos } ) => {
126- const editor = this . options . editor ;
126+ const editor = this . options . editor as BlockNoteEditor < any , any , S > ;
127127
128128 const output = inlineContentImplementation . render (
129129 nodeToCustomInlineContent (
@@ -138,12 +138,8 @@ export function createInlineContentSpec<
138138
139139 const content = inlineContentToNodes ( [ update ] , editor . pmSchema ) ;
140140
141- editor . dispatch (
142- editor . prosemirrorView . state . tr . replaceWith (
143- getPos ( ) ,
144- getPos ( ) + node . nodeSize ,
145- content ,
146- ) ,
141+ editor . transact ( ( tr ) =>
142+ tr . replaceWith ( getPos ( ) , getPos ( ) + node . nodeSize , content ) ,
147143 ) ;
148144 } ,
149145 editor ,
You can’t perform that action at this time.
0 commit comments