static: addIcons
Release 2.6.0 and above.
Adds icon resources to the editor.
If an icon with the same key exists, it is overwritten. You can use this to change icons that have already been set.
Parameters:
| Name | Type | Description |
|---|---|---|
iconResources | Object | key: icon name, value: a string in SVG tag or IMG tag format. |
Example:
var iconResources = {
// IMG tag format
'image': '<img src="data:image/png;base64,iVBORw0KGgoAA.......BJRU5ErkJggg==">',
// SVG tag format (the SVG tag must not have width and height attributes)
'bold': '<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 16 16"><rect y="6.062" width="16" height="4"/></svg>',
......
};
SynapEditor.addIcons(iconResources);