prevwong / craft.js

🚀 A React Framework for building extensible drag and drop page editors
https://craft.js.org
MIT License
7.32k stars 705 forks source link

Question: can I load html into the editor instead of manually build? #632

Open sunshineo opened 1 month ago

sunshineo commented 1 month ago

Simple email html pages Our editor have the basic components Now we look at the page and drag components to build a page/layout looks the same Can we somehow load the email html page automatically?

prevwong commented 1 month ago

You will need to create a parser to parse the HTML code into Craft's EditorState (or use one of the open source HTML to JSX converters, and then pass that JSX into Craft)