Adding custom dialog from element drop down menu in author v

Post here questions and problems related to oXygen frameworks/document types.
easirois
Posts: 3

Adding custom dialog from element drop down menu in author v

Fri Mar 27, 2015 6:49 pm

Hi,

Is it possible to launch a dialog add a custom dialog for a specific element in the dropdown list from the author view, something like the current image dialog? I would expect at some point to use the ro.sync.ecss.extensions.commons.operations API to plop down some text after the user has made some selection in the dialog.

Kind regards,
Eric
easirois
Posts: 3

Re: Adding custom dialog from element drop down menu in auth

Sun Mar 29, 2015 11:26 pm

I see there's a sample code in the SDK but it seems to be available from everywhere. I would like it to be more context specific. So do I need to look at the
InsertElementOperation
to be able to do an action on s specific element.
alex_jitianu
Posts: 632

Re: Adding custom dialog from element drop down menu in auth

Mon Mar 30, 2015 10:21 am

Hello Eric,

Let's make sure I've fully understood your scenario. You want to contribute an action to the content completion window. When this action is pressed it should present a dialog for user interaction. The action should also be presented only in specific contexts. If these assumptions are correct, here is what you should do:
1. Create a custom Author operation. This operation is Java code and is responsible for presenting the dialog.
2. Create an author action over the previous operation. A specific point of interest here is the field When this XPath expression is true. This XPath expression will give the context in which your action will be active. The action will appear only in these contexts.
3. Contribute this action to content completion window.

Best regards,
Alex

Return to “SDK-API, Frameworks - Document Types”

Who is online

Users browsing this forum: No registered users and 1 guest