Token in href attribute does not work with CKeditor 5

Created on 3 December 2024, 4 months ago

Problem/Motivation

Tokens in a href attribute in a CKeditor enabled text field do not work.

Steps to reproduce

  1. In a CKeditor enabled text field, create a link like <a href="[my_token:some_url]">This links leads to [my_token:some_url]</a>.
  2. Go back from source code view to visual formatting view.
  3. The source code will change to <a href="some_url]">This links leads to [my_token:some_url]</a>. The leading [my_token: just vanishes.

This bug becomes even more nasty on an existing field with correct code. If you open the node in edit mode, and don't even change anything in the text field, simply by loading CKeditor the link will get broken.

Workarounds

Currently you can disable CKeditor / go into source code view of CKeditor, fix the href and don't enable Ckeditor formatting view and save the node. (You must use this workaround every time you save the node, even if you don't change the field!)

🐛 Bug report
Status

Active

Version

2.2

Component

Code

Created by

🇦🇹Austria hudri Austria

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

Comments & Activities

Production build 0.71.5 2024