1.1.0 • Published 8 months ago

@plebjs/editorjs-emoji-picker-tool v1.1.0

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
8 months ago

Editor.js Emoji Picker Tool

An emoji picker tool (emoji-picker-element) for Editor.js inline toolbar.

Installation

Get the package via npm or yarn:

npm i @plebjs/editorjs-emoji-picker-tool
yarn add @plebjs/editorjs-emoji-picker-tool

Usage

Add the tool to the Editor.js initial config:

import EmojiPickerTool from '@plebjs/editorjs-emoji-picker-tool';

const editor = new EditorJS({
    // ...
    tools: {
        // ...
        emoji: {
            class: EmojiPickerTool
        },
    }
    // ...
});

Inline tool

To insert an emoji, select a portion of text and click the emoji icon in the inline toolbar. If your text selection starts at the beginning of the line, the emoji will be inserted before the selected text. Otherwise, the emoji will be inserted at the end.

Config

This tool supports these configuration parameters:

FieldTypeDescription
localestringLocale for the emoji picker. Default is 'en'.
1.1.0

8 months ago

1.0.1

8 months ago

1.0.0

8 months ago