Click to watch the intro video:
Warning There is an easier way to install/manage scripts than what is shown in this video
See the Excalidraw Script Engine documentation for more details.
To install one of the built-in scripts:
- Open up an excalidraw drawing in Obsidian
- In the pane dropdown menu select "Install or update Excalidraw Scripts"
- Click on one of the available scripts
- Click on "Install this script" (note if the script is already installed you will instead see an option to update it)
- Restart Obsidian so the script will be picked up
Note: By default this will install the script into your vault in the Excalidraw/Scripts/Downloaded
folder
Manual installation of scripts
Open the script you are interested in and save it to your Obsidian Vault including the first line /*
, or open it in "Raw" and copy the entire contents to Obsidian.
Title | Description | Icon | Contributor |
---|---|---|---|
Add Connector Point | This script will add a small circle to the top left of each text element in the selection and add the text and the "bullet point" into a group. | @zsviczian | |
Add Link to Existing File and Open | Prompts for a file from the vault. Adds a link to the selected element pointing to the selected file. You can control in settings to open the file in the current active pane or an adjacent pane. | @zsviczian | |
Add Link to New Page and Open | Prompts for filename. Offers option to create and open a new Markdown or Excalidraw document. Adds link pointing to the new file, to the selected objects in the drawing. You can control in settings to open the file in the current active pane or an adjacent pane. | @zsviczian | |
Add Next Step in Process | This script will prompt you for the title of the process step, then will create a stick note with the text. If an element is selected then the script will connect this new step with an arrow to the previous step (the selected element). If no element is selected, then the script assumes this is the first step in the process and will only output the sticky note with the text that was entered. | @zsviczian | |
Split Ellipse | With This Script it is possible to make boolean Operations on Shapes. | @GColoy | |
Box Each Selected Groups | This script will add encapsulating boxes around each of the currently selected groups in Excalidraw. | @1-2-3 | |
Box Selected Elements | This script will add an encapsulating box around the currently selected elements in Excalidraw. | @zsviczian | |
Change shape of selected elements | The script allows you to change the shape of selected Rectangles, Diamonds and Ellipses | @zsviczian | |
Connect elements | This script will connect two objects with an arrow. If either of the objects are a set of grouped elements (e.g. a text element grouped with an encapsulating rectangle), the script will identify these groups, and connect the arrow to the largest object in the group (assuming you want to connect the arrow to the box around the text element). | @zsviczian | |
Convert freedraw to line | Convert selected freedraw objects into editable lines. This will allow you to adjust your drawings by dragging line points and will also allow you to select shape fill in case of enclosed lines. You can adjust conversion point density in settings | @zsviczian | |
Convert selected text elements to sticky notes | Converts selected plain text elements to sticky notes with transparent background and transparent stroke color. Essentially converts text element into a wrappable format. | @zsviczian | |
Convert text to link with folder and alias | Converts text elements to links pointing to a file in a selected folder and with the alias set as the original text. The script will prompt the user to select an existing folder from the vault. | original text => [[selected folder/original text|original text]] |
@zsviczian |
Copy Selected Element Styles to Global | This script will copy styles of any selected element into Excalidraw's global styles. | @1-2-3 | |
Create new markdown file and embed into active drawing | The script will prompt you for a filename, then create a new markdown document with the file name provided, open the new markdown document in an adjacent pane, and embed the markdown document into the active Excalidraw drawing. | @zsviczian | |
Darken background color | This script darkens the background color of the selected element by 2% at a time. You can use this script several times until you are satisfied. It is recommended to set a shortcut key for this script so that you can quickly try to DARKEN and LIGHTEN the color effect. In contrast to the Modify background color opacity script, the advantage is that the background color of the element is not affected by the canvas color, and the color value does not appear in a strange rgba() form. |
@1-2-3 | |
Elbow connectors | This script converts the selected connectors to elbows. | @1-2-3 | |
Expand rectangles horizontally keep text centered | This script expands the width of the selected rectangles until they are all the same width and keep the text centered. | @1-2-3 | |
Expand rectangles horizontally | This script expands the width of the selected rectangles until they are all the same width. | @1-2-3 | |
Expand rectangles vertically keep text centered | This script expands the height of the selected rectangles until they are all the same height and keep the text centered. | @1-2-3 | |
Expand rectangles vertically | This script expands the height of the selected rectangles until they are all the same height. | @1-2-3 | |
Fixed horizontal distance between centers | This script arranges the selected elements horizontally with a fixed center spacing. | @1-2-3 | |
Fixed inner distance | This script arranges selected elements and groups with a fixed inner distance. | @1-2-3 | |
Fixed spacing | The script arranges the selected elements horizontally with a fixed spacing. When we create an architecture diagram or mind map, we often need to arrange a large number of elements in a fixed spacing. Fixed spacing and Fixed vertical Distance scripts can save us a lot of time. |
@1-2-3 | |
Fixed vertical distance between centers | This script arranges the selected elements vertically with a fixed center spacing. | @1-2-3 | |
Fixed vertical distance | The script arranges the selected elements vertically with a fixed spacing. When we create an architecture diagram or mind map, we often need to arrange a large number of elements in a fixed spacing. Fixed spacing and Fixed vertical Distance scripts can save us a lot of time. |
@1-2-3 | |
Lighten background color | This script lightens the background color of the selected element by 2% at a time. You can use this script several times until you are satisfied. It is recommended to set a shortcut key for this script so that you can quickly try to DARKEN and LIGHTEN the color effect.In contrast to the Modify background color opacity script, the advantage is that the background color of the element is not affected by the canvas color, and the color value does not appear in a strange rgba() form. |
@1-2-3 | |
Mindmap connector | This script creates mindmap like lines (only right side and down available currently) for selected elements. The line will start according to the creation time of the elements. So you should create the header element first. | @xllowl | |
Modify background color opacity | This script changes the opacity of the background color of the selected boxes. The default background color in Excalidraw is so dark that the text is hard to read. You can lighten the color a bit by setting transparency. And you can tweak the transparency over and over again until you're happy with it. Although excalidraw has the opacity option in its native property Settings, it also changes the transparency of the border. Use this script to change only the opacity of the background color without affecting the border. | @1-2-3 | |
Normalize Selected Arrows | This script will reset the start and end positions of the selected arrows. The arrow will point to the center of the connected box and will have a gap of 8px from the box. | @1-2-3 | |
OCR - Optical Character Recognition | The script will 1) send the selected image file to taskbone.com to extract the text from the image, and 2) will add the text to your drawing as a text element. | @zsviczian | |
Organic Line | Converts selected freedraw lines such that pencil pressure will decrease from maximum to minimum from the beginning of the line to its end. The resulting line is placed at the back of the layers, under all other items. Helpful when drawing organic mindmaps. | @zsviczian | |
Repeat Elements | This script will detect the difference between 2 selected elements, including position, size, angle, stroke and background color, and create several elements that repeat these differences based on the number of repetitions entered by the user. | @1-2-3 | |
Reset LaTeX Size | Reset the sizes of embedded LaTeX equations to the default sizes or a multiple of the default sizes. | @firai | |
Reverse arrows | Reverse the direction of arrows within the scope of selected elements. | @zsviczian | |
Scribble Helper | iOS scribble helper for better handwriting experience with text elements. If no elements are selected then the creates a text element at pointer position and you can use the edit box to modify the text with scribble. If a text element is selected then opens the input prompt where you can modify this text with scribble. | @zsviczian | |
Select Elements of Type | Prompts you with a list of the different element types in the active image. Only elements of the selected type will be selected on the canvas. If nothing is selected when running the script, then the script will process all the elements on the canvas. If some elements are selected when the script is executed, then the script will only process the selected elements. The script is useful when, for example, you want to bring to front all the arrows, or want to change the color of all the text elements, etc. |
@zsviczian | |
Set background color of unclosed line object by adding a shadow clone | Use this script to set the background color of unclosed (i.e. open) line objects by creating a clone of the object. The script will set the stroke color of the clone to transparent and will add a straight line to close the object. Use settings to define the default background color, the fill style, and the strokeWidth of the clone. By default the clone will be grouped with the original object, you can disable this also in settings. | @zsviczian | |
Set Dimensions | Currently there is no way to specify the exact location and size of objects in Excalidraw. You can bridge this gap with the following simple script. | @zsviczian | |
Set Font Family | Sets font family of the text block (Virgil, Helvetica, Cascadia). Useful if you want to set a keyboard shortcut for selecting font family. | @zsviczian | |
Set Grid | The default grid size in Excalidraw is 20. Currently there is no way to change the grid size via the user interface. This script offers a way to bridge this gap. | @zsviczian | |
Set Link Alias | Iterates all of the links in the selected TextElements and prompts the user to set or modify the alias for each link found. | @zsviczian | |
Set stroke width of selected elements | This script will set the stroke width of selected elements. This is helpful, for example, when you scale freedraw sketches and want to reduce or increase their line width. | @zsviczian | |
Split text by lines | Split lines of text into separate text elements for easier reorganization | @zsviczian | |
Set Text Alignment | Sets text alignment of text block (cetner, right, left). Useful if you want to set a keyboard shortcut for selecting text alignment. | @zsviczian | |
Split Ellipse | This script splits an ellipse at any point where a line intersects it. | @GColoy | |
TheBrain-navigation | An Excalidraw based graph user interface for your Vault. Requires the Dataview plugin. Generates a graph view similar to that of TheBrain plex. Watch introduction to this script on YouTube. | @zsviczian | |
Toggle Fullscreen on Mobile | Hides Obsidian workspace leaf padding and header (based on option in settings, default is "hide header" = false) which will take Excalidraw to full screen. ⚠ Note that if the header is not visible, it will be very difficult to invoke the command palette to end full screen. Only hide the header if you have a keyboard or you've practiced opening command palette! | @zsviczian | |
Toggle Grid | Toggles the grid. | @GColoy | |
Transfer TextElements to Excalidraw markdown metadata | The script will delete the selected text elements from the canvas and will copy the text from these text elements into the Excalidraw markdown file as metadata. This means, that the text will no longer be visible in the drawing, however you will be able to search for the text in Obsidian and find the drawing containing this image. | @zsviczian | |
Zoom to Fit Selected Elements | Similar to Excalidraw standard SHIFT+2 feature: Zoom to fit selected elements, but with the ability to zoom to 1000%. Inspiration: #272 | @zsviczian | |
Hardware Eraser Suppoer | Allows the use of pen inversion/hardware erasers on supported pens. | @threethan | |
Hardware Eraser Suppoer | Automatically switched from the Select tool to the Draw tool when a pen is hovered, and then back. | @threethan |