New version for CKEditor 5

Created on 7 March 2023, over 1 year ago
Updated 26 May 2023, over 1 year ago

Attached is a new version as a starting point, which is compatible to CKEditor 5 and Drupal^10.

The module for CKEditor 5 compatibility is "inspired" by CKEditor Non-breaking space Plugin โ†’ , maintained by Kevin Wenger (wengerk) โ†’ .

(New feature: It makes the shy char visible in CKEditor)

This is a quick solution and not heavily tested.

Things to do:

  • The JS-script is a prettified version from the compressed "nbsp-modules"-file โ€“ and not really readable. If anyone is able to reconstruct the original files โ€“ that would be nice and better maintainable.
  • It seems i can't get the Keyboard-Shortcut "Ctrl+Hyphen" to work (js/shy.js, lines 61ff)
  • I think it is not backwards-compatible to the older versions of the shy-module
โœจ Feature request
Status

Fixed

Version

2.0

Component

Code

Created by

๐Ÿ‡ฉ๐Ÿ‡ชGermany tfranz

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

Comments & Activities

  • Issue created by @tfranz
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia vikas shishodia

    Hi @tfranz

    I am just creating a patch with your zip file.

  • @vikas-shishodia opened merge request.
  • ๐Ÿ‡ฉ๐Ÿ‡ชGermany tfranz

    Thank you!
    I think this should go into a new version (2.0.0 ?), because it is not backwards-compatible.

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia vikas shishodia

    Hi @wengerk
    Can you please create a new branch 8.x-2.x So that we can push the ckeditor5 compatible code against that branch for this module.

  • ๐Ÿ‡ฉ๐Ÿ‡ชGermany quotientix

    Thanks for posting the module! +1

  • ๐Ÿ‡ฉ๐Ÿ‡ชGermany rgpublic Dรผsseldorf ๐Ÿ‡ฉ๐Ÿ‡ช ๐Ÿ‡ช๐Ÿ‡บ

    What does "I think it is not backwards-compatible to the older versions of the shy-module" mean? After all, in the HTML code that's finally stored in the field it should be just a ­ entity, right? So if I open such a field with the new CKEditor5 then I can see/edit the shy's with the new module, right?

    BTW: Thanks from me as well for the module. +10 :-)

  • ๐Ÿ‡ฉ๐Ÿ‡ชGermany tfranz

    @rgpublic: Yes, i think you should be right, but i haven't tested it.

    It should not break anything, but at least it could simply ignore the old modules template <span class="shy">&#173;</span>. The new one is <shy>&shy;</shy>.
    Or it could be that a new filter of CKEditor5 strips out the old tag and removes it completely. Then all old markups are lost.

    But it would be nice, if the new module could take care of the old script, too.

  • ๐Ÿ‡บ๐Ÿ‡ฆUkraine i-trokhanenko Lutsk ๐Ÿ‡บ๐Ÿ‡ฆ

    Created 2.x branch for the CKEditor 5 compatibility

  • ๐Ÿ‡บ๐Ÿ‡ฆUkraine i-trokhanenko Lutsk ๐Ÿ‡บ๐Ÿ‡ฆ
  • Status changed to Needs review over 1 year ago
  • ๐Ÿ‡บ๐Ÿ‡ฆUkraine i-trokhanenko Lutsk ๐Ÿ‡บ๐Ÿ‡ฆ

    Committed the MR#4 to the 2.0.x branch, please test

  • ๐Ÿ‡ฉ๐Ÿ‡ชGermany tfranz

    Thank you โ€“ i tried the new branch and it seems to work for me (Drupal10.0.9).

    I have some small changes:

    1. I think we don't need the png-icons. As far as i can see, you can delete them including the folder "hidpi".
    2. I removed the dependency to drupal:ckeditor
    3. The translations couldn't be found, because the "interface translation server pattern" in shy.info.yml is wrong. It should be:
    interface translation server pattern: modules/contrib/%project/translations/%language.po
    4. And the translations are wrong. The "msgid" is "Replaces &lt;shy&gt;&lt;/shy&gt; tag with non-breaking space."

    Another thing - the modules description:
    Minimal module to insert a soft hyphen into the content by pressing Ctrl+Hyphen or using the provided button.
    At least for me the keys "Ctrl+Hyphen" don't work.

  • Status changed to RTBC over 1 year ago
  • ๐Ÿ‡บ๐Ÿ‡ฆUkraine i-trokhanenko Lutsk ๐Ÿ‡บ๐Ÿ‡ฆ

    Committed patch #13

  • Status changed to Fixed over 1 year ago
  • ๐Ÿ‡บ๐Ÿ‡ฆUkraine i-trokhanenko Lutsk ๐Ÿ‡บ๐Ÿ‡ฆ

    Created 2.0.0 โ†’ version of the module CKEditor 5 compatible. Thanks!

  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024