feat: add warning custom extension

This commit is contained in:
swve 2022-12-08 10:31:43 +01:00
parent fe8fdd1769
commit 88644ad902
6 changed files with 99 additions and 9 deletions

View file

@ -3,6 +3,7 @@ import { useEditor, EditorContent } from "@tiptap/react";
import StarterKit from "@tiptap/starter-kit";
// Custom Extensions
import InfoCallout from "../Editor/Extensions/Callout/Info/InfoCallout";
import WarningCallout from "../Editor/Extensions/Callout/Warning/WarningCallout";
interface Editor {
content: string;
@ -16,11 +17,13 @@ function Canva(props: Editor) {
editable: isEditable,
extensions: [
StarterKit,
// Custom Extensions
InfoCallout.configure({
editable: isEditable,
}),
WarningCallout.configure({
editable: isEditable,
}),
],
content: props.content,