"Magic" (read: auto-detected) Editable transforms, merging, focus #878
Labels
[Feature] Block API
API that allows to express the block paradigm.
[Type] Question
Questions about the design or development of the editor.
Related: #769 (comment)
A good deal of effort has been placed in allowing granular control over focusing, transforming, and merging blocks containing Editable content. This has also surfaced some concern over the shape of an Editable attribute value (#771) since a developer would need to be conscious of it in implementing their transforms.
In an effort to keep things simple for block implementers, we should consider eliminating this granular control in lieu of "smart" detection of Editable content, even if this means sacrificing some behaviors like merging two blocks of distinct types, moving focus within a block in response to key commands (like backspacing a caption to a quote's content), etc.
This is admittedly something of a dream goal. Particularly, it could be challenging to know where in a block an editable value exists, and how to map that value to the attribute of another block. This can be known in the case of merging two text blocks by iterating over
attributes
keys to findchildren
matchers, but this same approach would fall apart for transforming between block types (e.g. when transforming a text block to a quote block, how do we know the Editable value should be assigned to the quote's text and not its caption?).I sense the bulk of the automated behavior could occur by a direct communication channel between
VisualEditorBlock
andEditable
using React's context feature to transparently pass props and callbacks to the rendered Editable.The text was updated successfully, but these errors were encountered: