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<
123
123
124
124
addNodeView ( ) {
125
125
return ( { node, getPos } ) => {
126
- const editor = this . options . editor ;
126
+ const editor = this . options . editor as BlockNoteEditor < any , any , S > ;
127
127
128
128
const output = inlineContentImplementation . render (
129
129
nodeToCustomInlineContent (
@@ -138,12 +138,8 @@ export function createInlineContentSpec<
138
138
139
139
const content = inlineContentToNodes ( [ update ] , editor . pmSchema ) ;
140
140
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 ) ,
147
143
) ;
148
144
} ,
149
145
editor ,
You can’t perform that action at this time.
0 commit comments