disable richtext rte field | Community
Skip to main content
Level 3
Feb 17, 2023 3:31 PM UTC
Solved

disable richtext rte field

Hi,

 

How to conditionally disable the richtext field in the dialog using jQuery? (rte created using sling:resourceType - cq/gui/components/authoring/dialog/richtext)

 

I have a checkbox. when this checkbox is checked, richtext field in the dialog needs to be disabled 

 

Thanks in advance

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
VeenaKAccepted solution
Level 4
Feb 18, 2023 12:41 PM UTC

Below is the link which explains step by step logic for hiding and showing a field in the dialog using extra Jquery logic which can be replicated to your usecase as well.

https://stackoverflow.com/questions/25244844/conditional-show-hide-of-fields-in-aem-6-dialogs

Hope this is useful

5 replies

Manu_Mathew_
New Participant
Feb 20, 2023 5:15 AM UTC

@dolly I believe, you can just create a custom dialog clientlib, and write your JQuery for the same and include that in the extraclientlib node of the dialog which will solely load the clientlib to your component. 

eg:

https://stackoverflow.com/questions/57992806/how-to-show-hide-dialog-fields-with-a-checkbox-in-aem-touch-ui

 

Translate
VeenaKAccepted solution
Level 4
Feb 18, 2023 12:41 PM UTC

Below is the link which explains step by step logic for hiding and showing a field in the dialog using extra Jquery logic which can be replicated to your usecase as well.

https://stackoverflow.com/questions/25244844/conditional-show-hide-of-fields-in-aem-6-dialogs

Hope this is useful

Translate
B_Sravan
New Participant
Feb 18, 2023 12:06 PM UTC

use extra clientlibs to load your jquery on the dialog and you can manipulate the logic however you want.

-Sravan

Translate
BrianKasingli
New Participant
Feb 17, 2023 5:08 PM UTC

@dolly you can use editable templates, it's policy to remove the RTE from being available components to use in the template.

Translate
DollyAuthor
Level 3
Feb 17, 2023 8:27 PM UTC

Hi @briankasingli,

Edited my query to give more clarity. Thanks!

Translate