Custom Toolbar List Menu action
Having trouble deploying Oxygen XML Web Author? Got a bug to report? Post it all here.
-
- Posts: 10
- Joined: Mon Aug 23, 2021 4:26 pm
Custom Toolbar List Menu action
I have successfully added the custom toolbar action list on DITA toolbar. And now my custom toolbar list is showing in the DITA toolbar but in the drop-down menu there are no items is showing.
So Can you please tell me how can I add n items to my custom toolbar list menu? With the help of the Javascript Plugin
I am attaching the screenshot for the same.
Implemented Code:
goog.events.listen(editor, sync.api.Editor.EventTypes.ACTIONS_LOADED, function(e) {
var actionsConfig = e.actionsConfiguration;
var ditaToolbar = null;
if (actionsConfig.toolbars) {
for (var i = 0; i < actionsConfig.toolbars.length; i++) {
var toolbar = actionsConfig.toolbars;
console.log(toolbar);
if (toolbar.name === "DITA") {
ditaToolbar = toolbar;
}
}
}
if (ditaToolbar) {
ditaToolbar.children.push({
children: [
{id: "covh1", type: "action"},
{id: "covh2", type: "action"},
{id: "covh3", type: "action"},
{id: "covh4", type: "action"},
],
name: actionId,
type: "list"
});
}
});
So Can you please tell me how can I add n items to my custom toolbar list menu? With the help of the Javascript Plugin
I am attaching the screenshot for the same.
Implemented Code:
goog.events.listen(editor, sync.api.Editor.EventTypes.ACTIONS_LOADED, function(e) {
var actionsConfig = e.actionsConfiguration;
var ditaToolbar = null;
if (actionsConfig.toolbars) {
for (var i = 0; i < actionsConfig.toolbars.length; i++) {
var toolbar = actionsConfig.toolbars;
console.log(toolbar);
if (toolbar.name === "DITA") {
ditaToolbar = toolbar;
}
}
}
if (ditaToolbar) {
ditaToolbar.children.push({
children: [
{id: "covh1", type: "action"},
{id: "covh2", type: "action"},
{id: "covh3", type: "action"},
{id: "covh4", type: "action"},
],
name: actionId,
type: "list"
});
}
});
Screenshot from 2021-08-27 13-00-38.png
And after adding the menu items into the drop-down list. How I get the user-selected item from the drop-down with the help of JS pluginScreenshot from 2021-08-27 13-00-45.png
You do not have the required permissions to view the files attached to this post.
-
- Site Admin
- Posts: 95
- Joined: Thu Jun 09, 2016 2:01 pm
Re: Custom Toolbar List Menu action
Post by Gabriel Titerlea »
This is a duplicate post.
You can find the answer on the original question here: post63258.html#p63258
You can find the answer on the original question here: post63258.html#p63258
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