AEM 6.4 SP7 - RTE Inline Editor Listener- Touch UI | Community
Skip to main content
Level 2
Aug 21, 2020 2:19 PM UTC
Solved

AEM 6.4 SP7 - RTE Inline Editor Listener- Touch UI

We are using AEM 6.4 SP7

 

I have a Text component , when author enters data using inline editor.
If data contains some special characters I want to prevent saving data to "crx" .
So I thought of go with listeners approach.

 

 

Once author click on save(check symbol) how to take listener control.

Can anyone please give some idea how to achieve this?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Andrei_Dantsou
Andrei_DantsouAccepted solution
Level 3
Aug 24, 2020 6:57 AM UTC

Hello @dhanubrp 

Touch UI events handling is described here https://helpx.adobe.com/experience-manager/using/creating-touchui-events.html

The "inline-edit-finish" event is what you are looking for:

$document.on("inline-edit-finish", function (event) {

        alert("inside inline-edit-finish");

});

Example of usage of the mentioned event can be found here http://experience-aem.blogspot.com/2016/07/aem-62-rich-text-editor-inplace-editing-perform-spellcheck-before-save.html

Regards

3 replies

Andrei_Dantsou
Andrei_DantsouAccepted solution
Level 3
Aug 24, 2020 6:57 AM UTC

Hello @dhanubrp 

Touch UI events handling is described here https://helpx.adobe.com/experience-manager/using/creating-touchui-events.html

The "inline-edit-finish" event is what you are looking for:

$document.on("inline-edit-finish", function (event) {

        alert("inside inline-edit-finish");

});

Example of usage of the mentioned event can be found here http://experience-aem.blogspot.com/2016/07/aem-62-rich-text-editor-inplace-editing-perform-spellcheck-before-save.html

Regards

Translate
kautuk_sahni
Employee
Aug 24, 2020 11:36 AM UTC
Great Reply.
Translate
Kautuk Sahni
arunpatidar
New Participant
Aug 22, 2020 2:22 PM UTC

I am not able to find any cq dialog events but you can use

$('.coral-Button.coral-Button--quiet.rte-toolbar-item[data-action="control#save"]').click(function(e){
console.log("clicked");
});

 

If you want to restrict user to enter invalid input then you must disabled inline editor and force user to edit using normal dialog and there you can easily write validations.

Translate
Arun Patidar