Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
I couldn't find any examples of what the JSON format looked like, and I wanted to be sure the format was relatively independent of Craft itself. However, the JSON uses node IDs instead of nesting the nodes themselves, which I find confusing.
For example, with these Frame contents:
The JSON output from
I would expect something more like:
It would also be nice to have some examples of implementing custom serializers, like SlateJS does. I'm currently using SlateJS as a WYSIWYG React editor, but I'd love to switch to Craft for the nicer drag & drop functionality.
@hdaggett @prevwong I am intrigued by this library. A hierarchical output of the state would be really nice. I think it can be done in consumer libraries/apps, but I also think that for generating the UI from the state, the nested JSON would be a preferable format than a flat object.
I would love to try it out and use this library for a form builder component for dynamic form library we are developing using in our projects. So I am more than willing to create a PR with this feature if you haven't started working on it yet.