Bug #106694
openCKEditor cannot properly edit broken links
0%
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.
Updated by Holger Drosdek about 1 month ago
- Tags changed from edit "broken links" to edit broken links
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.
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.
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...?
Updated by Holger Drosdek about 1 month ago
No sorry, adding name='xxx' to the source code in CKE is been deleted after saving.