Skip to main content

Editor.Icon

Class

An icon to be used in the Editor UI.

Index

Example

const pathToIconFromPlugin = import.meta.resolve('icon.svg');
Editor.Icon.fromFile(pathToIconFromPlugin);

Methods

fromFile()

static fromFile(absoluteFilePath): Icon

Creates an icon from an SVG file.

Parameters

ParameterType
absoluteFilePathPath

Returns

Icon


fromSvgData()

static fromSvgData(buffer): Icon

Creates an icon from a buffer containing SVG data.

Parameters

ParameterType
bufferstring

Returns

Icon