mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
feat: add warning custom extension
This commit is contained in:
parent
fe8fdd1769
commit
88644ad902
6 changed files with 99 additions and 9 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue