'Render `.excalidraw` file in `README.md`
I have created an Excalidraw figure and saved it as a .excalidraw file. To render the figure in GitLab, it is possible to open the file in an editor and then paste the code into the README.md as
```excalidraw
// excalidraw code
```
However, Excalidraw produces a large amount of code, and the code is pretty unreadable, which makes the README.md messy.
Is there a way to include the render the .excalidraw file directly? More precisely, can I add the .excalidraw file to the project and then render with something like
```excalidraw
myFigure.excalidraw
```
Solution 1:[1]
Unless gitlab adds support to render .excalidraw-content, you cannot.
However, you are be able to export it as SVG/PNG and include the scene data in the file. With this approach, you have a nicely rendered Markdown file, because you just include an image, and you are also able to edit the image/scene again with excalidraw.
Top right Corner: "Save as image" -> Tick "Embed Scene" -> Save as PNG/SVG.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Tom Free |
