github zsviczian/obsidian-excalidraw-plugin 1.3.0
Excalidraw 1.3.0

latest releases: 2.15.3-beta-2, 2.15.3-beta-1, 2.15.2...
4 years ago

New Features

I have extended ExcalidrawAutomate with functions that allow a script to directly add elements to an active Excalidraw View. This paves the way to feature-rich Excalidraw macros, such as adding activities to a flowchart.

2021-09-03.09-24-32.mp4

These are the new functions:

getElements():ExcalidrawElement[];
getElement(id:string):ExcalidrawElement;
//View Manipulation
targetView: ExcalidrawView;
setView(view:ExcalidrawView|"first"|"active"):ExcalidrawView;
getExcalidrawAPI():any;
getViewSelectedElement():ExcalidrawElement;
connectObjectWithViewSelectedElement(
  objectA:string,
  connectionA: ConnectionPoint, 
  connectionB: ConnectionPoint, 
  formatting?: { 
    numberOfPoints?: number,
    startArrowHead?:string,
    endArrowHead?:string, 
    padding?: number
}):boolean;
addElementsToView(repositionToCursor:boolean, save:boolean):Promise<boolean>;

You can find further details about the API functions here: https://zsviczian.github.io/obsidian-excalidraw-plugin/#api-documentation

Don't miss a new obsidian-excalidraw-plugin release

NewReleases is sending notifications on new releases.