Insert Icon to custom framework action

Post here questions and problems related to oXygen frameworks/document types.
pramanikhimangshu
Posts: 16

Insert Icon to custom framework action

Tue Jan 23, 2018 11:12 am

Hello,

I created a custom framework action and added it to DITA toolbar and context-menu.
Please guide me how to add an icon to the action.

Thank You.
Regards,
Himangshu.
mihaela
Posts: 179

Re: Insert Icon to custom framework action

Wed Jan 24, 2018 5:41 pm

Hi,

You must override the getLargeIcon(devicePixelRation) and getSmallIcon(devicePixelRation) methods from sync.actions.AbstractAction [1] to provide the absolute URL of the toolbar and contextual menu icons.
The icons must be placed in the web/ sub-folder of the framework. To obtain the absolute URL of the icon you must concatenate sync.ext.Registry.extensionURL[2] with the relative path of the icon to the web/ sub-folder.

[1] https://www.oxygenxml.com/maven/com/oxy ... ction.html
[2] https://www.oxygenxml.com/maven/com/oxy ... tensionURL

Best Regards,
Mihaela
Mihaela Calotescu
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com

Return to “SDK-API, Frameworks - Document Types”

Who is online

Users browsing this forum: No registered users and 0 guests