zmarkdown icon indicating copy to clipboard operation
zmarkdown copied to clipboard

Add support of base64 image

Open Heziode opened this issue 4 years ago • 7 comments

Support of base64 image could be useful.

For HTML part (Rehype) it shouldn’t be a problem. For LaTeX, this will require to convert the image into a binary file and use the path of the image into the generated LaTeX file (IHMO). For Epub, I don’t know…

Heziode avatar Jun 11 '20 07:06 Heziode

For Epub, I don’t know…

this is HTML. So you can use the rehype behaviour.

artragis avatar Jun 11 '20 07:06 artragis

For LaTeX, I think we can add this to remark-image-download.

LikaKavkasidze avatar Jun 11 '20 18:06 LikaKavkasidze

Hello :wave:

I am seeing this issue again after a while, and apart from how we could implement it, I am wondering if it is really needed. Do you have an use case for this?

LikaKavkasidze avatar Jul 08 '22 18:07 LikaKavkasidze

I don't remember clearly, but it is probably to working in offline mode (without internet). Or maybe with image generated by software like Draw.io where we do not want to point to an URL / file.

Heziode avatar Jul 08 '22 21:07 Heziode

Working in offline mode isn't possible on the ZdS editor by now, because request are sent to the ZMarkdown server to get the rendered content. For generated images, I guess it could be useful, but I do not think it is really worth it, uploading an image takes very little time for the user. It would require a lot of efforts from us, for something that will be used by very few people, if any...

LikaKavkasidze avatar Aug 14 '22 11:08 LikaKavkasidze

@StaloneLab even if ZMarkdown is originally designed for ZdS, keep in mind that it can also be used by people in other manner, different editors, etc. (the joy of open-source)

Heziode avatar Aug 14 '22 14:08 Heziode

That is indeed true. However, even if it can be used externally, it has not been made for this usage (although we do welcome and help people trying to install it), and new functionalities are implemented depending on the needs of ZdS. Note that this is not true for the plugins individually, which are made to be (and are) used externally. People requiring additional plugins may therefore develop their own ones and use the plugins we provide as part of their rendering engine.

Occasionally, we can accept PR for new functionalities if we feel these are nice to have on ZdS, and are ready to maintain them, but never have we developed plugins for external uses. So, back to the question, I'm doubting here both: 1. that it will be useful for ZdS (and therefore that we want to develop it) and 2. that it should go into ZMarkdown at all, knowing that it is not needed at all by us, and likely complicated to maintain.

LikaKavkasidze avatar Aug 14 '22 14:08 LikaKavkasidze