ContainerEditor
Component defined in ui/ContainerEditor.js#47 inherits from

Represents a flow editor that manages a sequence of nodes in a container. Needs to be instantiated inside a ui/Controller context.

Props

name | String | unique editor name
containerId | String | container id
textTypes | Object[] | array of textType definition objects
commands | SurfaceCommand[] | array of command classes to be available

Example

Create a full-fledged `ContainerEditor` for the `body` container of a document. Allow Strong and Emphasis annotations and to switch text types between paragraph and heading at level 1.

    $$(ContainerEditor, {
      name: 'bodyEditor',
      containerId: 'body',
      textTypes: [
        {name: 'paragraph', data: {type: 'paragraph'}},
        {name: 'heading1',  data: {type: 'heading', level: 1}}
      ],
      commands: [StrongCommand, EmphasisCommand, SwitchTextTypeCommand],
    })

new ContainerEditor()
Constructor defined in ui/ContainerEditor.js#48
this.getContainerId()
Method defined in ui/ContainerEditor.js#220

Returns the containerId the editor is bound to

this.break()
Method defined in ui/ContainerEditor.js#266

Performs a model/transform/breakNode transformation

this.insertNode()
Method defined in ui/ContainerEditor.js#273

Performs an model/transform/insertNode transformation

this.switchType()
Method defined in ui/ContainerEditor.js#282

- Performs a model/transform/switchTextType transformation

this.selectAll()
Method defined in ui/ContainerEditor.js#291

Selects all content in the container

this.paste()
Method defined in ui/ContainerEditor.js#330

Performs a model/transform/paste transformation