Skip to content

Discussion (Data): What is a block? Data model and API #1177

@dmsnell

Description

@dmsnell

We have an implementation of the block data structure but we don't know what it should be. We need a specification.

We have more than one implicit data structures:

  • Post / Document is an arrangements of blocks, block meta, and danglers (soup) ((extraneous text/HTML))
  • Block is a stateful container of a specific kind of data with an associated fallback render to serialize into and a way to render an editor view over that data
  • Text is a string of characters/glyphs/inline elements that can be formatted.

We can do things to them:

  • Document
    • Insert block at…
    • Remove block at…
    • Replace block at…
    • Split block at… at…
    • Duplicate block at…
  • Block
    • Insert/remove/replace content in the block
    • Set/unset attribute
  • Text
    • Insert/remove/replace

This is a stub issue to be filled out. Some pieces exist in other issues.

Metadata

Metadata

Assignees

Labels

[Feature] Block APIAPI that allows to express the block paradigm.[Feature] ParsingRelated to efforts to improving the parsing of a string of data and converting it into a different f

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions