is there a way to convert md string into new right-text blocks?
This topic has been created from a Discord post (1276855156918587482) to give it more visibility.
It will be on Read-Only mode here.
Join the conversation on Discord
is there a way to convert md string into new right-text blocks?
This topic has been created from a Discord post (1276855156918587482) to give it more visibility.
It will be on Read-Only mode here.
Join the conversation on Discord
(md or html)-to-Blocks: is there a way to convert md or html string into new right-text blocks?
My case: I need some dummy content during development.
I want to use real content parsed from competitors site.
The easiest way to get content is to save partially pre-rendered sections.
I don’t need “production” quality of output in any sence.
So, the folowing works for me just fine.
import parse from "html-dom-parser"
const parsed = parse(someHtmlSource)
const strapiBlocks = traverse(parsed)
traverse
is use once and throw away - that’s the reason why it is that implemented that poor.
All of this together gives me the way to seed my strapi db with hundreds of articles with real content placed into righ blocks.
P.S. discord is kinda stupid.
They don’t allow me to post code due to char limit, but the same code in 800kb image works just fine…