Fixed
- Styling of custom pens and script buttons was inverted compared to default Obsidian buttons. Now it looks more consistent.
- Minor tweaks to dynamic styling. see this video to understand dynamic styling
New
- Scripts by @threethan:
- Auto Draw for Pen: Automatically switches between the select and draw tools, based on whether a pen is being used.
- Hardware Eraser Support: Adds support for pen inversion, a.k.a. the hardware eraser on the back of your pen.
- Added separate buttons to support copying link, area or group references to objects on the drawing. #1063. See this video for more details on how this works.
- Hover preview will not trigger for image files (.png, .svg, .jpg, .gif, .webp, .bmp, .ico, .excalidraw)
- Minor updates to the Slideshow script. You can download the updated script from the Excalidraw script library. The slideshow will now correctly run in a popout window. When the drawing is in a popout window, the slideshow will not be full screen, but will only occupy the popout window. If you run the slideshow from the main Obsidian workspace, it will be displayed in full-screen mode.
- Updated the Icon Library script to now include image keywords. I've uploaded the new script here: https://gist.github.com/zsviczian/33ff695d5b990de1ebe8b82e541c26ad If you need further information watch this video
New in ExcalidrawAutomate
addText
formatting
parameter now acceptsboxStrokeColor
andtextVerticalAlign
values.
addText(
topX: number,
topY: number,
text: string,
formatting?: {
wrapAt?: number;
width?: number;
height?: number;
textAlign?: "left" | "center" | "right";
box?: boolean | "box" | "blob" | "ellipse" | "diamond";
boxPadding?: number;
boxStrokeColor?: string;
textVerticalAlign?: "top" | "middle" | "bottom";
},
id?: string,
): string;
- new
onFileOpenHook
. If set, this callback is triggered, when an Excalidraw file is opened. You can use this callback in case you want to do something additional when the file is opened. This will run before the file level script defined in theexcalidraw-onload-script
frontmatter is executed. Excalidraw will await the result of operations here. Handle with care. If you change data such as the frontmatter of the underlying file, I haven't tested how it will behave.
onFileOpenHook: (data: {
ea: ExcalidrawAutomate;
excalidrawFile: TFile; //the file being loaded
view: ExcalidrawView;
}) => Promise<void>;