Richtext:linkDialog - Exchange hyperlink in the richtext - the path does not remain

Description

When changing the reference, you always have to re-click the path from the starting point (root-path not the maintained path ) in the file browser.

Activity

Show:
Masoud Rozati
September 14, 2020, 3:41 PM

I guess the property path is missing for the path picker. we should extratct the current value based on the link type from the datat attributes and set the path property

The data attributes are addressable viaconfig.parameters.editorKernel.currentAnalyzedSelection.anchors[0].dom.dataset

Masoud Rozati
September 14, 2020, 5:07 PM

I solved the issue on this branch:
https://github.com/wcm-io/wcm-io-handler/compare/feature/WHAN-40_fix-rte-link-dialog

But there is a major problem: the link dialog of the RTE is initiated only “once”. this means, the path picker works fine for the first inline link you edit. But in case you have several links in your richtext - which is quite common - the path picker shows wrong paths.

wdt? is this a by-design issue?

Stefan Seifert
October 7, 2020, 9:50 AM

thanks for the PR - yes, it is by design that the link dialog is only initialized once. the values of the selected link are inserted dynamically.

i poked a bit around in the implementation of the OOTB link dialog and found a much simpler solution which does not has the mentioned problem:
https://github.com/wcm-io/wcm-io-handler/commit/de4f6c13a3d6a61692c101c820e0bb9cb9f4858b

Fixed

Assignee

Stefan Seifert

Reporter

Faez Moghales

Labels

None

Components

Fix versions

Priority

Trivial
Configure