Editor.Icon
ClassAn icon to be used in the Editor UI.
Index
Methods
Example
const pathToIconFromPlugin = import.meta.resolve('icon.svg');
Editor.Icon.fromFile(pathToIconFromPlugin);
Methods
fromFile()
staticfromFile(absoluteFilePath):Icon
Creates an icon from an SVG file.
Parameters
| Parameter | Type |
|---|---|
absoluteFilePath | Path |
Returns
Icon
fromSvgData()
staticfromSvgData(buffer):Icon
Creates an icon from a buffer containing SVG data.
Parameters
| Parameter | Type |
|---|---|
buffer | string |
Returns
Icon