springload / wagtaildraftail

🐦📝🍸 Draft.js editor for Wagtail, built upon Draftail and draftjs_exporter
https://pypi.python.org/pypi/wagtaildraftail
MIT License
24 stars 3 forks source link

Outline path to creating and storing Hallo-compatible HTML-like data #12

Open thibaudcolas opened 7 years ago

thibaudcolas commented 7 years ago

... so it's easier to integrate into existing sites.

Note that we likely won't get to 100% parity with Hallo – up to us to figure out how close this has to get.

Start defining how to do it, then think of whether to develop it ourselves or not. Two paths:

loicteixeira commented 7 years ago

If the goal is to store Hallo-compatible HTML-like data, I'm afraid draftjs_exporter comes too late as it only converts the (stored) JSON structure to HTML for display.

To store Hallo-compatible data in the database, it would have to happen in the editor but would that mean that upon saving, the DraftJS editor would convert it's internal state to HTML, and then parse this HTML back to its own internal state when updating?

thibaudcolas commented 7 years ago

Ah that's a good point, I completely forgot about the need to convert from HTML back to JSON 😅.