New
- Embeddable links now support adding ontology to links, e.g.
(ontology:: [[file#section]])and(ontology:: [Video Title](link-to-youtube-video)). This allows you to add custom metadata to links that will be picked up as dataview tags and rendered with tools such as ExcaliBrain.
Fixed
- Regression from security fixes: embed markdown as image failed in some cases
- Plugin settings now includes all available fonts when setting the default font when embedding markdown as image.
New in ExcalidrawAutomate
ea.zoomToElements()now accepts an optional margin parameter to control the amount of whitespace around the zoomed elements. The default margin is 0.05 (5% of the view size), but you can adjust it as needed for your specific use case.ea.cloneElements()function to clone elements with new IDs and updated relationships, useful for duplicating or moving elements without affecting the originals.
/**
* Zooms the target view to fit the specified elements.
* @param {boolean} selectElements - Whether to select the elements after zooming.
* @param {ExcalidrawElement[]} elements - Array of elements to zoom to.
* @param {number} [margin=0.05] - The margin around the elements when zooming.
*/
viewZoomToElements(selectElements: boolean, elements: ExcalidrawElement[], margin: number = 0.05): void;
/**
* Clones an array of Excalidraw elements or a clipboard string.
* Ensures that relationships (containers, bound elements, groups, bindings)
* are correctly remapped to the newly generated IDs.
*
* @param {ExcalidrawElement[] | string} elementsOrClipboard - The elements array or Excalidraw clipboard string.
* @returns {ExcalidrawElement[]} An array of cloned elements with new IDs and updated relationships.
*/
cloneElements(elementsOrClipboard: ExcalidrawElement[] | string): ExcalidrawElement[];Fixed in ExcalidrawAutomate
ea.addImage()now supports adding the markdown section of an Excalidraw file as an image.