The following are the resources mentioned in the slides, some code “landmarks” to walk through for getting to know the underlying process.
For saving block data…
serializeBlockgiven a block, return a string of content (runs save)
renderToStringgiven the result of save, convert this to a string
And for parsing out data from the saved content…
getBlockAttributeparses an attribute out of the block content, based on the attributes configuration
hpqparser library: https://aduth.github.io/hpq/
The “future” discussions I mentioned about custom sources:
- “Custom Block Attribute Sources” issue, #16282. Sets out the reasoning behind custom sources, and a potential API/schema for how to create these.
- Using a custom source for meta, #16402. Switches from special handling for meta to creating a custom source. Still not usable by plugin devs, but shows a possible API for this.