2021-05-08 20:33:04 +02:00
2021-05-08 20:33:04 +02:00
2021-05-02 21:30:41 +02:00
2021-04-22 10:25:48 +02:00
2021-04-28 16:08:21 +02:00
.
2021-05-08 09:56:07 +02:00
2021-05-02 21:30:41 +02:00
2021-05-08 07:46:10 +02:00
2021-05-06 09:16:16 +02:00
2021-05-02 21:30:41 +02:00

Obsidian Excalidraw Plugin

The Obsidian-Excalidraw plugin integrates Excalidraw, a feature rich sketching tool, into Obsidian. You can store and edit Excalidraw files in your vault and you can transclude drawings into your documents. For a showcase of Excalidraw features, please read my blog post here.

See details of the 1.0.6, 1.0.7 and 1.0.8 releases including a short video, further below

image

Key features

  • The plugin adds the following actions to the command palette:
    • To create a new drawing
    • To find and edit existing drawings in your vault,
    • To embed (transclude) a drawing into a document, and
    • To export a drawing as PNG or SVG.
  • You can also use the file explorer in your vault to open Excalidraw files.
  • Use the ribbon button to create a new drawing, do CTRL+Click to open on a new page.
  • Open settings to set up a default folder for new drawings.
  • Set up a Template by creating a drawing, customizing it the way you like it, and specifying the file as the template in settings.
  • The plugin saves drawings to your vault as a file with the .excalidraw file extension.
  • You can customize the size and position of the embedded image using the [[image.excalidraw|100]], [[image.excalidraw|100x100]], [[image.excalidraw|100|left]], [[image.excalidraw|right-wrap]], formatting options. [[<filename.excalidraw>|<width>x<height>|<alignment>]]. You can add your custom alignment via css. Any text that appears in <alignment> will be added as style to the SVG element and the wrapper DIV element. Check below and styles.css for more insight.
  • You can setup Excalidraw to automatically export SVG and/or PNG files for your drawings, and to keep those in sync with your drawing.
  • Includes full Templater support through ExcalidrawAutomate. Read detailed help + examples: here

How to?

Part 1: Intro to Obsidian-Excalidraw - Start a new drawing (3:12)

Part 1: Intro to Obsidian-Excalidraw - Start a new drawing

Part 2: Intro to Obsidian-Excalidraw - Basic features (6:06)

Part 2: Intro to Obsidian-Excalidraw - Basic features

Part 3: Intro to Obsidian-Excalidraw - Advanced features (3:26)

Part 3: Intro to Obsidian-Excalidraw - Advanced features

Part 4: Intro to Obsidian-Excalidraw - Setting up a template (1:45)

Part 4: Intro to Obsidian-Excalidraw - Setting up a template

Part 5: Intro to Obsidian-Excalidraw - Stencil Library (3:16)

Part 5: Intro to Obsidian-Excalidraw - Stencil Library

Part 6: Intro to Obsidian-Excalidraw: Embedding drawings (2:08)

Part 6: Intro to Obsidian-Excalidraw: Embedding drawings

1.0.6 and 1.0.7 update

1.0.6 Update

SVG styling when embedding using a code block

  • 1.0.7 adds further flexibility to styling
  • new formatting option for the code block embedding
  • Valid values: left, right, left-wrap, right-wrap... but anything after the last | character will be added to the class of the SVG element and the wrapper DIV element. Here is the corresponding CSS:
svg.excalidraw-svg-right-wrap {
  float: right;
  margin: 0px 0px 20px 20px;
}

svg.excalidraw-svg-left-wrap {
  float: left;
  margin: 0px 35px 20px 0px;
}

div.excalidraw-svg-right {
  text-align: right;
}

div.excalidraw-svg-left {
  text-align: left;
}

1.0.8 + 1.0.9 (minor fixes) update

Obsidian-Excalidraw 1.0.8 update

QoL improvements

  • Adds context menu to File Explorer to create new drawings
  • Adds a new command to the palette: “Transclude (embed) the most recently edited Excalidraw drawing”
  • Automatically update file-links in transclusions when you rename or move your drawing
  • Saves drawing and updates all active pre-views when drawing loses focus
  • File is closed and removed when you select “Delete file” from more options
  • Saves drawing when exiting Obsidian
  • Fixes pen positioning bug with sliding panes after panes scroll

ExcalidrawAutomte full Templater support

You now have ultimate flexibility over your Excalidraw templates using Templater.

  • Detailed documentation available here
  • I created few examples from the simple to the more complex
    • Simple use-case: Creating a drawing using a custom template and following a file and folder naming convention of your choice.
    • Complex use-case: Create a mindmap from a tabulated outline. Drawing 2021-05-05 20 52 34

Known issues

  • On mobile (iOS and Android): As you draw left to right it opens left sidebar. Draw right to left, opens right sidebar. Draw down, opens commands palette. So seems open is emulating the gestures, even when drawing towards the center. Obsidian mobile 0.18 has resolved this issue.
  • I have seen two cases when adding a stencil library did not work. In both cases, the end solution was a reinstall of Obsidian. The root cause is not clear, but maybe because of the incremental updates of Obsidian from an early version.
  • Mobile support
    • Positioning of the pen gets misaligned after you open the command palette.
    • Your drawing will not be saved when you terminate the mobile app by closing the Obsidian task.
  • Sync does not support .excalidraw files. This issue will be addressed in a later release of Obsidian sync. Until then, here are two hacks you can play with:
    • You have the option to use OneDrive, Google Drive, iCloud, DropBox, etc. to sync your vault between devices.
    • You can also use Obsidian Sync in conjunction with "Obsidian Git" (find it in community plugins). Be sure to set up git to ignore all files except for .excalidraw by adding the following to .gitignore. Obsidian Git does not work on mobile, but on Android you can use an app like MGIT to sync your .excalidraw files from/to the git repository.
    #ignore all kind of files
    *.*
    #except excalidraw files
    !*.excalidraw
    

Tips and tricks

Feedback, questions, ideas, problems

Join the conversation about the Excalidraw plugin on forum.obsidian.md

Please head over to GitHub to report a bug or request an enhancement.

Say Thank You

If you are enjoying Excalidraw then please support my work and enthusiasm by buying me a coffee on https://ko-fi/zsolt.

Please also help spread the word by sharing about the Obsidian Excalidraw Plugin on Twitter, Reddit, or any other social media platform you regularly use.

You can find me on Twitter @zsviczian, and on my blog zsolt.blog.

Description
No description provided
Readme 64 MiB
Languages
JavaScript 67.7%
TypeScript 32.1%
CSS 0.2%