neorg icon indicating copy to clipboard operation
neorg copied to clipboard

Excalidraw support for neorg

Open Vaisakhkm2625 opened this issue 2 years ago • 0 comments

Issues

  • [X] I have checked existing issues and there are no existing ones with the same request.

Feature description

excalidraw support would be a nice addition for neorg

these could be nice features if it is going to be implimented

  • preview .excalidraw files within buffer
  • preview .excalidraw is neorg-preview when it comes out
  • Embudding it as a possibly editable png when exporting neorg to markdown/pdf/html
  • shortcut to quickly open a new .excalidraw file in browser and edit it..., and when we save, it convert back to png and saved on disk
  • editing already embudded drawings in the future..

Help

Yes

Implementation help

This does not seems hard to implement as image support for neorg is available with image.nvim, and there are few cli tools already available for converting excalidraw to svg/pdf,

https://github.com/Timmmm/excalidraw_export#readme https://github.com/tommywalkie/excalidraw-cli

also see https://github.com/excalidraw/excalidraw/issues/1261

which is almost same way as adding latex support for neorgsee this branch... most latex tools only convert to dvi/pdf, which we need to convert to png for hologram or image.nvim. pdf to png convertion can be done by pdftocairo utility.

pdftocairo -transp -singlefile pdfOutputFromAnytool.pdf -png output.png 

for implimentation details, checkout hologram-math-preview.nvim specifically, see here

Edit: excalidraw-cli, even though it's old and dependencies are deprecated, directly generates png files...

Vaisakhkm2625 avatar Aug 06 '23 09:08 Vaisakhkm2625