File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
src/components/editor/extensions Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 1- import { Node as ProseMirrorNode , mergeAttributes } from '@tiptap/core' ;
1+ import { Node as ProseMirrorNode , mergeAttributes , Node as TiptapNode } from '@tiptap/core' ;
22import { ReactNodeViewRenderer } from '@tiptap/react' ;
33import { NodeViewWrapper } from '@tiptap/react' ;
44import type { Editor } from '@tiptap/react' ;
@@ -56,7 +56,7 @@ const TableOfContentsComponent = ({
5656 ( index : number ) => {
5757 let currentIndex = 0 ;
5858
59- editor . state . doc . descendants ( ( node : ProseMirrorNode , pos : number ) => {
59+ editor . state . doc . descendants ( ( node , pos ) => {
6060 if ( node . type . name === 'heading' ) {
6161 if ( currentIndex === index ) {
6262 editor . commands . focus ( ) ;
@@ -157,7 +157,7 @@ const TableOfContentsComponent = ({
157157 ) ;
158158} ;
159159
160- export const TableOfContents = Node . create ( {
160+ export const TableOfContents = TiptapNode . create ( {
161161 name : 'tableOfContents' ,
162162
163163 group : 'block' ,
You can’t perform that action at this time.
0 commit comments