Is there a way to add a new option to menu save?
And capture the click event of that button?
Basically i want to do a personalized export function...
Thanks
JB
add new option to menu save
Re: add new option to menu save
Sorry. Found it in a post!
JB
JB
Re: add new option to menu save
One problem: When i add the option, the icon doesnt show... the style is display:none
How can i avoid this?
var saveMenu = viewer.jsObject.controls.menus.saveMenu;
var customSaveItem = viewer.jsObject.VerticalMenuItem(saveMenu, "myItemName", "certificate", "certificate.png", "customItemKey");
saveMenu.innerContent.appendChild(customSaveItem);
customSaveItem.image.src = "........img/certificate.png"
How can i avoid this?
var saveMenu = viewer.jsObject.controls.menus.saveMenu;
var customSaveItem = viewer.jsObject.VerticalMenuItem(saveMenu, "myItemName", "certificate", "certificate.png", "customItemKey");
saveMenu.innerContent.appendChild(customSaveItem);
customSaveItem.image.src = "........img/certificate.png"
-
- Posts: 6271
- Joined: Tue Mar 20, 2018 5:34 am
Re: add new option to menu save
Hello,
//if you need add image to item, for example:
viewer.jsObject.collections.images["customImageName"] = "https://www.stimulsoft.com/templates/st ... es/usa.png";
var customSaveItem = viewer.jsObject.VerticalMenuItem(saveMenu, "itemName", "Item Text", "customImageName"/*or null*/ , "itemKey");
Thank you.
//if you need add image to item, for example:
viewer.jsObject.collections.images["customImageName"] = "https://www.stimulsoft.com/templates/st ... es/usa.png";
var customSaveItem = viewer.jsObject.VerticalMenuItem(saveMenu, "itemName", "Item Text", "customImageName"/*or null*/ , "itemKey");
Thank you.
- Attachments
-
- viewer.zip
- (1.13 KiB) Downloaded 97 times