logo
GitHub

Quick Start

This project is still under development and not yet stable. Please do not use it in production environments.

Installation

npm i @coffic/juice-editor

Usage

First, import the JuiceEditor component.

import { EditorFactory, Editor } from '@coffic/juice-editor';

const editor = EditorFactory.register('my-editor', {
  onBeforeCreate: () => {
    console.log('onBeforeCreate for label my-editor');
  },
  onCreate: (editor: Editor) => {
    console.log('onCreate for label my-editor');

    editor.enableLog();
  },
});

// When you type 'editor.' in the editor, your IDE will suggest available APIs

You can use it like any regular HTML tag anywhere in your page.

<my-editor></my-editor>