New Features
- New front matter tag:
excalidraw-onload-script
. The value of this field will be executed as javascript code using the Script Engine environment. Use this to initiate custom actions or logic when loading your drawing. - New ExcalidrawAutomate function:
isExcalidrawView(view: any): boolean;
deregisterThisAsViewEA():boolean;
onViewUnloadHook: (view: ExcalidrawView) => void;
- Added
view: ExcalidrawView, ea: ExcalidrawAutomate
to hooks.
onViewModeChangeHook(isViewModeEnabled:boolean, view: ExcalidrawView, ea: ExcalidrawAutomate): void;
onLinkHoverHook(
element: NonDeletedExcalidrawElement,
linkText: string,
view: ExcalidrawView,
ea: ExcalidrawAutomate
):boolean;
onLinkClickHook(
element: ExcalidrawElement,
linkText: string,
event: MouseEvent,
view: ExcalidrawView,
ea: ExcalidrawAutomate
): boolean;
- Added padding as optional parameter to ExcalidrawAutomte.createSVG
async createSVG(
templatePath?: string,
embedFont: boolean = false,
exportSettings?: ExportSettings,
loader?: EmbeddedFilesLoader,
theme?: string,
padding?: number,
): Promise<SVGSVGElement>