Classes
AbstractEditorAnnotationCommandCommandComponentConfiguratorContainerSelectionDOMImporterDocumentDocumentNodeEditAnnotationCommandEditingEventEmitterInsertInlineNodeCommandNodeIndexPropertyAnnotationPropertySelectionProseEditorScrollPaneSelectionSpellCheckCommandSurfaceTextNodeTransactionDocumentVirtualElement
Components
Modules
ContainerSelection
Class defined in model/ContainerSelection.js#25 inherits from
A selection spanning multiple nodes.
Example
var containerSel = doc.createSelection({
type: 'container',
containerId: 'body',
startPath: ['p1', 'content'],
startOffset: 5,
endPath: ['p3', 'content'],
endOffset: 4,
});
new ContainerSelection()
Constructor defined in model/ContainerSelection.js#27
this.getContainer()
Method defined in model/ContainerSelection.js#134
Returns
model/Container | The container node instance for this selection. |
this.collapse(direction)
Method defined in model/ContainerSelection.js#203
Collapse a selection to chosen direction.
Parameters
direction | String | either left of right |
Returns
PropertySelection |
this.getNodeIds()
Method defined in model/ContainerSelection.js#283
Get the node ids covered by this selection.
Returns
String[] | an array of ids |
this.getFragments()
Method defined in model/ContainerSelection.js#297
Helper to create selection fragments for this ContainerSelection.
Used for selection rendering, for instance.
Returns
Selection.Fragment[] | Fragments resulting from splitting this into property selections. |
this.splitIntoPropertySelections()
Method defined in model/ContainerSelection.js#429
Splits a container selection into property selections.
Returns
PropertySelection[] |