Project

General

Profile

Actions

Bug #106694

open

CKEditor cannot properly edit broken links

Added by Holger Drosdek about 1 month ago. Updated about 1 month ago.

Status:
Needs Feedback
Priority:
Should have
Assignee:
-
Category:
RTE (rtehtmlarea + ckeditor)
Target version:
-
Start date:
2025-05-14
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
12
PHP Version:
8.2
Tags:
Complexity:
easy
Is Regression:
Sprint Focus:

Description

At normal links, when marking it from its beginning to its end, a small div opens, where you can edit or delete it.
At broken links such as

<a data-rte-error="Page with ID XXX not found">linktext </a>

nothing happend, when marking it in the same manner. You have to delete the link including the linktext and type the link text again.

Actions #1

Updated by Holger Drosdek about 1 month ago

  • Tags changed from edit "broken links" to edit broken links
Actions #2

Updated by Garvin Hicking about 1 month ago

  • Subject changed from CKEditor to CKEditor cannot properly edit broken links
  • Status changed from New to Needs Feedback

Maybe this is due to the `<a>` tag not having a `href` attribute. Could you try to go to the source editing mode, insert a `href` for testing and see if that allows you to edit it?

If so, we either need to ensure something like `href="#"` remains, or we adjust the markup differently.

Actions #3

Updated by Garvin Hicking about 1 month ago

  • Tags deleted (edit broken links)
Actions #4

Updated by Garvin Hicking about 1 month ago

  • Description updated (diff)
Actions #5

Updated by Holger Drosdek about 1 month ago

Hey, thanks a lot for looking after it. You are right, there's no href attribute in this broken link. After adding href="#" and saving it turns to href="t3://page?uid=current". So its not broken anymore. Adding a href to a non existing page will lead to
<a href="t3://page?uid=xxx" data-rte-error="Page with ID xxx not found">linktext </a>
Now CKE shows the little edit menu, when marking the whole link text. That shows, that you are completely right. However, your proposal adding a simple href="#" will not work, since the link turned to be verified.

Actions #6

Updated by Garvin Hicking about 1 month ago

Thanks for the quick reply. I was afraid of this outcome (can't check this throughly myself at this time).

We'll somehow need to "trick" CKEditor then into seeing this tag as a proper link, which might be hard when CKEditor relies on the href.

Could you maybe (sorry for "abusing" you to try out things, hope that's ok) see if it works when you add a "name='xxx'" attribute? Maybe that also triggers CKEditor link editing capabilities, without leading to "actual" links...?

Actions #7

Updated by Holger Drosdek about 1 month ago

No sorry, adding name='xxx' to the source code in CKE is been deleted after saving.

Actions

Also available in: Atom PDF