Refactor Linkit plugin for CKEditor5 v45+

Created on 11 July 2025, about 23 hours ago

Problem/Motivation

Linkit has been created long time ago and hasn't been cleaned up for CKEditor5 45+
This is a task to clean up JS code.

Also there are a few issues:
- updating link with other attributes (like target, or advance editor attributes) will erase all linkit attributes as they are not passed during the execute event

Remaining tasks

- Known issue: CKEditor5 45+ has a new field for Link "Displayed text", new API removes old range and adds a new range so new link loses advanced attributes
- update tests

User interface changes

none

API changes

none

Data model changes

none

πŸ“Œ Task
Status

Active

Version

7.0

Component

Code

Created by

πŸ‡¦πŸ‡ΊAustralia jannakha Brisbane!

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

Comments & Activities

  • Issue created by @jannakha
  • @jannakha opened merge request.
  • πŸ‡¦πŸ‡ΊAustralia jannakha Brisbane!

    jannakha β†’ changed the visibility of the branch 3535479-refactor-linkit-plugin to hidden.

  • πŸ‡¦πŸ‡ΊAustralia jannakha Brisbane!

    @mark_fullmer
    Hi Mark,
    Linkit and other modules with plugins for CKEditor5 are having lots of issues with v45 since it had some big changes.
    I was testing linkit on OOTB 10.5 and 11.2 and it had some inconsistent behaviour (loosing attributes, not working with other CKEditor plugins) (Also CKEditor5 v45 have updated how "Displayed text" is being updated).

    I've started refactoring of the plugin - let me know your feedback.

    cheers,
    Janna

  • πŸ‡ΊπŸ‡ΈUnited States mark_fullmer Tucson

    Hi Jannahka,

    Thanks so much for digging into the CKEditor v45 changes. These are certainly a priority. I'd begun some similar work, refactoring tests and refactoring for the problematic behavior in πŸ› Cannot replace 'Displayed text' of existing links Active . Ideally, I'd like to make only the minimal changes necessary and see if it is possible to retain backward compatibility with previous versions of CKEditor so that we don't have to change the core_version_requirement in a new release.

    To that end, it will be important to document exactly what is known to be breaking, with steps to reproduce, so that we can ensure that we're only changing what is necessary and not breaking other things.

Production build 0.71.5 2024