https://github.com/kid-1912/tiptap-extension-margin
An extension that add margin to tiptap paragraph or more nodes.
https://github.com/kid-1912/tiptap-extension-margin
extension margin paragraph tiptap
Last synced: 7 months ago
JSON representation
An extension that add margin to tiptap paragraph or more nodes.
- Host: GitHub
- URL: https://github.com/kid-1912/tiptap-extension-margin
- Owner: KID-1912
- Created: 2024-02-02T09:45:44.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2024-02-02T09:46:33.000Z (about 2 years ago)
- Last Synced: 2025-01-01T11:42:45.249Z (over 1 year ago)
- Topics: extension, margin, paragraph, tiptap
- Language: JavaScript
- Homepage:
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# tiptap-extension-margin
An extension that add margin to tiptap paragraph or more nodes.
---
## Install
```shell
npm install tiptap-extension-margin -S
```
## Usage
```js
import Margin from "tiptap-extension-margin";
const editor = new Editor({
element: document.querySelector(".editor"),
extensions: [StarterKit, Margin],
});
// { top, bottom, left, right }
editor.chain().focus().setMargin({ top: "10px" }).run();
```
## Relations
**tiptap:** https://tiptap.dev/
**tiptap-appmsg-editor:** https://github.com/KID-1912/tiptap-appmsg-editor