plate
plate copied to clipboard
Markdown serializing bug due to url key
Description
For serializing (slate to markdown) remark-slate looks for the URL in link property (view code), but Plate is storing it in url.
This is the opposite of https://github.com/udecode/plate/issues/350
How can we override url with link?
*Update: related issue in remark-slate repo: https://github.com/hanford/remark-slate/issues/38
I ended up switching to https://github.com/inokawa/remark-slate-transformer instead. However, thinking about it, I've replaced most of the Plate plugins with my own stuff, so I'm not sure how well it'd work out of the box.
@siliconeidolon I've tried both and in general I prefer the approach in remark-slate-transformer. We use a custom ast in our app, so https://github.com/inokawa/remark-slate-transformer/issues/31 was an obstacle for us.
Regarding plate, I tend to contribute smaller more general purpose changes back to plate and larger or different decisions I extend plate. I try to get as much improvement back into plate as possible to help others wherever it makes sense.
I'm also facing problems to reliably convert plate => markdown. I ended up working on my own convertor - https://github.com/palerdot/slate-mark
It is a work in progress. And link, handling is not yet done. But, expect it to be a reliable plate -> markdown convertor in the near future.
I'm also facing problems to reliably convert
plate=>markdown. I ended up working on my own convertor - https://github.com/palerdot/slate-markIt is a work in progress. And link, handling is not yet done. But, expect it to be a reliable
plate -> markdownconvertor in the near future.
Not that you have to, but it might be nice to include this in plate... more eyes lead to more community fixes, etc.
Not that you have to, but it might be nice to include this in plate
I don't mind actually, and might be a good idea if things work out fine. Right now, I'm pushing patch versions (0.0.x) where things are not stable, and not fit for public consumption. I expect it to be in decent shape when I release the first minor version (0.1.0). I think that would be a good time to take stock of whether this is good enough to be included in plate.
OP here.
I was hoping Plate would just work with markdown out-of-the-box. Though I think one other way to address this issue is making url key customizable in remark-slate. See https://github.com/hanford/remark-slate/issues/38
In case anyone is interested, this is my slate-to-markdown and markdown-to-slate helpers:
https://gist.github.com/vnugent/0d48f51b8cdb07e6cede52b97fa363b5
Hi! I have the exact same issue.
I see that it's mark as completed but I could not find a clear solution. What should I do?
@baptisteArno It would be simpler and safer to adjust this in remark-slate than in Plate. Perhaps you could make a PR on remark-slate to make this configurable, or patch your copy of remark-slate if the PR isn't accepted?