Skip to content

Paragraph tool with alignment and RTL support for Editorjs

License

Notifications You must be signed in to change notification settings

taiwbi/editorjs-advancedparagraph

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Aug 7, 2024
ed08384 · Aug 7, 2024

History

8 Commits
Sep 20, 2022
Sep 17, 2022
Aug 7, 2024
Sep 20, 2022
Aug 7, 2024

Repository files navigation

Advanced Paragraph for Editorjs

Paragraph tool with alignment and RTL support for Editorjs

Installation

Install via npm

npm i --save @taiwbi/editorjs-advancedparagraph

If you wish to use it on browser, I recommend to use 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:

<script src="bundle.js"></script>
<script>
  const AdvancedParagraph = require("@taiwbi/editorjs-advancedparagraph");
  /* ... */
</script>

Usage

const editor = new EditorJS({
  tools: {
    paragraph: {
      class: AdvancedParagraph,
      inlineToolbar: true,
    },
  },
});

If you wish to keep default editorjs paragraph and have advanced paragraph beside:

const editor = new EditorJS({
  tools: {
    AdvancedParagraph: {
      class: AdvancedParagraph,
      inlineToolbar: true,
    },
  },
});

if you use editorjs-html you can use built-in parser

const edjsParser = edjsHTML({
  paragraph: AdvancedParagraph.AdvancedParagraphParser /*, ...*/,
});

About

Paragraph tool with alignment and RTL support for Editorjs

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published