tiptap-extension-video
v1.0.1
Published
A tiptap extension for inserting video.
Downloads
129
Readme
tiptap-extension-video
Install
npm install tiptap-extension-video -S
Usage
editor
.chain()
.focus()
.setVideo({
src: videoUrl,
HTMLAttributes: { "data-id": videoId },
})
.run();
Options
You can configure common video HTML attributes via the HTMLAttributes options
import Video from "tiptap-extension-video";
const editor = new Editor({
element: document.querySelector(".editor"),
extensions: [
StarterKit,
Video.configure({ HTMLAttributes: { class: "tiptap-video" } }),
],
});
Relations
tiptap-appmsg-iframe: https://github.com/KID-1912/tiptap-extension-iframe
tiptap-appmsg-editor: https://github.com/KID-1912/tiptap-appmsg-editor