pablo-abc / svelte-editorjs

Use EditorJS as a Svelte action
MIT License
27 stars 11 forks source link

svelte-editorjs

A wrapper for EditorJS in Svelte

Installation

# yarn
yarn add @editorjs/editorjs svelte-editorjs

# npm
npm i -S @editorjs/editorjs svelte-editorjs

Usage

To use it import the createEditor function from svelte-editorjs.

<script>
  import { createEditor } from 'svelte-editorjs';

  const { editor, data, isReady } = createEditor();
</script>

<div use:editor />

Configuration

The createEditor accepts the same properties that EditorjS accepts as options except for holderId and holder, since that's determined by the action.

License

MIT