tiptap-extension-hr
v1.0.0
Published
Extension to add dividers(horizontal) to your tiptap content.
Downloads
38
Readme
tiptap-extension-hr
Install
npm install tiptap-extension-hr -S
Usage
import Hr from "tiptap-extension-hr";
const editor = new Editor({
element: document.querySelector(".editor"),
extensions: [StarterKit, Hr],
});
editor
.chain()
.focus()
.insertContent([{ type: "hr" }])
.run();
Options
Customize the line style with the optional style option.
extensions: [
StarterKit,
Image.configure({ inline: true }),
Hr.configure({
style: 'border-style: solid;border-width: 1px 0 0;border-color: rgba(0,0,0,0.1);transform-origin: 0 0;transform: scale(1, 0.5);'
}),
],
Relations
tiptap: https://tiptap.dev/
tiptap-appmsg-editor: https://github.com/KID-1912/tiptap-appmsg-editor