Replicate Insert Image Dialog from Oxygen XML Editor
Are you missing a feature? Request its implementation here.
-
- Posts: 163
- Joined: Thu Aug 30, 2018 10:06 pm
Replicate Insert Image Dialog from Oxygen XML Editor
Post by dreifsnider »
Hi Oxygen Folks,
(apologies for all the questions!)
Is it possible to replicate the Insert Image... dialog from Oxygen XML Editor in Web Author?
For example:
Our Web Author users are using the Insert Image toolbar button to add images; however, they are also expecting to be able to add figures (with a figure title) when using the same button. In Web Author, there's no option to add a figure title, and have the corresponding image element automatically placed in a figure element like there is in Oxygen XML Editor.
I was hoping that we could easily replicate the Insert Image action used in Oxygen XML Editor in Web Author; however, looking at the actual Insert Image action/operation preferences in Oxygen XML Editor, I don't see the arguments that are presented in the Insert Image dialog so I'm not sure where they are coming from.
Any help with replicating this dialog for the Insert Image action in Web Author would be appreciated!
Daniel
(apologies for all the questions!)
Is it possible to replicate the Insert Image... dialog from Oxygen XML Editor in Web Author?
For example:
- editor-insert-image-dialog-options.png (46.24 KiB) Viewed 1251 times
- web-author-insert-image-dialog-options.png (82.55 KiB) Viewed 1251 times
I was hoping that we could easily replicate the Insert Image action used in Oxygen XML Editor in Web Author; however, looking at the actual Insert Image action/operation preferences in Oxygen XML Editor, I don't see the arguments that are presented in the Insert Image dialog so I'm not sure where they are coming from.
- editor-insert-image-action.png (64.23 KiB) Viewed 1251 times
Daniel
- Attachments
-
- editor-insert-image-dialog-options.png (46.24 KiB) Viewed 1251 times
-
- Site Admin
- Posts: 170
- Joined: Tue Mar 20, 2018 5:28 pm
Re: Replicate Insert Image Dialog from Oxygen XML Editor
Post by Bogdan Dumitru »
Hello Daniel,
In order to replicate the image browser dialog from Oxygen XML Editor you have to override the built-in "insert.image" action with a custom action that shows a dialog using the sync.api.Workspace.createDialog API method and that adds needed inputs. For the browsing part you can use the sync.api.Workspace.getUrlChooser API.
See also the Implementing a Custom Action and Presenting a Dialog to the User tutorials.
Then you have to compute the XML fragment to be inserted and insert it by invoking ro.sync.ecss.extensions.commons.operations.InsertFragmentOperation, somewhat like this: actionsManager.invokeOperation("ro.sync.ecss.extensions.commons.operations.InsertFragmentOperation", {fragment: "test", insertLocation: "."})
In order to replicate the image browser dialog from Oxygen XML Editor you have to override the built-in "insert.image" action with a custom action that shows a dialog using the sync.api.Workspace.createDialog API method and that adds needed inputs. For the browsing part you can use the sync.api.Workspace.getUrlChooser API.
See also the Implementing a Custom Action and Presenting a Dialog to the User tutorials.
Then you have to compute the XML fragment to be inserted and insert it by invoking ro.sync.ecss.extensions.commons.operations.InsertFragmentOperation, somewhat like this: actionsManager.invokeOperation("ro.sync.ecss.extensions.commons.operations.InsertFragmentOperation", {fragment: "test", insertLocation: "."})
Bogdan Dumitru
http://www.oxygenxml.com
http://www.oxygenxml.com
-
- Posts: 163
- Joined: Thu Aug 30, 2018 10:06 pm
Re: Replicate Insert Image Dialog from Oxygen XML Editor
Post by dreifsnider »
Hi Bogdan,
Thank you for your reply.
I will investigate using the createDialog() method to recreate the insert image dialog available in Oxygen XML Editor. I'm also grateful that there's tutorials for creating a dialog and implementing a custom action.
Is there a sample of the Oxygen XML Editor insert image dialog available anywhere? It would be much easier and time saving for us if the code to build the insert image dialog is already available. Just thought I'd ask.
Thanks again,
Daniel
Thank you for your reply.
I will investigate using the createDialog() method to recreate the insert image dialog available in Oxygen XML Editor. I'm also grateful that there's tutorials for creating a dialog and implementing a custom action.
Is there a sample of the Oxygen XML Editor insert image dialog available anywhere? It would be much easier and time saving for us if the code to build the insert image dialog is already available. Just thought I'd ask.

Thanks again,
Daniel
-
- Site Admin
- Posts: 170
- Joined: Tue Mar 20, 2018 5:28 pm
Re: Replicate Insert Image Dialog from Oxygen XML Editor
Post by Bogdan Dumitru »
Hi Daniel,
Unfortunately, the code from the insert image dialog from Oxygen XML Editor isn't available. But you might find it useful to browse the repository with sample plugins: https://github.com/oxygenxml/web-author-sample-plugins/, you might find useful examples there.
Unfortunately, the code from the insert image dialog from Oxygen XML Editor isn't available. But you might find it useful to browse the repository with sample plugins: https://github.com/oxygenxml/web-author-sample-plugins/, you might find useful examples there.
Bogdan Dumitru
http://www.oxygenxml.com
http://www.oxygenxml.com
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service