Expand my Community achievements bar.

July 31st AEM Gems Webinar: Elevate your AEM development to master the integration of private GitHub repositories within AEM Cloud Manager.

Open richtext editor on drop/place

Avatar

Level 4

I see component "placement" events in the widget API.  Has anyone setup components to open the dialog based on that event?

1 Reply

Avatar

Level 4

I did find that Andy Power offers a solution at http://andypowell.org/category/cq5/

Here is the listener function:

function(path, definition) { var dialogConfig = CQ.WCM.getDialogConfig(definition.dialog); dialogConfig.success = function(form, action){ CQ.Util.reload(CQ.WCM.getContentWindow()); }; dialogConfig.failure = function(form, action){ var resp = CQ.HTTP.buildPostResponseFromHTML(action.response); CQ.Ext.Msg.alert(response.headers[CQ.HTTP.HEADER_MESSAGE]); }; var dialog = CQ.WCM.getDialog(dialogConfig); dialog.loadContent(path); dialog.show(); }        

Two issues:

  1. The dialog title is a JCR path and not friendly
  2. The dialog is modal.  We need it inline. 

Any thoughts on how to make the actual dialog editConfig properties work with this function?