
onChangeĮvery time component updates, this callback if passed will get triggered and has the below signature. This prop if passed will be triggered when link of an element is clickedĮxcalidraw takes 100% of width and height of the containing block so make sure the container in which you render Excalidraw has non zero dimensions. (element: NonDeletedExcalidrawElement, event: CustomEvent) Implies whether to focus the Excalidraw component on page loadĪllows you to override id generation for files added on canvas The callback if supplied is triggered when the library is updated and receives the library items. Indicates whether to bind the keyboard events to document. Indicates whether to update the offsets when nearest ancestor is scrolled. (data: ClipboardData, event: ClipboardEvent | null) => booleanĬallback to be triggered if passed when the something is pasted in to the scene Currently we support customising canvas actions This implies if the app is in collaboration modeĬallback triggered when mouse pointer is updated.įunction that renders custom UI in top right cornerįunction that can be used to render custom stats on the stats dialog. If you are using a Web bundler (for instance, Webpack), you can import it as an ES6 module as shown below View Example import React, Ĭallback to be triggered when the collab button is clicked

If you don't want to wait for the next stable release and try out the unreleased changes you can use Demo Move the folder excalidraw-assets and excalidraw-assets-dev to the path where your assets are served.īy default it will try to load the files from you want to load assets from a different path you can set a variable window.EXCALIDRAW_ASSET_PATH depending on environment (for example if you have different URL's for dev and prod) to the url from where you want to load the assets.
#Unpkg import usestate from react install
You can use npm npm install react react-dom via yarn yarn add react react-dom installation you will see a folder excalidraw-assets and excalidraw-assets-dev in dist directory which contains the assets needed for this app in prod and dev mode respectively. Excalidraw exported as a component to directly embed in your projects.
