disable richtext rte field | Community
Skip to main content
New Participant
February 17, 2023
Solved

disable richtext rte field

  • February 17, 2023
  • 4 replies
  • 1794 views

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.
Best answer by VeenaK

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

4 replies

Manu_Mathew_
New Participant
February 20, 2023

@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

 

VeenaKAccepted solution
New Participant
February 18, 2023

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

B_Sravan
New Participant
February 18, 2023

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

-Sravan

BrianKasingli
New Participant
February 17, 2023

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

DollyAuthor
New Participant
February 17, 2023

Hi @briankasingli,

Edited my query to give more clarity. Thanks!