Add JavaScript Function To Menu
Are you missing a feature? Request its implementation here.
-
- Posts: 23
- Joined: Sun Jan 15, 2017 3:15 pm
- Location: Salem, Oregon
Add JavaScript Function To Menu
I've searched around and only found that I could add a JavaScript function call to the contextual pop-up menu. I could not find anything about adding to a Document Association menu or the Application's main menu.
I would like to be able to add a menu item on the topmost Menu, e.g. OurCompany, and then add submenu choices that invoke JavaScript.
Example:
...Document Window OurCompany Help
submenu1
submenu2
submenu2.1
submenu2.2
I'm guessing I might be able to accomplish the menu build-out in Java, but the question then becomes how do I tie my JavaScript code to the submenus?
I would like to be able to add a menu item on the topmost Menu, e.g. OurCompany, and then add submenu choices that invoke JavaScript.
Example:
...Document Window OurCompany Help
submenu1
submenu2
submenu2.1
submenu2.2
I'm guessing I might be able to accomplish the menu build-out in Java, but the question then becomes how do I tie my JavaScript code to the submenus?
-
- Posts: 9434
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Add JavaScript Function To Menu
Hi,
If we take as an example this Javascript code which adds the action to a popup menu for the Author visual editing mode:
https://github.com/oxygenxml/wsaccess-j ... sAccess.js
there is also a "customizeAuthorPageExtensionMenu" callback which would allow you to customize the framework-specific menu:
https://www.oxygenxml.com/InstData/Edit ... mizer.html
If you want to add a main menu on the main menu bar you can use the API:
https://www.oxygenxml.com/InstData/Edit ... ustomizer-
if you cannot get this to work in the Javascript code I can try to create a sample plugin for you.
Regards,
Radu
If we take as an example this Javascript code which adds the action to a popup menu for the Author visual editing mode:
https://github.com/oxygenxml/wsaccess-j ... sAccess.js
there is also a "customizeAuthorPageExtensionMenu" callback which would allow you to customize the framework-specific menu:
https://www.oxygenxml.com/InstData/Edit ... mizer.html
If you want to add a main menu on the main menu bar you can use the API:
https://www.oxygenxml.com/InstData/Edit ... ustomizer-
if you cannot get this to work in the Javascript code I can try to create a sample plugin for you.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
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