https://github.com/kid-1912/tiptap-extension-section
Make tiptap support section tags, which provide predefined styles for content.
https://github.com/kid-1912/tiptap-extension-section
extension section style tiptap
Last synced: 11 months ago
JSON representation
Make tiptap support section tags, which provide predefined styles for content.
- Host: GitHub
- URL: https://github.com/kid-1912/tiptap-extension-section
- Owner: KID-1912
- Created: 2024-02-21T14:20:31.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-02-21T14:27:10.000Z (over 2 years ago)
- Last Synced: 2025-05-31T17:48:57.178Z (about 1 year ago)
- Topics: extension, section, style, tiptap
- Language: JavaScript
- Homepage:
- Size: 6.84 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# tiptap-extension-section
Make tiptap support section tags, which provide predefined styles for content.
---
## Install
```shell
npm install tiptap-extension-section -S
```
## Usage
```js
import Section from "tiptap-extension-section";
const editor = new Editor({
element: document.querySelector(".editor"),
extensions: [StarterKit, Section],
});
```
```js
const html = `
01
公司宣传手册
COMPANY BROCHURE
`;
editor
.chain()
.focus()
.insertContent(html, {
parseOptions: {
preserveWhitespace: false,
},
})
.run();
```
## Relations
**tiptap-appmsg-editor:** https://github.com/KID-1912/tiptap-appmsg-editor