This article covers, how to customize rich text editor in AEM, sometimes you need to add additional options in rich text editor link dialog, the link dialog appears when we try to author links in the rich text editor, now a days when we go to any project open a page in modal popup is a common requirement, when we click on link button it should open a configured page in modal popup
The first thing which we need to do is overlay the LinkDialog.js file from the libs folder to apps folder “/apps/cq/ui/widgets/source/widgets/form/rte/plugins/LinkDialog.js” and add code which is shown below to remove the checkbox and add a drop down
In the LinkDialog, you will see default constructor replace the target type default functionality code with the below code
"fieldDescription":"Select the target type for the above URL",
"text":CQ.I18n.getMessage("Open in a new window")
"text":CQ.I18n.getMessage("Open in a new modal")
Next, you will find two functions dlgFromModel and dlgToModel, replace the dialog from and dialog to code with the below code
A technology enthusiast and a professional blogger from India. Through out my IT career, I have had the pleasure of working on various new technologies and built products like www.ziprides.com and some other products. Unfortunately, my attempts have not given me the desired results and as a result, I have finally decided to build a professional blog where I would like to share all my learnings and hoping to learn from other enthusiasts around the world.