mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
feat: init youtube editor extension
This commit is contained in:
parent
5eb9101084
commit
8d0efdb93e
5 changed files with 68 additions and 5 deletions
|
|
@ -5,6 +5,8 @@ import StarterKit from "@tiptap/starter-kit";
|
|||
import InfoCallout from "../Editor/Extensions/Callout/Info/InfoCallout";
|
||||
import WarningCallout from "../Editor/Extensions/Callout/Warning/WarningCallout";
|
||||
import ImageBlock from "../Editor/Extensions/Image/ImageBlock";
|
||||
import Youtube from "@tiptap/extension-youtube";
|
||||
import { EditorContentWrapper } from "../Editor/Editor";
|
||||
|
||||
interface Editor {
|
||||
content: string;
|
||||
|
|
@ -29,12 +31,20 @@ function Canva(props: Editor) {
|
|||
editable: isEditable,
|
||||
element: props.element,
|
||||
}),
|
||||
Youtube.configure({
|
||||
controls: true,
|
||||
modestBranding: true,
|
||||
}),
|
||||
],
|
||||
|
||||
content: props.content,
|
||||
});
|
||||
|
||||
return <EditorContent editor={editor} />;
|
||||
return (
|
||||
<EditorContentWrapper>
|
||||
<EditorContent editor={editor} />
|
||||
</EditorContentWrapper>
|
||||
);
|
||||
}
|
||||
|
||||
export default Canva;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue