Add support for CKEditor5

Created on 9 June 2022, about 3 years ago
Updated 9 February 2023, over 2 years ago

Problem/Motivation

Nice module! Needs support for CKEditor5 to work with Drupal 10.

Remaining tasks

Implement a CKEditor5 plugin to generate the tooltip markup.

User interface changes

Provide a button for the CKEditor5 toolbar.

API changes

None needed for the display.

Data model changes

None needed.

โœจ Feature request
Status

Active

Version

1.0

Component

Code

Created by

๐Ÿ‡บ๐Ÿ‡ธUnited States freelock Seattle

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • ๐Ÿ‡ซ๐Ÿ‡ทFrance GaรซlG Lille, France
  • ๐Ÿ‡จ๐Ÿ‡ฆCanada MarcPare

    +1

    Now that CKEditor is deprecated, it would be nice if this were to be made to work with CKEditor5.

  • Assigned to matthieuscarset
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States drupgirl

    +1

    Currently none of the various Drupal tooltip modules work with ckeditor5, which is a blocker for sites that need this function to complete their d10 upgrades.

  • Issue was unassigned.
  • I tried 3 months ago but did not managed to get a CKEditor plugin working.

    The new API and overall developer experience with CKE5 is too much convoluted for me - as of i dont have much free time to dedicate.

    Anyone else, you are welcome to work on this.

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States drupgirl

    ok ty for letting us know and trying.

  • FYI there is a new release 1.1.1 compatible with Drupal 10.

    It does NOT use CKEditor 5 though.

    It relies on drupal/ckeditor which is the contrib module to continue to use CKE4 on D10.

    NB: assigning this issue back to me. I trying to write a working CKE5 plugin again ๐Ÿคž...

  • Assigned to matthieuscarset
  • Awesome to hear @matthieuscarset!

    I just wanted to throw out a big +1 that a CKE5 version of this module would be a huge benefit for my team, and your work is very much appreciated <3.

  • Issue was unassigned.
  • Status changed to Postponed about 2 years ago
  • I regret but I abandon this upgrade to CKEditor5.

    It is ridiculously complex.

    I don't manage to make simple things with the editor.

    The implementation in Drupal 10 is not practical too.

    I wish there were alternatives.

    Sorry, again.

    Issue open to anyone willing to build for CKE5 in D10.

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States freelock Seattle

    Hmm not sure I have time to take this on, maybe there will be some somewhere.

    I wonder if it helps to look at how other modules did it? E.g. I see CKEditor Accordion โ†’ has a version working for both CKEditor 4 and 5...

  • If it helps, here's what i was thinking we need for tooltip in CKE5:

    1. create a plugin to apply a span around any HTML5 element
    2. the toolbar button should open a modal to either enter text or select a tooltip block
    3. inject the text or block uuid into data-tooltip back in the span

    NB: this is already how the plugin works in CKE4.

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States freelock Seattle

    As far as I can tell, it's a very similar situation to CKEditor Accordion, except they chose to make an inline template instead of a modal. I am seeing other examples of modals, though.

  • There is apparently a new tutorial available to create something similar to what we want for Tooltip.

    CKEditor support points me to the abbreviation plugin.

    I may try again one day.

    Meanwhile, still open to anyone who want to contribute.

  • First commit to issue fork.
  • #15 โœจ Add support for CKEditor5 Needs work I have created a fork of the project which adds a ckeditor5 plugin for tooltips. However, I don't need the ability to insert block so have not included that. At the moment you will be able to select text and insert a tooltip the same way you would a url.

    This is based of the tutorial linked at #15 โœจ Add support for CKEditor5 Needs work as well as the 'link url' plugin already in ckeditor 5.

  • ๐Ÿ‡ฌ๐Ÿ‡งUnited Kingdom Ok4p1 Glasgow

    @justmeplease would you mind sharing your fork? Thank you.

  • ๐Ÿ‡ฌ๐Ÿ‡งUnited Kingdom Ok4p1 Glasgow

    Ignore my last message, I was on the mobile phone and missed the link from the description :)

  • First commit to issue fork.
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States averagejoe3000 Swanzey, NH

    @justmeplease I really appreciate you taking the initiative to get this working. I rerolled the merge request from #16 against the latest version of the module.

  • Status changed to Needs review almost 2 years ago
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States freelock Seattle

    Moving back to needs review...

  • Congrats for creating this new version.

    I m reading the code from my phone so not sure if it is me or is there no more options to select a tooltip block ?

  • Status changed to Needs work almost 2 years ago
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States averagejoe3000 Swanzey, NH

    That is correct, the block functionality has not been implement yet for CKEditor5. Moving this back to needs work to indicate that.

  • ๐Ÿ‡ธ๐Ÿ‡ฐSlovakia hideaway

    I needed a patch file which applies cleanly when packaging info is added to the info.yml file of the module, so uploading it here

  • Assigned to matthieuscarset
  • Status changed to Active 10 months ago
  • Working on this issue again.

    I have a solution to embed anything in a CKEditor5 WYSIWYG

    I need to find a way to open a form like drupalMedia does.

    Marking as active + assigning to myself.

  • Bueno... I gave it another try but it is just too much work for the time I can dedicate to creating a CKE5 plugin. I think it is just not worth the time to try to create a specific CKE5 plugin to insert tooltips. I guess there is (or will be?) a premium feature for this provided by the CKE5 team.

    Tooltip blocks work everywhere else - inserting in Twig, using a block, using arbitrary HTML...etc.

    I am closing this issue because the CKE5 plugin won't happen.

    For anyone trying to insert Tooltips in CKE5, I suggest to find a workaround such as:

    • Using Entity Embed โ†’ and choose a specific view mode
    • Using LinkIt with a custom Matcher (to retrieve block_content for instance) and a custom editor Filter to insert the tooltip
    • Request this feature to the CKE5 product team ๐Ÿ‘ทโ€โ™‚๏ธ

    Happy coding!

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States freelock Seattle

    Hey I upgraded a ckeditor module that had a dialog in it, it's a bit of setup to do but not too hard. I have other priorities and don't have a client to fund this (yet) but I'd be willing to work on this in the next month or two...

  • That would be awesome @freelock, thanks !

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States dbdrupal

    Appreciate the work on this. Have a question. My need for this module is to provide tooltips on views (so not CKEditor related). I need to have CKEditor 5 on my site (and not 4). Is there anyway to disable to CKEditor functionality/dependency so I can install this module and use it with my views? If not, is anyone aware of another tooltip type module that I can use with views? Thanks.

  • Issue was unassigned.
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States freelock Seattle

    @dbdrupal that seems like a good new issue to create -- make the ckeditor dependency optional, so you can still use the views functionality?

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States dbdrupal

    @freelock just realized that there has been an issue out there for over a year addressing this specifically. It is in Needs Review status: https://www.drupal.org/project/tooltip/issues/3394050 ๐Ÿ› Remove hard dependency on CKEditor Active I'm not a PHP developer so I'm probably going to just need to sit back and wait until this gets absorbed into the module. Thanks.

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States electrokate

    Any updates on progress @freelock? Considering making an attempt on this as well.

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States freelock Seattle

    No, my time got taken up, probably won't be able to spend any time on this until DrupalCon or later...

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia ajeet_kumar gurugaon

    ckeditor5 compatibility

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia ajeet_kumar gurugaon

    apply phpcbf fixed

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia ajeet_kumar gurugaon
  • Status changed to Needs review 3 days ago
  • ๐Ÿ‡ง๐Ÿ‡ชBelgium Kobe Wright

    kobe wright โ†’ made their first commit to this issueโ€™s fork.

  • ๐Ÿ‡ง๐Ÿ‡ชBelgium Kobe Wright

    Upgrading Drupal to 10.5+ means that CKEditor is also upgraded to v45+ which in its turn introduced a breaking change when using icons.
    This completely breaks tooltips on Drupal 10.5+ due to a JS error.

    I've updated the merge request to use CKEditor v45 and imported the icons from the new package "ckeditor5-icons" so tooltips work again.

    Also attaching a patch for use with v1.1.2 of the tooltip module

  • ๐Ÿ‡ง๐Ÿ‡ชBelgium Kobe Wright

    The patch from my previous comment sadly doesn't apply because of the packing information that is added to tooltip.info.yml (known issue), attaching a new patch that is based from the info.yml including the packaging information.

Production build 0.71.5 2024