https://github.com/taiwbi/editorjs-advancedparagraph
Paragraph tool with alignment and RTL support for Editorjs
https://github.com/taiwbi/editorjs-advancedparagraph
editorjs-plugin javascript
Last synced: 12 months ago
JSON representation
Paragraph tool with alignment and RTL support for Editorjs
- Host: GitHub
- URL: https://github.com/taiwbi/editorjs-advancedparagraph
- Owner: taiwbi
- License: mit
- Created: 2022-09-17T07:51:16.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-08-07T06:41:50.000Z (almost 2 years ago)
- Last Synced: 2025-05-19T08:15:27.787Z (about 1 year ago)
- Topics: editorjs-plugin, javascript
- Language: JavaScript
- Homepage:
- Size: 7.81 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Advanced Paragraph for Editorjs
Paragraph tool with alignment and RTL support for [Editorjs](https://editorjs.io)
## Installation
### Install via npm
`npm i --save @taiwbi/editorjs-advancedparagraph`
If you wish to use it on browser, I recommend to use [browserify](https://github.com/browserify/browserify)
#### Install using browserify
After installing the Advanced Paragraph and browserify package with npm run:
`browserify -r @taiwbi/editorjs-advancedparagraph > bundle.js`
then in your page do this:
```html
const AdvancedParagraph = require("@taiwbi/editorjs-advancedparagraph");
/* ... */
```
## Usage
```javascript
const editor = new EditorJS({
tools: {
paragraph: {
class: AdvancedParagraph,
inlineToolbar: true,
},
},
});
```
If you wish to keep default editorjs paragraph and have advanced paragraph beside:
```javascript
const editor = new EditorJS({
tools: {
AdvancedParagraph: {
class: AdvancedParagraph,
inlineToolbar: true,
},
},
});
```
if you use [editorjs-html](https://github.com/pavittarx/editorjs-html) you can use built-in parser
```javascript
const edjsParser = edjsHTML({
paragraph: AdvancedParagraph.AdvancedParagraphParser /*, ...*/,
});
```