Bug: inline images are not being exported to Markdown at all (verified in playground) and image captions are not exported to Markdown/DOM (instead some other text is used in alt)
I went to https://playground.lexical.dev/, inserted an inline image, it gets displayed okay. I then press the button for converting to Markdown. The markdown string contains no info about the image.
I understand that there often is no 1:1 correspondence between the JSON editor state and markdown, but images (inline or URL-based) can somehow be represented by markdown (e.g. by slightly abusing Markdown and using datauri in the  syntax or by returning a dictionary of attachment files along with markdown string which are then addressed by image tags)
I've checked, regular "Insert Image" (non-inline) gets converted to markdown using the datauri syntax, but somehow inline image is not. I think it'd be better in this case to trim the precise inline formatting and still preserve the presence of image instead of the current behavior of completely stripping the image (probably a markdown transformer for InlineImageNode would need to be added to packages/lexical-playground/src/plugins/MarkdownTransformers/index.ts).
( Basically, I'm looking to create some basic rich-text editor like https://telegra.ph (quill-based), but using markdown + file attachments as backend (e.g. thing a GitHub repo containing images and markdown files) )
Maybe the better compromise would be to convert these inline images in Markdown as regular images (even if at inverse conversion they would be come regular images and not inline images), or maybe as images with some minor custom HTML
After clicking on M↓ nothing gets exported to markdown at all:
Also, caption is not being exported to DOM for non-inline images:
I would propose an option that image caption be exported as alt (at least for markdown it makes more sense). For DOM, maybe it can be exported as <figure><figcaption>...</figcaption><img ... /></figure>
Needs a FigurePlugin
Is there any update about this?
At least would be good to export image caption as alt for img tag (and for markdown).
But better would be ImageNode export as figure (at least if caption is set) or alternatively - maybe for now delete caption property from ImageNode
This is a closed issue about InlineImageNode which no longer exists. If you have feedback about ImageNode you can create a new issue and/or submit a PR. The playground is just demo code, right now adding HTML import/export support for the caption is an exercise for the reader just like other things you would have to do for a production quality ImageNode (e.g. some sort of server-side uploading). Unlike server-side code, it would be straightforward for someone to contribute a less lossy HTML import/export, but commenting on closed issues is one of the worst ways to go about that.