submenu under the [b]Contextual Menu of the DITA Maps Manager[/b]
Post here questions and problems related to oXygen frameworks/document types.
-
- Posts: 168
- Joined: Fri Feb 28, 2020 4:02 pm
submenu under the [b]Contextual Menu of the DITA Maps Manager[/b]
Post by vishwavaranasi »
Hello Team , we wanted to have our own submenu under the Contextual Menu of the DITA Maps Manager
but it is not adding to the Contextual Menu of the DITA Maps Manager
image.png
We have tried editing the as belowbut it is not adding to the Contextual Menu of the DITA Maps Manager
image.png
You do not have the required permissions to view the files attached to this post.
Thanks,
vishwa
vishwa
-
- Posts: 9431
- Joined: Fri Jul 09, 2004 5:18 pm
Re: submenu under the [b]Contextual Menu of the DITA Maps Manager[/b]
Hi,
When you edit a framework configuration in the Preferences->"Document Type Associations" page and edit actions in the "Author" tab you only influence XML documents opened in the main editor in the Author visual editing mode. So you influence a DITA Map only if opened in a DITA Map.
For DITA Maps opened in the DITA Maps Manager you cannot use the framework configuration to customize the popup menu.
You do have API to customize the popup menu in the DITA Maps Manager view but only from a Workspace Access Oxygen Java plugin:
https://github.com/oxygenxml/sample-plu ... ace-access
Something like:
Regards,
Radu
When you edit a framework configuration in the Preferences->"Document Type Associations" page and edit actions in the "Author" tab you only influence XML documents opened in the main editor in the Author visual editing mode. So you influence a DITA Map only if opened in a DITA Map.
For DITA Maps opened in the DITA Maps Manager you cannot use the framework configuration to customize the popup menu.
You do have API to customize the popup menu in the DITA Maps Manager view but only from a Workspace Access Oxygen Java plugin:
https://github.com/oxygenxml/sample-plu ... ace-access
Something like:
Code: Select all
@Override
public void applicationStarted(StandalonePluginWorkspace pluginWorkspaceAccess) {
pluginWorkspaceAccess.addEditorChangeListener(new WSEditorChangeListener() {
@Override
public void editorOpened(URL editorLocation) {
WSDITAMapEditorPage ditaMapEditorPage = (WSDITAMapEditorPage) pluginWorkspaceAccess.getEditorAccess(editorLocation, PluginWorkspace.DITA_MAPS_EDITING_AREA);
ditaMapEditorPage.setPopUpMenuCustomizer(new DITAMapPopupMenuCustomizer() {
@Override
public void customizePopUpMenu(Object popUp, AuthorDocumentController ditaMapDocumentController) {
JPopupMenu menu = (JPopupMenu) popUp;
AuthorNode[] selectedNodes = ditaMapEditorPage.getSelectedNodes(true);
ditaMapDocumentController.insertXMLFragment("", selectedNodes[0].getStartOffset());
}
});
};
}, PluginWorkspace.DITA_MAPS_EDITING_AREA);
}
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 3
- Joined: Fri Nov 11, 2022 7:48 pm
Re: submenu under the [b]Contextual Menu of the DITA Maps Manager[/b]
Post by KevinGarcia99 »
Hi Radu, when I tried what you suggest I'm getting the following error when I open Oxygen:
image.png
Am I importing the wrong editor or something like that?You do not have the required permissions to view the files attached to this post.
Last edited by KevinGarcia99 on Thu Nov 24, 2022 5:56 am, edited 1 time in total.
Return to “SDK-API, Frameworks - Document Types”
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