BookStackApp / BookStack

A platform to create documentation/wiki content built with PHP & Laravel
https://www.bookstackapp.com/
MIT License
15.02k stars 1.88k forks source link

Support Emoticons via WYSIWYG Editor #4812

Open Roemer opened 8 months ago

Roemer commented 8 months ago

Describe the feature you'd like

TinyMCE has a plugin that enables emoticons to be added via editor: https://www.tiny.cloud/docs/tinymce/6/emoticons/ Either add it by default or at least add the plugin so it can be activated via customization and the hooks.

Describe the benefits this would bring to existing BookStack users

This allows less experienced users to add emoticons via editor. These are not only smileys but more importantly also stuff like ticks, cross (✅❌) and other symbols that can be useful.

Can the goal of this request already be achieved via other means?

The emoticons can be looked up on any emoticon site and copy / pasted. This is cumbersome and not convenient, giving that this feature is possible with tinyMce by default.

Have you searched for an existing open/closed issue?

How long have you been using BookStack?

Under 3 months

Additional context

The feature request was already open in 2021 (https://github.com/BookStackApp/BookStack/issues/3017) but was closed as back then, a move away from tinyMCE was the plan which was dropped in 2022 I suppose.

ssddanbrown commented 8 months ago

Hi @Roemer,

The feature request was already open in 2021 (https://github.com/BookStackApp/BookStack/issues/3017) but was closed as back then, a move away from tinyMCE was the plan

The move away from TinyMCE was a side point, with my main reasons for closing that as:

I wouldn't look to integrate any custom emoticons in BookStack as I'd prefer to keep content related to widely-supported standards.

We can support standard emoji but there's no confirmed nice web standard for selection of such characters right now. That said, most operating systems have an emoji picker built in to them. I know Windows, Android, iOS and Mac all have such emoji picker support. Think it's becoming a supported feature in some linux systems now.

Personally I don't think a custom picker implementation, in addition to using up another editor toolbar space, would be worth it.

Again, I don't really think there's enough reason to implement and maintain a full emoji picker within the application since operating systems already fill this gap in a way that would handle various issues much better than we'd be able to handle (Internationalization, Unicode updates/changes etc...)


or at least add the plugin so it can be activated via customization and the hooks

I think I tend to remove that one specifically since it can be quite large. TBH If anything, I may look to go the direction of removing more of the plugins we don't actively use by default. You could always host them in a custom location, then add them via the external_plugins TinyMCE option. Just a case of watching for version changes to keep aligned.

Roemer commented 8 months ago

Good hint with external_plugins, didn't know about that. This might be worth a hacking BockStack entry, especially if you would like to remove more plugins? I was able to add it like this in editor-tinymce::pre-init:

    mceConfig.toolbar += ' emoticons';
    mceConfig.plugins.push('emoticons');
    mceConfig.external_plugins = {
      'emoticons': 'https://cdnjs.cloudflare.com/ajax/libs/tinymce/6.7.2/plugins/emoticons/plugin.min.js'
    };