File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -1062,6 +1062,17 @@ export class BlockNoteEditor<
10621062 * @warning Not needed to call manually when using React, use BlockNoteView to take care of mounting
10631063 */
10641064 public mount = ( element : HTMLElement ) => {
1065+ const extensions = this . _extensionManager . getExtensions ( ) . values ( ) ;
1066+ // TODO can do something similar for input rules
1067+ // extensions.filter(e => e.instance.inputRules)
1068+
1069+ const state = this . _tiptapEditor . state . reconfigure ( {
1070+ plugins : this . _tiptapEditor . state . plugins . concat (
1071+ extensions . flatMap ( ( e ) => e . instance . plugins ?? [ ] ) . toArray ( ) ,
1072+ ) ,
1073+ } ) ;
1074+ this . _tiptapEditor . view . updateState ( state ) ;
1075+
10651076 // TODO: Fix typing for this in a TipTap PR
10661077 this . _tiptapEditor . mount ( { mount : element } as any ) ;
10671078 } ;
Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ export class ExtensionManager {
5050 * Get all extensions
5151 */
5252 public getExtensions ( ) {
53- return this . editor . extensions ;
53+ return this . extensions ;
5454 }
5555
5656 /**
You can’t perform that action at this time.
0 commit comments