question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Discussion: Excalidraw as an API

See original GitHub issue

I am interested in using excalidraw as an API:

  • Integrating inside a website (besides embedding iframe)
  • Collecting the output of a board programmatically
  • Drawing something: excalidraw.draw(JSON copied from the tool)

This is how i imagine it to be used in a React app:

import Excalidraw from 'excalidraw'

function MyComponent(){
  const [data, setData] = useState({});
  return (
            <Excalidraw value={data} onChange={setData} />
  )
}

data has the format of excalidraw files.

Notes

  • As a first implementation, we won’t implement anything else.
  • Later we can add
    • a way to export to an image. const base64Image = getImageFromExcalidrawData(data)
    • a way to change controls. (remove the rectangle button or add a new one, or customize the look and feel of the buttons)
    • utilities to draw something in the board. data = createCircle(data, options)
    • adding new controls (insert in the current board) …

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:7
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

2reactions
ad1992commented, Dec 15, 2020

closing this as now we have published @excalidraw/excalidraw 🎉

2reactions
dwellecommented, Apr 18, 2020

Let’s do it!

Read more comments on GitHub >

github_iconTop Results From Across the Web

One Year of Excalidraw
In this post, we'll go over the most important features that made Excalidraw great at being a virtual whiteboard for sketching hand-drawn like ......
Read more >
Tweets with replies by Excalidraw (@excalidraw ... - Twitter
excalidraw.com Joined January 2020 ... Excalidraw natively on GitHub soon. Quote Tweet ... Please DM us to discuss the particulars! excalidraw.com.
Read more >
Slite - Product Information, Latest Updates, and Reviews 2022
Slite Discussions. Docs + decision making for remote teams. 593. 119. •. 7mo. Slite + Excalidraw. Add sketches to all your docs, wiki,...
Read more >
Excalidraw - Visual Studio Marketplace
This extension integrates Excalidraw into VS Code. ... In case of uncertainty, create a thread in the project Discussion Page.
Read more >
How to export Excalidraw Diagram via Plugin - Questions & Help
Weiß jemand, wie ich Excalidraw-Diagramme in mein Plugin ... we need method in Logseq plugin API what adds local asset (in my case...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found