Skip to content

adding table extension #27

Answered by formfcw
kamil-malinski asked this question in Q&A
Discussion options

You must be logged in to vote

Thank you for your interest!

Tiptap extensions can’t be added directly to the tools array. You will need to create a new file like table.ts inside the /src/interface/tools/ directory. Have a look at the blockquote tool for example. The type Tool describes a wrapper for Tiptap extensions.

An example for table extensions could be:

// https://tiptap.dev/api/nodes/table

import { Table } from "@tiptap/extension-table";
import { TableRow } from "@tiptap/extension-table-row";
import { TableCell } from "@tiptap/extension-table-cell";
import { TableHeader } from "@tiptap/extension-table-header";
import customMessages from "../i18n/custom-messages";
import type { Editor } from "@tiptap/core";
import 

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@kamil-malinski
Comment options

Answer selected by formfcw
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants