Skip to content

error in addCommands() inside Extension.create() #4222

Discussion options

You must be logged in to vote

try this code at the top of your extension

import { RawCommands } from "@tiptap/react";

declare module '@tiptap/core' {
  interface Commands<ReturnType> {
    codeIndent: {
      indentCode: () => boolean,
      outdentCode: () => boolean
    }
  }
}

export const CodeIndent = Extension.create({

https://tiptap.dev/docs/guides/typescript#command-type

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by nperez0111
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants