Review main Abandoned

74640[BUGFIX] Add support for linking HTML elements to the RTE link browser

Lars Tode CR 0 V 0 Easy +5 −2 updated 04/12/25, 19:51

Commit message

The RTE link browser test if content contains a selected element.
In case a selected element is available it will use that element to
wrap it with the link.

This allows i.e. use image within the RTE and place a link around it.

Table columns (td and th) are excluded as the link
is not applied correctly and it breaks the table preview.

Used command:

> Build/Scripts/runTests.sh -s buildJavascript

Review

  • Code review CR 0
  • Verified V 0

Issues 1

Files 2

Review log 1115

  1. Lars Tode uploaded patch set 1 05/13/22, 05:48

  2. core-ci voted on patch set 1 V -1 05/13/22, 05:56 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/27167

  3. Stefan Bürk uploaded patch set 2 05/13/22, 08:28

  4. core-ci voted on patch set 2 V +1 05/13/22, 08:37 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/27171

  5. Benni Mack updated the commit message in patch set 3 05/16/22, 08:08

  6. core-ci voted on patch set 3 V +1 05/16/22, 08:16 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/27249

  7. Mario Lubenka commented on patch set 3 CR -1 06/02/22, 10:22

    This change works for inline images; however it breaks linking functionality inside tables.
  8. Mario Lubenka uploaded patch set 4 06/02/22, 10:56

  9. Mario Lubenka commented on patch set 4 CR +1 06/02/22, 10:58

    Reply

    Table elements "td" and "th" are now excluded from wrapping and should be working as before.
  10. core-ci voted on patch set 4 V +1 06/02/22, 11:11 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/27651

  11. Riccardo De Contardi commented on patch set 4 V +1 07/09/22, 14:37

    Unresolved

    tested with latest master; test procedure: 1) enable image plugin in RTE via yaml file 2) create text element 3) put an external image inside the text (I used the source code to manually add <img src="https://static.unicatt.it/resources/common/assets/images/logo-unicatt.svg">; 4) save & preview > the image is shown 5) edit the RTE element, click on the image to highlight it 6) click on the RTE link button and add an external URL 7) save Results before patch: the image is swiped away and the entered URL becomes the text of the link Results after the patch: the image is kept, and the link works correctly
  12. Mario Lubenka commented on patch set 4 CR -1 02/08/23, 08:01

    Unresolved

    We probably found issues with editing links with this patch. Making changes to an existing link (e.g. changing target) will not save correctly anymore.
  13. Benni Mack updated the commit message in patch set 5 CR -1 V +1 05/03/23, 09:31

  14. Benni Mack updated the commit message in patch set 6 10/18/24, 14:05

  15. Benni Mack abandoned the change 04/12/25, 19:51

    Sorry, I will abandon this change now... This fix is for CKeditor4 and both our code (rte-link-browser.ts) and CKEditor5 (image handling + plugin API) have changed since TYPO3 v12.