Hi,
I’ve been doing some research for the last two days looking for the perfect editor for a possible custom “cms”. ProseMirror ticks all the boxes save for one thing, “shortcodes” as Wordpress calls them.
So basically what I want to do is:
- User clicks on a button to insert a “widget”
- What happens is we create a tag in the post content (this is important)
- PM takes this tag, renders it as a completely different HTML structure
- When serializing HTML content this “shortcode” is stored as on the backend
- When displaying it to a visitor I can parse this HTML and replace with the custom html
Any ideas how to do this? The async image upload example kind of reminds me of this, though I’m not certain if I should create a custom node type to use instead of the image node.
https://prosemirror.net/examples/upload/ (startImageUpload function)
Thanks in advance