Giter Site home page Giter Site logo

ckeditor5-emoji's Introduction

CKEditor 5 emoji feature

This package implements the emoji feature for CKEditor 5.

Screenshot of a emoji plugin in CKEditor 5.

The plugin was created during hackathon, it is roughly based on the source code of the link plugin. It basically inserts Unicode emoji into the editor at the current cursor position.

CKEditor 5 compatibility

The plugin was built on top of the latest stable version of CKEditor 5 (v11.0.1).

๐Ÿ˜Ž Enabling the emoji plugin

Since this is a third-party plugin, it is not enabled by default in CKEditor 5 and has to be added to it manually. For more information check the official documentation about creating custom builds.

To install it, run:

npm install --save @wwalc/ckeditor5-emoji

When updating the build configuration use the following:

  • @wwalc/ckeditor5-emoji/src/emoji โ€“ plugin import path
  • Emoji โ€“ plugin name
  • emoji โ€“ toolbar item (button)

Development environment

To enable the plugin you amy also setup a local development environment and build a custom editor there.

Configuration

The list of Emojis is configurable via config.emoji:

import Emoji from '@wwalc/ckeditor5-emoji/src/emoji';

ClassicEditor
    .create( document.querySelector( '#editor' ), {
        plugins: [
            Essentials,
            Paragraph, Heading, Bold, Italic, List, Emoji
        ],
        emoji: [
            { name: 'smile', text: '๐Ÿ˜€' },
            { name: 'wink', text: '๐Ÿ˜‰' },
            { name: 'cool', text: '๐Ÿ˜Ž' },
            { name: 'surprise', text: '๐Ÿ˜ฎ' },
            { name: 'confusion', text: '๐Ÿ˜•' },
            { name: 'crying', text: '๐Ÿ˜ข' }
        ],
        toolbar: [ 'heading', 'undo', 'redo', 'bold', 'italic', 'emoji' ]
    } )
    .then( editor => {
        window.editor = editor;
    } )
    .catch( err => {
        console.error( err.stack );
    } );

Support

The plugin comes with no support. However if you find it useful, feel free to submit an issue and/or send a pull request.

License

Licensed under the GPL, LGPL and MPL licenses, at your choice. For full details about the license, please check the LICENSE.md file.

ckeditor5-emoji's People

Contributors

reinmar avatar wwalc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

ckeditor5-emoji's Issues

Make emoji box responsive

Hi,

Thank you for creating this plugin. It works well except 1 thing. I've added 18 emoji to the plugin.

emoji_desktop

On desktop, it works fine. But on mobile screen size, it doesn't responsive.

emoji_mobile

Can you make it responsive? Or at least limit the number of emoji per row (maybe 5-6 emoji per row)

Thank you.

Not compatible with ckeditor5 v11

Console log:

plugincollection-plugin-name-conflict: Two plugins with the same name were loaded. Read more: https://docs.ckeditor.com/ckeditor5/latest/framework/guides/support/error-codes.html#error-plugincollection-plugin-name-conflict
Object
plugin1: function()
plugin2: function()
pluginName: "ContextualBalloon"
Object Prototyp

I try to use the emoji plugin for the ckeditor5 v11.

I lost the style for the toolbar and the dropdown menus like alignment are defect.

bildschirmfoto 2018-07-26 um 16 39 00
bildschirmfoto 2018-07-26 um 16 39 30

Check compatibility with 1.0.0-alpha.3

Currently the plugin works only with the latest development version of CKEditor, it does not work with 1.0.0-alpha.2. To check if it will work with 1.0.0-alpha.3 once its released.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.