https://github.com/kid-1912/tiptap-extension-hr
Extension to add dividers(horizontal) to your tiptap content.
https://github.com/kid-1912/tiptap-extension-hr
divider extenison hr tiptap
Last synced: 1 day ago
JSON representation
Extension to add dividers(horizontal) to your tiptap content.
- Host: GitHub
- URL: https://github.com/kid-1912/tiptap-extension-hr
- Owner: KID-1912
- Created: 2024-02-01T09:18:06.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-02-01T09:18:59.000Z (over 1 year ago)
- Last Synced: 2025-06-30T06:22:05.501Z (4 months ago)
- Topics: divider, extenison, hr, tiptap
- Language: JavaScript
- Homepage:
- Size: 6.84 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# tiptap-extension-hr
Extension to add dividers(horizontal) to your tiptap content.
---
## Install
```shell
npm install tiptap-extension-hr -S
```## Usage
```js
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.
```js
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