How to Block Editor for Mecha #141
taufik-nurrohman
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This Editor.js thing just became popular thanks to the block editor feature introduced by WordPress. Many other content management systems are starting to implement it.
The output of this editor is a JSON, it even has some adapter/sanitizer for PHP so we are free to convert that JSON data into any HTML markup as we like.
Assume that Editor.js will set the page content value every time the editor form is submitted:
So the page content will contain a JSON data like this:
We can utilize page
type
property to filter the Editor.js content parsing from others content types:Then, in the page header, just add a
type
property with valueBlocks
:Beta Was this translation helpful? Give feedback.
All reactions