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
nameString

unique editor name

containerIdString

container id

textTypesObject[]

array of textType definition objects

commandsSurfaceCommand[]

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],
})

Returns the containerId the editor is bound to

Performs a model/transform/breakNode transformation

Performs an model/transform/insertNode transformation

Selects all content in the container

Performs a model/transform/paste transformation