An open API service indexing awesome lists of open source software.

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.

Awesome Lists containing this project

README

          

# tiptap-extension-hr


Extension to add dividers(horizontal) to your tiptap content.




NPM URL

version


---

## 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