Features
Done

Excalidraw embed

This thing is one thing that attracted me toward AnyType (although it was removed for some issues).

The implementation in AnyType was very sloppy and it needs to be rethought

Why

When creating notes, it is often that we need some diagrams that go with it and excalidraw provides an excellent editor for it.

My thoughts

Like mermaid code blocks, it could be a code block that is tagged excalidraw. It could then be rendered as the slides of frames. And an edit button or double click could open a full screen excalidraw for editing.

In the page, the frames doesn't have any UI (Rendered just like image)

4 Comments

Sign in to comment

D
Den
Den·about 11 hours ago

Thanks again for the detailed write-up, Alaz. It shaped the design directly. Excalidraw drawings are now implemented and in review, and here's how they address what you described:

  • Stored in the note itself. A drawing is a fenced ```excalidraw block holding the scene, so it travels with the page and other Markdown tools still see it as a code block.
  • Rendered like an image. In the page a drawing is a plain rendered image. There's no live editor, so scrolling the page never scrolls the drawing, and many drawings on one page stay light.
  • Frames as slides. If your drawing has frames, each frame is a slide, with previous/next arrows that appear on hover. Anything outside the frames gets a final "whole scene" slide. Without frames you see the whole drawing.
  • Full-screen editing. Double-click (or the Edit button) opens Excalidraw full screen, zoomed to fit your drawing rather than 100% at the origin. Press Done and the scene is saved back into the note.
  • Quick start. Type /excalidraw to start a new drawing.

Two limits in this first version: images inside drawings aren't supported yet, and Chinese, Japanese and Korean text in a drawing uses a system font instead of Excalidraw's handwritten one. We'll post here when it ships.

AO
Alaz Oz·about 10 hours ago

You are cooking fast. Love your speed ❤ and explanation.

AL
Alex Lins (Bao)·about 14 hours ago

Thanks for the detailed suggestion, Alaz. This is a thoughtful take on embedding diagrams alongside notes.

To help us scope this properly, a couple of clarifications:

  1. Workflow: When you say "edit button or double-click opens full-screen excalidraw" — are you picturing the diagram state stored within the code block itself (so edits persist in the page), or would it be more like opening an external tool and then re-importing the result?
  2. Frame rendering: You mentioned rendering as "slides of frames" — do you mean Excalidraw's native frame feature (multiple scenes), or just showing the full canvas as a single embedded view?
  3. Use cases: Beyond quick sketches alongside notes, what's the main friction point you hit with the AnyType implementation that made it feel sloppy? Knowing what didn't work helps us avoid the same pitfall.
AO
Alaz Oz·about 14 hours ago
  1. Yes, diagram state stored within the code block itself would be the target for storage. But the excalidraw editor could be external or internal. Both are fine till they save their edited state in the target code block itself. And it doesn't need to be code block, It is just that using code block is very extensible.
  2. I meant showing excalidraw's native frames (multiple scenes) as a slide (next, prev button to move between them). And if that doesn't exist, it could show the whole view. But it should only show the rendered image/svg and not the editor itself, which was the issue with AnyType as it interfered with the scroll input.
  3. Good question

The AnyType's implementation had these issues--
1. The editor was rendered in the page directly causing multiple editors per page and slowdowns.
2. Also, when scrolling through the page, one could accidentally scroll through the drawing itself, very annoying.
3. The editor tools obstructed the view and there was very little space to view the drawing itself.
4. The editor always had 100% zoom and centered at 0,0 which caused some elements to be out of the screen.