Editing
Class defined in model/Editing.js#20

Core editing implementation, that controls meta behavior such as deleting a selection, merging nodes, etc.

Some of the implementation are then delegated to specific editing behaviors, such as manipulating content of a text-property, merging or breaking text nodes

Note: this is pretty much the same what we did with transforms before. We decided to move this here, to switch to a stateful editor implementation (aka turtle-graphics-style)

Switch text type for a given node. E.g. from paragraph to heading.

Parameters
argsObject

object with selection, containerId and data with new node data

Returns
Object

object with updated selection

Example
switchTextType(tx, {
  selection: bodyEditor.getSelection(),
  containerId: bodyEditor.getContainerId(),
  data: {
    type: 'heading',
    level: 2
  }
})