AEM UI extensions - CF editor - RTE
Hi all,
I'm currently working on an UI extension for the RTE in the new Content Fragment editor. I'm doing this based on the documentation provided here: Rich Text Editor Toolbar - AEM Content Fragments Editor Extensibility and also based on the examples provided here: GitHub - adobe/aem-uix-examples: List of examples for UI Extensibility of AEM.
I'm left with 2 questions:
- Is it possible to get the cursor location on click? Currently we are depending on the full selection of a link + 1 character. Otherwise the state.selectedHtml does not contain the <a> tag.
- Is it possible to highlight the button icon? When clicked on a link in the RTE, the link button is being highlighted, when moving the cursor away it returns to the original stage. We would like to add similar functionality to our custom button.
The goal is to have a button that can set a custom value on the target attribute of the <a> tag. It would be nice if we could add an option in the exisiting link modal, but I couldn't find any documentation on this being possible.
Thanks in advance,
Reyn