@types/slate
- Version 0.47.16
- Published
- 120 kB
- 2 dependencies
- MIT license
Install
npm i @types/slate
yarn add @types/slate
pnpm add @types/slate
Overview
TypeScript definitions for slate
Index
Classes
Editor
- addAnnotation()
- addMark()
- addMarkAtRange()
- addMarkByKey()
- addMarkByPath()
- addMarks()
- addMarksAtRange()
- addMarksByPath()
- applyOperation()
- blur()
- command()
- controller
- delete()
- deleteAtRange()
- deleteBackward()
- deleteBackwardAtRange()
- deleteCharBackward()
- deleteCharBackwardAtRange()
- deleteCharForward()
- deleteCharForwardAtRange()
- deleteForward()
- deleteForwardAtRange()
- deleteLineBackward()
- deleteLineBackwardAtRange()
- deleteLineForward()
- deleteLineForwardAtRange()
- deleteWordBackward()
- deleteWordBackwardAtRange()
- deleteWordForward()
- deleteWordForwardAtRange()
- deselect()
- flip()
- flush()
- focus()
- hasCommand()
- hasQuery()
- insertBlock()
- insertBlockAtRange()
- insertFragment()
- insertFragmentAtRange()
- insertFragmentByKey()
- insertFragmentByPath()
- insertInline()
- insertInlineAtRange()
- insertNodeByKey()
- insertNodeByPath()
- insertText()
- insertTextAtRange()
- insertTextByKey()
- insertTextByPath()
- isEditor()
- mergeNodeByKey()
- mergeNodeByPath()
- middleware
- moveAnchorBackward()
- moveAnchorForward()
- moveAnchorTo()
- moveAnchorToEndOfBlock()
- moveAnchorToEndOfDocument()
- moveAnchorToEndOfInline()
- moveAnchorToEndOfNextBlock()
- moveAnchorToEndOfNextInline()
- moveAnchorToEndOfNextText()
- moveAnchorToEndOfNode()
- moveAnchorToEndOfPreviousBlock()
- moveAnchorToEndOfPreviousInline()
- moveAnchorToEndOfPreviousText()
- moveAnchorToEndOfText()
- moveAnchorToStartOfBlock()
- moveAnchorToStartOfDocument()
- moveAnchorToStartOfInline()
- moveAnchorToStartOfNextBlock()
- moveAnchorToStartOfNextInline()
- moveAnchorToStartOfNextText()
- moveAnchorToStartOfNode()
- moveAnchorToStartOfPreviousBlock()
- moveAnchorToStartOfPreviousInline()
- moveAnchorToStartOfPreviousText()
- moveAnchorToStartOfText()
- moveAnchorWordBackward()
- moveAnchorWordForward()
- moveBackward()
- moveEndBackward()
- moveEndForward()
- moveEndTo()
- moveEndToEndOfBlock()
- moveEndToEndOfDocument()
- moveEndToEndOfInline()
- moveEndToEndOfNextBlock()
- moveEndToEndOfNextInline()
- moveEndToEndOfNextText()
- moveEndToEndOfNode()
- moveEndToEndOfPreviousBlock()
- moveEndToEndOfPreviousInline()
- moveEndToEndOfPreviousText()
- moveEndToEndOfText()
- moveEndToStartOfBlock()
- moveEndToStartOfDocument()
- moveEndToStartOfInline()
- moveEndToStartOfNextBlock()
- moveEndToStartOfNextInline()
- moveEndToStartOfNextText()
- moveEndToStartOfNode()
- moveEndToStartOfPreviousBlock()
- moveEndToStartOfPreviousInline()
- moveEndToStartOfPreviousText()
- moveEndToStartOfText()
- moveEndWordBackward()
- moveEndWordForward()
- moveFocusBackward()
- moveFocusForward()
- moveFocusTo()
- moveFocusToEndOfBlock()
- moveFocusToEndOfDocument()
- moveFocusToEndOfInline()
- moveFocusToEndOfNextBlock()
- moveFocusToEndOfNextInline()
- moveFocusToEndOfNextText()
- moveFocusToEndOfNode()
- moveFocusToEndOfPreviousBlock()
- moveFocusToEndOfPreviousInline()
- moveFocusToEndOfPreviousText()
- moveFocusToEndOfText()
- moveFocusToStartOfBlock()
- moveFocusToStartOfDocument()
- moveFocusToStartOfInline()
- moveFocusToStartOfNextBlock()
- moveFocusToStartOfNextInline()
- moveFocusToStartOfNextText()
- moveFocusToStartOfNode()
- moveFocusToStartOfPreviousBlock()
- moveFocusToStartOfPreviousInline()
- moveFocusToStartOfPreviousText()
- moveFocusToStartOfText()
- moveFocusWordBackward()
- moveFocusWordForward()
- moveForward()
- moveNodeByKey()
- moveNodeByPath()
- moveStartBackward()
- moveStartForward()
- moveStartTo()
- moveStartToEndOfBlock()
- moveStartToEndOfDocument()
- moveStartToEndOfInline()
- moveStartToEndOfNextBlock()
- moveStartToEndOfNextInline()
- moveStartToEndOfNextText()
- moveStartToEndOfNode()
- moveStartToEndOfPreviousBlock()
- moveStartToEndOfPreviousInline()
- moveStartToEndOfPreviousText()
- moveStartToEndOfText()
- moveStartToStartOfBlock()
- moveStartToStartOfDocument()
- moveStartToStartOfInline()
- moveStartToStartOfNextBlock()
- moveStartToStartOfNextInline()
- moveStartToStartOfNextText()
- moveStartToStartOfNode()
- moveStartToStartOfPreviousBlock()
- moveStartToStartOfPreviousInline()
- moveStartToStartOfPreviousText()
- moveStartToStartOfText()
- moveStartWordBackward()
- moveStartWordForward()
- moveTo()
- moveToAnchor()
- moveToEnd()
- moveToEndOfBlock()
- moveToEndOfDocument()
- moveToEndOfInline()
- moveToEndOfNextBlock()
- moveToEndOfNextInline()
- moveToEndOfNextText()
- moveToEndOfNode()
- moveToEndOfPreviousBlock()
- moveToEndOfPreviousInline()
- moveToEndOfPreviousText()
- moveToEndOfText()
- moveToFocus()
- moveToRangeOfDocument()
- moveToRangeOfNode()
- moveToStart()
- moveToStartOfBlock()
- moveToStartOfDocument()
- moveToStartOfInline()
- moveToStartOfNextBlock()
- moveToStartOfNextInline()
- moveToStartOfNextText()
- moveToStartOfNode()
- moveToStartOfPreviousBlock()
- moveToStartOfPreviousInline()
- moveToStartOfPreviousText()
- moveToStartOfText()
- moveWordBackward()
- moveWordForward()
- normalize()
- object
- onChange
- operations
- plugins
- query()
- readOnly
- redo()
- registerCommand()
- registerQuery()
- removeAllMarksByKey()
- removeAllMarksByPath()
- removeAnnotation()
- removeMark()
- removeMarkAtRange()
- removeMarkByKey()
- removeMarkByPath()
- removeMarksByPath()
- removeNodeByKey()
- removeNodeByPath()
- removeTextByKey()
- removeTextByPath()
- replaceMark()
- replaceNodeByKey()
- replaceNodeByPath()
- replaceTextByKey()
- replaceTextByPath()
- run()
- save()
- select()
- setAnchor()
- setAnnotation()
- setBlocks()
- setBlocksAtRange()
- setData()
- setEnd()
- setFocus()
- setInlines()
- setInlinesAtRange()
- setMarkByKey()
- setMarkByPath()
- setNodeByKey()
- setNodeByPath()
- setReadOnly()
- setStart()
- setTextByKey()
- setTextByPath()
- setValue()
- snapshotSelection()
- splitBlock()
- splitBlockAtRange()
- splitDescendantsByKey()
- splitDescendantsByPath()
- splitInline()
- splitInlineAtRange()
- splitNodeByKey()
- splitNodeByPath()
- toggleMark()
- toggleMarkAtRange()
- undo()
- unwrapBlock()
- unwrapBlockAtRange()
- unwrapBlockByKey()
- unwrapBlockByPath()
- unwrapChildrenByKey()
- unwrapChildrenByPath()
- unwrapInline()
- unwrapInlineAtRange()
- unwrapInlineByKey()
- unwrapInlineByPath()
- unwrapNodeByKey()
- unwrapNodeByPath()
- value
- withoutMerging()
- withoutNormalizing()
- withoutSaving()
- wrapBlock()
- wrapBlockAtRange()
- wrapBlockByKey()
- wrapBlockByPath()
- wrapInline()
- wrapInlineAtRange()
- wrapInlineByKey()
- wrapInlineByPath()
- wrapNodeByKey()
- wrapNodeByPath()
- wrapText()
- wrapTextAtRange()
Point
- create()
- createProperties()
- fromJS()
- fromJSON()
- isAfterPoint()
- isAfterRange()
- isAtEndOfNode()
- isAtEndofRange()
- isAtStartOfNode()
- isAtStartOfRange()
- isBeforePoint()
- isBeforeRange()
- isInNode()
- isInRange()
- isPoint()
- isSet
- isUnset
- key
- moveBackward()
- moveForward()
- moveTo()
- moveToEndOfNode()
- moveToStartOfNode()
- normalize()
- object
- offset
- path
- setKey()
- setOffset()
- setPath()
- toJS()
- toJSON()
- unset()
Text
- addMark()
- addMarks()
- create()
- createList()
- fromJS()
- fromJSON()
- getFirstText()
- getKeysToPathsTable()
- getLastText()
- getLeaves()
- getNode()
- getPath()
- getText()
- hasNode()
- insertText()
- isText()
- isTextList()
- key
- marks
- mergeText()
- normalize()
- object
- regenerateKey()
- removeMark()
- removeText()
- resolvePath()
- setMark()
- splitText()
- text
- toJS()
- toJSON()
- validate()
Value
- activeMarks
- addAnnotation()
- addMark()
- anchorBlock
- anchorInline
- anchorText
- annotations
- blocks
- create()
- createProperties()
- data
- document
- endBlock
- endInline
- endText
- focusBlock
- focusInline
- focusText
- fragment
- fromJS()
- fromJSON()
- inlines
- insertNode()
- insertText()
- isValue()
- mapPoints()
- mapRanges()
- marks
- mergeNode()
- moveNode()
- nextBlock
- nextInline
- nextText
- object
- previousBlock
- previousInline
- previousText
- removeAnnotation()
- removeMark()
- removeNode()
- removeText()
- selection
- setAnnotation()
- setMark()
- setNode()
- setProperties()
- setSelection()
- splitNode()
- startBlock
- startInline
- startText
- texts
- toJS()
- toJSON()
Interfaces
Controller
- addAnnotation()
- addMark()
- addMarkAtRange()
- addMarkByKey()
- addMarkByPath()
- addMarks()
- addMarksAtRange()
- addMarksByPath()
- applyOperation()
- blur()
- command()
- delete()
- deleteAtRange()
- deleteBackward()
- deleteBackwardAtRange()
- deleteCharBackward()
- deleteCharBackwardAtRange()
- deleteCharForward()
- deleteCharForwardAtRange()
- deleteForward()
- deleteForwardAtRange()
- deleteLineBackward()
- deleteLineBackwardAtRange()
- deleteLineForward()
- deleteLineForwardAtRange()
- deleteWordBackward()
- deleteWordBackwardAtRange()
- deleteWordForward()
- deleteWordForwardAtRange()
- deselect()
- flip()
- focus()
- hasCommand()
- hasQuery()
- insertBlock()
- insertBlockAtRange()
- insertFragment()
- insertFragmentAtRange()
- insertFragmentByKey()
- insertFragmentByPath()
- insertInline()
- insertInlineAtRange()
- insertNodeByKey()
- insertNodeByPath()
- insertText()
- insertTextAtRange()
- insertTextByKey()
- insertTextByPath()
- mergeNodeByKey()
- mergeNodeByPath()
- moveAnchorBackward()
- moveAnchorForward()
- moveAnchorTo()
- moveAnchorToEndOfBlock()
- moveAnchorToEndOfDocument()
- moveAnchorToEndOfInline()
- moveAnchorToEndOfNextBlock()
- moveAnchorToEndOfNextInline()
- moveAnchorToEndOfNextText()
- moveAnchorToEndOfNode()
- moveAnchorToEndOfPreviousBlock()
- moveAnchorToEndOfPreviousInline()
- moveAnchorToEndOfPreviousText()
- moveAnchorToEndOfText()
- moveAnchorToStartOfBlock()
- moveAnchorToStartOfDocument()
- moveAnchorToStartOfInline()
- moveAnchorToStartOfNextBlock()
- moveAnchorToStartOfNextInline()
- moveAnchorToStartOfNextText()
- moveAnchorToStartOfNode()
- moveAnchorToStartOfPreviousBlock()
- moveAnchorToStartOfPreviousInline()
- moveAnchorToStartOfPreviousText()
- moveAnchorToStartOfText()
- moveAnchorWordBackward()
- moveAnchorWordForward()
- moveBackward()
- moveEndBackward()
- moveEndForward()
- moveEndTo()
- moveEndToEndOfBlock()
- moveEndToEndOfDocument()
- moveEndToEndOfInline()
- moveEndToEndOfNextBlock()
- moveEndToEndOfNextInline()
- moveEndToEndOfNextText()
- moveEndToEndOfNode()
- moveEndToEndOfPreviousBlock()
- moveEndToEndOfPreviousInline()
- moveEndToEndOfPreviousText()
- moveEndToEndOfText()
- moveEndToStartOfBlock()
- moveEndToStartOfDocument()
- moveEndToStartOfInline()
- moveEndToStartOfNextBlock()
- moveEndToStartOfNextInline()
- moveEndToStartOfNextText()
- moveEndToStartOfNode()
- moveEndToStartOfPreviousBlock()
- moveEndToStartOfPreviousInline()
- moveEndToStartOfPreviousText()
- moveEndToStartOfText()
- moveEndWordBackward()
- moveEndWordForward()
- moveFocusBackward()
- moveFocusForward()
- moveFocusTo()
- moveFocusToEndOfBlock()
- moveFocusToEndOfDocument()
- moveFocusToEndOfInline()
- moveFocusToEndOfNextBlock()
- moveFocusToEndOfNextInline()
- moveFocusToEndOfNextText()
- moveFocusToEndOfNode()
- moveFocusToEndOfPreviousBlock()
- moveFocusToEndOfPreviousInline()
- moveFocusToEndOfPreviousText()
- moveFocusToEndOfText()
- moveFocusToStartOfBlock()
- moveFocusToStartOfDocument()
- moveFocusToStartOfInline()
- moveFocusToStartOfNextBlock()
- moveFocusToStartOfNextInline()
- moveFocusToStartOfNextText()
- moveFocusToStartOfNode()
- moveFocusToStartOfPreviousBlock()
- moveFocusToStartOfPreviousInline()
- moveFocusToStartOfPreviousText()
- moveFocusToStartOfText()
- moveFocusWordBackward()
- moveFocusWordForward()
- moveForward()
- moveNodeByKey()
- moveNodeByPath()
- moveStartBackward()
- moveStartForward()
- moveStartTo()
- moveStartToEndOfBlock()
- moveStartToEndOfDocument()
- moveStartToEndOfInline()
- moveStartToEndOfNextBlock()
- moveStartToEndOfNextInline()
- moveStartToEndOfNextText()
- moveStartToEndOfNode()
- moveStartToEndOfPreviousBlock()
- moveStartToEndOfPreviousInline()
- moveStartToEndOfPreviousText()
- moveStartToEndOfText()
- moveStartToStartOfBlock()
- moveStartToStartOfDocument()
- moveStartToStartOfInline()
- moveStartToStartOfNextBlock()
- moveStartToStartOfNextInline()
- moveStartToStartOfNextText()
- moveStartToStartOfNode()
- moveStartToStartOfPreviousBlock()
- moveStartToStartOfPreviousInline()
- moveStartToStartOfPreviousText()
- moveStartToStartOfText()
- moveStartWordBackward()
- moveStartWordForward()
- moveTo()
- moveToAnchor()
- moveToEnd()
- moveToEndOfBlock()
- moveToEndOfDocument()
- moveToEndOfInline()
- moveToEndOfNextBlock()
- moveToEndOfNextInline()
- moveToEndOfNextText()
- moveToEndOfNode()
- moveToEndOfPreviousBlock()
- moveToEndOfPreviousInline()
- moveToEndOfPreviousText()
- moveToEndOfText()
- moveToFocus()
- moveToRangeOfDocument()
- moveToRangeOfNode()
- moveToStart()
- moveToStartOfBlock()
- moveToStartOfDocument()
- moveToStartOfInline()
- moveToStartOfNextBlock()
- moveToStartOfNextInline()
- moveToStartOfNextText()
- moveToStartOfNode()
- moveToStartOfPreviousBlock()
- moveToStartOfPreviousInline()
- moveToStartOfPreviousText()
- moveToStartOfText()
- moveWordBackward()
- moveWordForward()
- normalize()
- query()
- redo()
- registerCommand()
- registerQuery()
- removeAllMarksByKey()
- removeAllMarksByPath()
- removeAnnotation()
- removeMark()
- removeMarkAtRange()
- removeMarkByKey()
- removeMarkByPath()
- removeMarksByPath()
- removeNodeByKey()
- removeNodeByPath()
- removeTextByKey()
- removeTextByPath()
- replaceMark()
- replaceNodeByKey()
- replaceNodeByPath()
- replaceTextByKey()
- replaceTextByPath()
- run()
- save()
- select()
- setAnchor()
- setAnnotation()
- setBlocks()
- setBlocksAtRange()
- setData()
- setEnd()
- setFocus()
- setInlines()
- setInlinesAtRange()
- setMarkByKey()
- setMarkByPath()
- setNodeByKey()
- setNodeByPath()
- setStart()
- setTextByKey()
- setTextByPath()
- snapshotSelection()
- splitBlock()
- splitBlockAtRange()
- splitDescendantsByKey()
- splitDescendantsByPath()
- splitInline()
- splitInlineAtRange()
- splitNodeByKey()
- splitNodeByPath()
- toggleMark()
- toggleMarkAtRange()
- undo()
- unwrapBlock()
- unwrapBlockAtRange()
- unwrapBlockByKey()
- unwrapBlockByPath()
- unwrapChildrenByKey()
- unwrapChildrenByPath()
- unwrapInline()
- unwrapInlineAtRange()
- unwrapInlineByKey()
- unwrapInlineByPath()
- unwrapNodeByKey()
- unwrapNodeByPath()
- withoutMerging()
- withoutNormalizing()
- withoutSaving()
- wrapBlock()
- wrapBlockAtRange()
- wrapBlockByKey()
- wrapBlockByPath()
- wrapInline()
- wrapInlineAtRange()
- wrapInlineByKey()
- wrapInlineByPath()
- wrapNodeByKey()
- wrapNodeByPath()
- wrapText()
- wrapTextAtRange()
Type Aliases
Namespaces
Classes
class AddAnnotationOperation
class AddAnnotationOperation extends BaseOperation {}
class AddMarkOperation
class AddMarkOperation extends BaseOperation {}
class Annotation
class Annotation extends BaseRange {}
property anchor
anchor: Point;
property data
data: Data;
property focus
focus: Point;
property key
key: string;
property object
object: string;
property type
type: string;
method create
static create: ( properties: Annotation | AnnotationProperties | AnnotationJSON) => Annotation;
method createMap
static createMap: (elements?: any) => Immutable.Map<string, Annotation>;
method createProperties
static createProperties: ( attrs: AnnotationProperties | AnnotationJSON | Annotation) => AnnotationProperties;
method fromJS
static fromJS: (properties: AnnotationProperties | AnnotationJSON) => Annotation;
method fromJSON
static fromJSON: ( properties: AnnotationProperties | AnnotationJSON) => Annotation;
method isAnnotation
static isAnnotation: (maybeAnnotation: any) => maybeAnnotation is Annotation;
method setProperties
setProperties: ( properties: AnnotationProperties | AnnotationJSON | Annotation) => Annotation;
method toJS
toJS: () => AnnotationJSON;
method toJSON
toJSON: () => AnnotationJSON;
class BaseOperation
class BaseOperation extends Immutable.Record({}) {}
property object
object: string;
property type
type: string;
method apply
apply: (value: Value) => Value;
method create
static create: ( attrs?: Operation | OperationProperties | OperationJSON) => Operation;
method createList
static createList: () => | Immutable.List<Operation | OperationProperties | OperationJSON> | Array<Operation | OperationProperties | OperationJSON>;
method fromJS
static fromJS: (object: OperationProperties | OperationJSON) => Operation;
method fromJSON
static fromJSON: (object: OperationProperties | OperationJSON) => Operation;
method invert
invert: () => this;
method isOperation
static isOperation: (maybeOperation: any) => maybeOperation is Operation;
method isOperationList
static isOperationList: ( maybeOperationList: any) => maybeOperationList is Immutable.List<Operation>;
method toJSON
toJSON: () => OperationJSON;
class Block
class Block extends BaseNode {}
property nodes
nodes: Immutable.List<Block | Inline | Text>;
property object
object: string;
method create
static create: ( properties: BlockProperties | BlockJSON | Block | string) => Block;
method createList
static createList: ( array?: | Array<BlockProperties | BlockJSON | Block | string> | Immutable.List<BlockProperties | BlockJSON | Block | string>) => Immutable.List<Block>;
method fromJS
static fromJS: (properties: BlockJSON | BlockProperties | Block) => Block;
method fromJSON
static fromJSON: (properties: BlockJSON | BlockProperties | Block) => Block;
method isBlock
static isBlock: (maybeBlock: any) => maybeBlock is Block;
method isBlockList
static isBlockList: ( maybeBlockList: any) => maybeBlockList is Immutable.List<Block>;
method toJS
toJS: () => BlockJSON;
method toJSON
toJSON: () => BlockJSON;
class Decoration
class Decoration extends BaseRange {}
property anchor
anchor: Point;
property data
data: Data;
property focus
focus: Point;
property object
object: string;
property type
type: string;
method create
static create: ( properties: RangeTypeProperties | RangeTypeJSON | RangeType) => Decoration;
method createList
static createList: ( elements?: | Array<RangeTypeProperties | RangeTypeJSON | RangeType> | Immutable.List<RangeTypeProperties | RangeTypeJSON | RangeType>) => Immutable.List<Decoration>;
method createProperties
static createProperties: ( attrs: RangeTypeProperties | RangeTypeJSON | RangeType) => DecorationProperties;
method fromJSON
static fromJSON: { (properties: DecorationJSON & { mark?: MarkJSON | undefined }): Decoration; (properties: DecorationJSON & { mark?: MarkJSON }): Decoration;};
method isDecoration
static isDecoration: (maybeDecoration: any) => maybeDecoration is Decoration;
method setProperties
setProperties: ( properties: RangeTypeProperties | RangeTypeJSON | RangeType) => Decoration;
method toJS
toJS: () => DecorationJSON;
method toJSON
toJSON: () => DecorationJSON;
class Document
class Document extends BaseNode {}
property object
object: string;
method create
static create: ( properties: | DocumentProperties | DocumentJSON | Document | Array<NodeJSON | NodeProperties | Node> | Immutable.List<NodeJSON | NodeProperties | Node>) => Document;
method fromJS
static fromJS: ( properties: DocumentJSON | DocumentProperties | Document) => Document;
method fromJSON
static fromJSON: ( properties: DocumentJSON | DocumentProperties | Document) => Document;
method isDocument
static isDocument: (maybeDocument: any) => maybeDocument is Document;
method toJS
toJS: () => DocumentJSON;
method toJSON
toJSON: () => DocumentJSON;
class Editor
class Editor implements Controller {}
constructor
constructor(attributes: EditorProperties<Editor>, options?: EditorOptions);
property controller
controller: Controller;
property middleware
middleware: {};
property object
object: string;
property onChange
onChange: (change: { operations: Immutable.List<Operation>; value: Value;}) => void;
property operations
operations: Immutable.List<Operation>;
property plugins
plugins: Plugin<Editor>[];
property readOnly
readOnly: boolean;
property value
value: Value;
method addAnnotation
addAnnotation: ( annotation: AnnotationProperties | AnnotationJSON | Annotation) => Editor;
method addMark
addMark: (mark: string | MarkProperties | MarkJSON | Mark) => Editor;
method addMarkAtRange
addMarkAtRange: ( range: RangeTypeProperties | RangeTypeJSON | RangeType, mark: string | MarkProperties | Mark) => Editor;
method addMarkByKey
addMarkByKey: ( key: string, offset: number, length: number, mark: string | MarkProperties | MarkJSON | Mark) => Editor;
method addMarkByPath
addMarkByPath: ( path: Immutable.List<number>, offset: number, length: number, mark: string | MarkProperties | MarkJSON | Mark) => Editor;
method addMarks
addMarks: ( mark: | Set<string | MarkProperties | MarkJSON | Mark> | Array<string | MarkProperties | MarkJSON | Mark>) => Editor;
method addMarksAtRange
addMarksAtRange: ( range: RangeTypeProperties | RangeTypeJSON | RangeType, marks: | Array<string | MarkProperties | MarkJSON | Mark> | Immutable.Set<string | MarkProperties | MarkJSON | Mark>) => Editor;
method addMarksByPath
addMarksByPath: ( path: Immutable.List<number>, offset: number, length: number, marks: | Array<string | MarkProperties | MarkJSON | Mark> | Immutable.Set<string | MarkProperties | MarkJSON | Mark>) => Editor;
method applyOperation
applyOperation: ( operation: Operation | OperationJSON | OperationProperties) => Editor;
method blur
blur: () => Editor;
method command
command: (type: string | ((...args: any[]) => any), ...args: any[]) => Editor;
method delete
delete: () => Editor;
method deleteAtRange
deleteAtRange: ( range: RangeTypeProperties | RangeTypeJSON | RangeType) => Editor;
method deleteBackward
deleteBackward: (n?: number) => Editor;
method deleteBackwardAtRange
deleteBackwardAtRange: ( range: RangeTypeProperties | RangeTypeJSON | RangeType, n?: number) => Editor;
method deleteCharBackward
deleteCharBackward: () => Editor;
method deleteCharBackwardAtRange
deleteCharBackwardAtRange: ( range: RangeTypeProperties | RangeTypeJSON | RangeType) => Editor;
method deleteCharForward
deleteCharForward: () => Editor;
method deleteCharForwardAtRange
deleteCharForwardAtRange: ( range: RangeTypeProperties | RangeTypeJSON | RangeType) => Editor;
method deleteForward
deleteForward: (n?: number) => Editor;
method deleteForwardAtRange
deleteForwardAtRange: ( range: RangeTypeProperties | RangeTypeJSON | RangeType, n?: number) => Editor;
method deleteLineBackward
deleteLineBackward: () => Editor;
method deleteLineBackwardAtRange
deleteLineBackwardAtRange: ( range: RangeTypeProperties | RangeTypeJSON | RangeType) => Editor;
method deleteLineForward
deleteLineForward: () => Editor;
method deleteLineForwardAtRange
deleteLineForwardAtRange: ( range: RangeTypeProperties | RangeTypeJSON | RangeType) => Editor;
method deleteWordBackward
deleteWordBackward: () => Editor;
method deleteWordBackwardAtRange
deleteWordBackwardAtRange: ( range: RangeTypeProperties | RangeTypeJSON | RangeType) => Editor;
method deleteWordForward
deleteWordForward: () => Editor;
method deleteWordForwardAtRange
deleteWordForwardAtRange: ( range: RangeTypeProperties | RangeTypeJSON | RangeType) => Editor;
method deselect
deselect: () => Editor;
method flip
flip: () => Editor;
method flush
flush: () => Editor;
Synchronously flush the current changes to editor, calling onChange. In normal operation you never need to use this method! Reserved for testing.
method focus
focus: () => Editor;
method hasCommand
hasCommand: (type: string) => boolean;
method hasQuery
hasQuery: (type: string) => boolean;
method insertBlock
insertBlock: (block: string | Block | BlockProperties | BlockJSON) => Editor;
method insertBlockAtRange
insertBlockAtRange: ( range: RangeTypeProperties | RangeTypeJSON | RangeType, block: string | Block | BlockProperties | BlockJSON) => Editor;
method insertFragment
insertFragment: (fragment: Document) => Editor;
method insertFragmentAtRange
insertFragmentAtRange: ( range: RangeTypeProperties | RangeTypeJSON | RangeType, fragment: Document) => Editor;
method insertFragmentByKey
insertFragmentByKey: (key: string, index: number, fragment: Document) => Editor;
method insertFragmentByPath
insertFragmentByPath: ( path: Immutable.List<number>, index: number, fragment: Document) => Editor;
method insertInline
insertInline: ( inline: string | Inline | InlineProperties | InlineJSON) => Editor;
method insertInlineAtRange
insertInlineAtRange: ( range: RangeTypeProperties | RangeTypeJSON | RangeType, inline: Inline | InlineProperties | InlineJSON) => Editor;
method insertNodeByKey
insertNodeByKey: ( key: string, index: number, node: Block | Document | Inline | Text) => Editor;
method insertNodeByPath
insertNodeByPath: ( path: Immutable.List<number>, index: number, node: Block | Document | Inline | Text) => Editor;
method insertText
insertText: ( text: string, marks?: | Immutable.Set<string | MarkProperties | MarkJSON | Mark> | Array<string | MarkProperties | MarkJSON | Mark>) => Editor;
method insertTextAtRange
insertTextAtRange: ( range: RangeTypeProperties | RangeTypeJSON | RangeType, text: string) => Editor;
method insertTextByKey
insertTextByKey: ( key: string, offset: number, text: string, marks?: | Array<string | MarkProperties | MarkJSON | Mark> | Immutable.Set<string | MarkProperties | MarkJSON | Mark>) => Editor;
method insertTextByPath
insertTextByPath: ( path: Immutable.List<number>, offset: number, text: string, marks?: | Array<string | MarkProperties | MarkJSON | Mark> | Immutable.Set<string | MarkProperties | MarkJSON | Mark>) => Editor;
method isEditor
isEditor: (maybeEditor: any) => maybeEditor is Editor;
method mergeNodeByKey
mergeNodeByKey: (key: string) => Editor;
method mergeNodeByPath
mergeNodeByPath: (path: Immutable.List<number>) => Editor;
method moveAnchorBackward
moveAnchorBackward: (n?: number) => Editor;
method moveAnchorForward
moveAnchorForward: (n?: number) => Editor;
method moveAnchorTo
moveAnchorTo: ( path: string | number | Immutable.List<number>, offset?: number) => Editor;
method moveAnchorToEndOfBlock
moveAnchorToEndOfBlock: () => Editor;
method moveAnchorToEndOfDocument
moveAnchorToEndOfDocument: () => Editor;
method moveAnchorToEndOfInline
moveAnchorToEndOfInline: () => Editor;
method moveAnchorToEndOfNextBlock
moveAnchorToEndOfNextBlock: () => Editor;
method moveAnchorToEndOfNextInline
moveAnchorToEndOfNextInline: () => Editor;
method moveAnchorToEndOfNextText
moveAnchorToEndOfNextText: () => Editor;
method moveAnchorToEndOfNode
moveAnchorToEndOfNode: (node: Block | Document | Inline | Text) => Editor;
method moveAnchorToEndOfPreviousBlock
moveAnchorToEndOfPreviousBlock: () => Editor;
method moveAnchorToEndOfPreviousInline
moveAnchorToEndOfPreviousInline: () => Editor;
method moveAnchorToEndOfPreviousText
moveAnchorToEndOfPreviousText: () => Editor;
method moveAnchorToEndOfText
moveAnchorToEndOfText: () => Editor;
method moveAnchorToStartOfBlock
moveAnchorToStartOfBlock: () => Editor;
method moveAnchorToStartOfDocument
moveAnchorToStartOfDocument: () => Editor;
method moveAnchorToStartOfInline
moveAnchorToStartOfInline: () => Editor;
method moveAnchorToStartOfNextBlock
moveAnchorToStartOfNextBlock: () => Editor;
method moveAnchorToStartOfNextInline
moveAnchorToStartOfNextInline: () => Editor;
method moveAnchorToStartOfNextText
moveAnchorToStartOfNextText: () => Editor;
method moveAnchorToStartOfNode
moveAnchorToStartOfNode: (node: Block | Document | Inline | Text) => Editor;
method moveAnchorToStartOfPreviousBlock
moveAnchorToStartOfPreviousBlock: () => Editor;
method moveAnchorToStartOfPreviousInline
moveAnchorToStartOfPreviousInline: () => Editor;
method moveAnchorToStartOfPreviousText
moveAnchorToStartOfPreviousText: () => Editor;
method moveAnchorToStartOfText
moveAnchorToStartOfText: () => Editor;
method moveAnchorWordBackward
moveAnchorWordBackward: () => Editor;
method moveAnchorWordForward
moveAnchorWordForward: () => Editor;
method moveBackward
moveBackward: (n?: number) => Editor;
method moveEndBackward
moveEndBackward: (n?: number) => Editor;
method moveEndForward
moveEndForward: (n?: number) => Editor;
method moveEndTo
moveEndTo: ( path: string | number | Immutable.List<number>, offset?: number) => Editor;
method moveEndToEndOfBlock
moveEndToEndOfBlock: () => Editor;
method moveEndToEndOfDocument
moveEndToEndOfDocument: () => Editor;
method moveEndToEndOfInline
moveEndToEndOfInline: () => Editor;
method moveEndToEndOfNextBlock
moveEndToEndOfNextBlock: () => Editor;
method moveEndToEndOfNextInline
moveEndToEndOfNextInline: () => Editor;
method moveEndToEndOfNextText
moveEndToEndOfNextText: () => Editor;
method moveEndToEndOfNode
moveEndToEndOfNode: (node: Block | Document | Inline | Text) => Editor;
method moveEndToEndOfPreviousBlock
moveEndToEndOfPreviousBlock: () => Editor;
method moveEndToEndOfPreviousInline
moveEndToEndOfPreviousInline: () => Editor;
method moveEndToEndOfPreviousText
moveEndToEndOfPreviousText: () => Editor;
method moveEndToEndOfText
moveEndToEndOfText: () => Editor;
method moveEndToStartOfBlock
moveEndToStartOfBlock: () => Editor;
method moveEndToStartOfDocument
moveEndToStartOfDocument: () => Editor;
method moveEndToStartOfInline
moveEndToStartOfInline: () => Editor;
method moveEndToStartOfNextBlock
moveEndToStartOfNextBlock: () => Editor;
method moveEndToStartOfNextInline
moveEndToStartOfNextInline: () => Editor;
method moveEndToStartOfNextText
moveEndToStartOfNextText: () => Editor;
method moveEndToStartOfNode
moveEndToStartOfNode: (node: Block | Document | Inline | Text) => Editor;
method moveEndToStartOfPreviousBlock
moveEndToStartOfPreviousBlock: () => Editor;
method moveEndToStartOfPreviousInline
moveEndToStartOfPreviousInline: () => Editor;
method moveEndToStartOfPreviousText
moveEndToStartOfPreviousText: () => Editor;
method moveEndToStartOfText
moveEndToStartOfText: () => Editor;
method moveEndWordBackward
moveEndWordBackward: () => Editor;
method moveEndWordForward
moveEndWordForward: () => Editor;
method moveFocusBackward
moveFocusBackward: (n?: number) => Editor;
method moveFocusForward
moveFocusForward: (n?: number) => Editor;
method moveFocusTo
moveFocusTo: ( path: string | number | Immutable.List<number>, offset?: number) => Editor;
method moveFocusToEndOfBlock
moveFocusToEndOfBlock: () => Editor;
method moveFocusToEndOfDocument
moveFocusToEndOfDocument: () => Editor;
method moveFocusToEndOfInline
moveFocusToEndOfInline: () => Editor;
method moveFocusToEndOfNextBlock
moveFocusToEndOfNextBlock: () => Editor;
method moveFocusToEndOfNextInline
moveFocusToEndOfNextInline: () => Editor;
method moveFocusToEndOfNextText
moveFocusToEndOfNextText: () => Editor;
method moveFocusToEndOfNode
moveFocusToEndOfNode: (node: Block | Document | Inline | Text) => Editor;
method moveFocusToEndOfPreviousBlock
moveFocusToEndOfPreviousBlock: () => Editor;
method moveFocusToEndOfPreviousInline
moveFocusToEndOfPreviousInline: () => Editor;
method moveFocusToEndOfPreviousText
moveFocusToEndOfPreviousText: () => Editor;
method moveFocusToEndOfText
moveFocusToEndOfText: () => Editor;
method moveFocusToStartOfBlock
moveFocusToStartOfBlock: () => Editor;
method moveFocusToStartOfDocument
moveFocusToStartOfDocument: () => Editor;
method moveFocusToStartOfInline
moveFocusToStartOfInline: () => Editor;
method moveFocusToStartOfNextBlock
moveFocusToStartOfNextBlock: () => Editor;
method moveFocusToStartOfNextInline
moveFocusToStartOfNextInline: () => Editor;
method moveFocusToStartOfNextText
moveFocusToStartOfNextText: () => Editor;
method moveFocusToStartOfNode
moveFocusToStartOfNode: (node: Block | Document | Inline | Text) => Editor;
method moveFocusToStartOfPreviousBlock
moveFocusToStartOfPreviousBlock: () => Editor;
method moveFocusToStartOfPreviousInline
moveFocusToStartOfPreviousInline: () => Editor;
method moveFocusToStartOfPreviousText
moveFocusToStartOfPreviousText: () => Editor;
method moveFocusToStartOfText
moveFocusToStartOfText: () => Editor;
method moveFocusWordBackward
moveFocusWordBackward: () => Editor;
method moveFocusWordForward
moveFocusWordForward: () => Editor;
method moveForward
moveForward: (n?: number) => Editor;
method moveNodeByKey
moveNodeByKey: (key: string, newKey: string, newIndex: number) => Editor;
method moveNodeByPath
moveNodeByPath: ( path: Immutable.List<number>, newPath: Immutable.List<number>, newIndex: number) => Editor;
method moveStartBackward
moveStartBackward: (n?: number) => Editor;
method moveStartForward
moveStartForward: (n?: number) => Editor;
method moveStartTo
moveStartTo: ( path: string | number | Immutable.List<number>, n?: number) => Editor;
method moveStartToEndOfBlock
moveStartToEndOfBlock: () => Editor;
method moveStartToEndOfDocument
moveStartToEndOfDocument: () => Editor;
method moveStartToEndOfInline
moveStartToEndOfInline: () => Editor;
method moveStartToEndOfNextBlock
moveStartToEndOfNextBlock: () => Editor;
method moveStartToEndOfNextInline
moveStartToEndOfNextInline: () => Editor;
method moveStartToEndOfNextText
moveStartToEndOfNextText: () => Editor;
method moveStartToEndOfNode
moveStartToEndOfNode: (node: Block | Document | Inline | Text) => Editor;
method moveStartToEndOfPreviousBlock
moveStartToEndOfPreviousBlock: () => Editor;
method moveStartToEndOfPreviousInline
moveStartToEndOfPreviousInline: () => Editor;
method moveStartToEndOfPreviousText
moveStartToEndOfPreviousText: () => Editor;
method moveStartToEndOfText
moveStartToEndOfText: () => Editor;
method moveStartToStartOfBlock
moveStartToStartOfBlock: () => Editor;
method moveStartToStartOfDocument
moveStartToStartOfDocument: () => Editor;
method moveStartToStartOfInline
moveStartToStartOfInline: () => Editor;
method moveStartToStartOfNextBlock
moveStartToStartOfNextBlock: () => Editor;
method moveStartToStartOfNextInline
moveStartToStartOfNextInline: () => Editor;
method moveStartToStartOfNextText
moveStartToStartOfNextText: () => Editor;
method moveStartToStartOfNode
moveStartToStartOfNode: (node: Block | Document | Inline | Text) => Editor;
method moveStartToStartOfPreviousBlock
moveStartToStartOfPreviousBlock: () => Editor;
method moveStartToStartOfPreviousInline
moveStartToStartOfPreviousInline: () => Editor;
method moveStartToStartOfPreviousText
moveStartToStartOfPreviousText: () => Editor;
method moveStartToStartOfText
moveStartToStartOfText: () => Editor;
method moveStartWordBackward
moveStartWordBackward: () => Editor;
method moveStartWordForward
moveStartWordForward: () => Editor;
method moveTo
moveTo: ( path: string | number | Immutable.List<number>, offset?: number) => Editor;
method moveToAnchor
moveToAnchor: () => Editor;
method moveToEnd
moveToEnd: () => Editor;
method moveToEndOfBlock
moveToEndOfBlock: () => Editor;
method moveToEndOfDocument
moveToEndOfDocument: () => Editor;
method moveToEndOfInline
moveToEndOfInline: () => Editor;
method moveToEndOfNextBlock
moveToEndOfNextBlock: () => Editor;
method moveToEndOfNextInline
moveToEndOfNextInline: () => Editor;
method moveToEndOfNextText
moveToEndOfNextText: () => Editor;
method moveToEndOfNode
moveToEndOfNode: (node: Block | Document | Inline | Text) => Editor;
method moveToEndOfPreviousBlock
moveToEndOfPreviousBlock: () => Editor;
method moveToEndOfPreviousInline
moveToEndOfPreviousInline: () => Editor;
method moveToEndOfPreviousText
moveToEndOfPreviousText: () => Editor;
method moveToEndOfText
moveToEndOfText: () => Editor;
method moveToFocus
moveToFocus: () => Editor;
method moveToRangeOfDocument
moveToRangeOfDocument: () => Editor;
method moveToRangeOfNode
moveToRangeOfNode: (node: Block | Document | Inline | Text) => Editor;
method moveToStart
moveToStart: () => Editor;
method moveToStartOfBlock
moveToStartOfBlock: () => Editor;
method moveToStartOfDocument
moveToStartOfDocument: () => Editor;
method moveToStartOfInline
moveToStartOfInline: () => Editor;
method moveToStartOfNextBlock
moveToStartOfNextBlock: () => Editor;
method moveToStartOfNextInline
moveToStartOfNextInline: () => Editor;
method moveToStartOfNextText
moveToStartOfNextText: () => Editor;
method moveToStartOfNode
moveToStartOfNode: (node: Block | Document | Inline | Text) => Editor;
method moveToStartOfPreviousBlock
moveToStartOfPreviousBlock: () => Editor;
method moveToStartOfPreviousInline
moveToStartOfPreviousInline: () => Editor;
method moveToStartOfPreviousText
moveToStartOfPreviousText: () => Editor;
method moveToStartOfText
moveToStartOfText: () => Editor;
method moveWordBackward
moveWordBackward: () => Editor;
method moveWordForward
moveWordForward: () => Editor;
method normalize
normalize: () => Editor;
method query
query: (query: string | ((...args: any[]) => any), ...args: any[]) => any;
method redo
redo: () => Editor;
method registerCommand
registerCommand: (command: string) => Editor;
method registerQuery
registerQuery: (query: string) => Editor;
method removeAllMarksByKey
removeAllMarksByKey: (key: string) => Editor;
method removeAllMarksByPath
removeAllMarksByPath: (path: Immutable.List<number>) => Editor;
method removeAnnotation
removeAnnotation: ( annotation: AnnotationProperties | AnnotationJSON | Annotation) => Editor;
method removeMark
removeMark: (mark: string | MarkProperties | MarkJSON | Mark) => Editor;
method removeMarkAtRange
removeMarkAtRange: ( range: RangeTypeProperties | RangeTypeJSON | RangeType, mark: string | MarkProperties | MarkJSON | Mark) => Editor;
method removeMarkByKey
removeMarkByKey: ( key: string, offset: number, length: number, mark: string | MarkProperties | MarkJSON | Mark) => Editor;
method removeMarkByPath
removeMarkByPath: ( path: Immutable.List<number>, offset: number, length: number, mark: string | MarkProperties | MarkJSON | Mark) => Editor;
method removeMarksByPath
removeMarksByPath: ( path: Immutable.List<number>, offset: number, length: number, marks: | Array<string | MarkProperties | MarkJSON | Mark> | Immutable.Set<string | MarkProperties | MarkJSON | Mark>) => Editor;
method removeNodeByKey
removeNodeByKey: (key: string) => Editor;
method removeNodeByPath
removeNodeByPath: (path: Immutable.List<number>) => Editor;
method removeTextByKey
removeTextByKey: (key: string, offset: number, length: number) => Editor;
method removeTextByPath
removeTextByPath: ( path: Immutable.List<number>, offset: number, length: number) => Editor;
method replaceMark
replaceMark: ( mark: string | MarkProperties | MarkJSON | Mark, newMark: string | MarkProperties | MarkJSON | Mark) => Editor;
method replaceNodeByKey
replaceNodeByKey: ( key: string, node: Block | Document | Inline | Text) => Editor;
method replaceNodeByPath
replaceNodeByPath: ( path: Immutable.List<number>, newNode: Block | Document | Inline | Text) => Editor;
method replaceTextByKey
replaceTextByKey: ( key: string, node: Block | Document | Inline | Text) => Editor;
method replaceTextByPath
replaceTextByPath: ( path: Immutable.List<number>, offset: number, length: number, text: string, marks?: Immutable.Set<Mark> | Mark[]) => Editor;
method run
run: (key: string, ...args: any[]) => Editor;
method save
save: (operation: Operation) => void;
method select
select: ( properties: string | RangeTypeProperties | RangeTypeJSON | RangeType, options?: { snapshot?: boolean | undefined }) => Editor;
method setAnchor
setAnchor: (point: Point) => void;
method setAnnotation
setAnnotation: ( annotation: Annotation, newProperties: AnnotationProperties | AnnotationJSON | Annotation) => Editor;
method setBlocks
setBlocks: (properties: string | Block | BlockProperties | BlockJSON) => Editor;
method setBlocksAtRange
setBlocksAtRange: ( range: RangeTypeProperties | RangeTypeJSON | RangeType, properties: string | Block | BlockProperties | BlockJSON) => Editor;
method setData
setData: (data: Data) => Editor;
method setEnd
setEnd: (point: Point) => void;
method setFocus
setFocus: (point: Point) => void;
method setInlines
setInlines: (properties: string | Inline | InlineProperties) => Editor;
method setInlinesAtRange
setInlinesAtRange: ( range: RangeTypeProperties | RangeTypeJSON | RangeType, properties: string | Inline | InlineProperties | InlineJSON) => Editor;
method setMarkByKey
setMarkByKey: ( key: string, offset: number, length: number, properties: string | MarkProperties | MarkJSON | Mark, newProperties: | string | Partial<MarkProperties> | Partial<MarkJSON> | Partial<Mark>) => Editor;
method setMarkByPath
setMarkByPath: ( path: Immutable.List<number>, offset: number, length: number, properties: string | MarkProperties | MarkJSON | Mark, newProperties: | string | Partial<MarkProperties> | Partial<MarkJSON> | Partial<Mark>) => Editor;
method setNodeByKey
setNodeByKey: ( key: string, properties: string | Partial<BlockProperties> | Partial<InlineProperties>) => Editor;
method setNodeByPath
setNodeByPath: ( path: Immutable.List<number>, newProperties: string | NodeProperties) => Editor;
method setReadOnly
setReadOnly: (readOnly: boolean) => Editor;
method setStart
setStart: (point: Point) => void;
method setTextByKey
setTextByKey: (key: string, text: string, marks: Immutable.Set<Mark>) => Editor;
method setTextByPath
setTextByPath: ( path: Immutable.List<number>, text: string, marks: Immutable.Set<Mark>) => Editor;
method setValue
setValue: (value: Value, options?: { normalize: boolean }) => Editor;
Set the editor's value state. You can optionally provide a normalize option to either for the editor to completely re-normalize the new value based on its schema or not. By default, the editor will re-normalize only if the value is not equal to its previously seen value (which it knows was normalized).
method snapshotSelection
snapshotSelection: () => Editor;
method splitBlock
splitBlock: (depth?: number) => Editor;
method splitBlockAtRange
splitBlockAtRange: ( range: RangeTypeProperties | RangeTypeJSON | RangeType, height?: number) => Editor;
method splitDescendantsByKey
splitDescendantsByKey: ( key: string, textKey: string, textOffset: number) => Editor;
method splitDescendantsByPath
splitDescendantsByPath: ( path: Immutable.List<number>, textPath: Immutable.List<number>, textOffset: number) => Editor;
method splitInline
splitInline: (depth: number) => Editor;
method splitInlineAtRange
splitInlineAtRange: ( range: RangeTypeProperties | RangeTypeJSON | RangeType, height?: number) => Editor;
method splitNodeByKey
splitNodeByKey: (key: string, offset: number) => Editor;
method splitNodeByPath
splitNodeByPath: ( path: Immutable.List<number>, position: number, options?: { target?: number | undefined }) => Editor;
method toggleMark
toggleMark: (mark: string | MarkProperties | MarkJSON | Mark) => Editor;
method toggleMarkAtRange
toggleMarkAtRange: ( range: RangeTypeProperties | RangeTypeJSON | RangeType, mark: string | MarkProperties | MarkJSON | Mark) => Editor;
method undo
undo: () => Editor;
method unwrapBlock
unwrapBlock: ( properties: string | Block | BlockProperties | BlockJSON) => Editor;
method unwrapBlockAtRange
unwrapBlockAtRange: ( range: RangeTypeProperties | RangeTypeJSON | RangeType, properties: string | Block | BlockProperties | BlockJSON) => Editor;
method unwrapBlockByKey
unwrapBlockByKey: (key: string, properties: string | BlockProperties) => Editor;
method unwrapBlockByPath
unwrapBlockByPath: (path: Path, properties: string | BlockProperties) => Editor;
method unwrapChildrenByKey
unwrapChildrenByKey: (key: string) => Editor;
method unwrapChildrenByPath
unwrapChildrenByPath: (path: Immutable.List<number> | number[]) => Editor;
method unwrapInline
unwrapInline: ( properties: string | Inline | InlineProperties | InlineJSON) => Editor;
method unwrapInlineAtRange
unwrapInlineAtRange: ( range: RangeTypeProperties | RangeTypeJSON | RangeType, properties: string | Inline | InlineProperties | InlineJSON) => Editor;
method unwrapInlineByKey
unwrapInlineByKey: ( key: string, properties: string | InlineProperties) => Editor;
method unwrapInlineByPath
unwrapInlineByPath: ( path: Path, properties: string | InlineProperties) => Editor;
method unwrapNodeByKey
unwrapNodeByKey: (key: string) => Editor;
method unwrapNodeByPath
unwrapNodeByPath: (path: Immutable.List<number>) => Editor;
method withoutMerging
withoutMerging: (fn: () => void) => Editor;
method withoutNormalizing
withoutNormalizing: (fn: () => void) => Editor;
method withoutSaving
withoutSaving: (fn: () => void) => Editor;
method wrapBlock
wrapBlock: (properties: string | Block | BlockProperties | BlockJSON) => Editor;
method wrapBlockAtRange
wrapBlockAtRange: ( range: RangeTypeProperties | RangeTypeJSON | RangeType, properties: string | Block | BlockProperties | BlockJSON) => Editor;
method wrapBlockByKey
wrapBlockByKey: (key: string, properties: string | BlockProperties) => Editor;
method wrapBlockByPath
wrapBlockByPath: (path: Immutable.List<number>, block: string | Block) => Editor;
method wrapInline
wrapInline: ( properties: string | Inline | InlineProperties | InlineJSON) => Editor;
method wrapInlineAtRange
wrapInlineAtRange: ( range: RangeTypeProperties | RangeTypeJSON | RangeType, properties: string | Inline | InlineProperties | InlineJSON) => Editor;
method wrapInlineByKey
wrapInlineByKey: (key: string, properties: string | InlineProperties) => Editor;
method wrapInlineByPath
wrapInlineByPath: (path: Path, properties: string | InlineProperties) => Editor;
method wrapNodeByKey
wrapNodeByKey: (key: string, parent: Block | Document | Inline | Text) => Editor;
method wrapNodeByPath
wrapNodeByPath: ( path: Immutable.List<number>, parent: Block | Document | Inline | Text) => Editor;
method wrapText
wrapText: (prefix: string, suffix?: string) => Editor;
method wrapTextAtRange
wrapTextAtRange: ( range: RangeTypeProperties | RangeTypeJSON | RangeType, prefix: string, suffix?: string) => Editor;
class Inline
class Inline extends BaseNode {}
property nodes
nodes: Immutable.List<Inline | Text>;
property object
object: string;
method create
static create: ( properties: InlineProperties | InlineJSON | Inline | string) => Inline;
method createList
static createList: ( elements?: | Immutable.List<InlineProperties | InlineJSON | Inline | string> | Array<InlineProperties | InlineJSON | Inline | string>) => Immutable.List<Inline>;
method fromJS
static fromJS: (properties: InlineProperties | InlineJSON | Inline) => Inline;
method fromJSON
static fromJSON: (properties: InlineProperties | InlineJSON | Inline) => Inline;
method isInline
static isInline: (maybeInline: any) => maybeInline is Inline;
method isInlineList
static isInlineList: ( maybeInlineList: any) => maybeInlineList is Immutable.List<Inline>;
method toJS
toJS: () => InlineJSON;
method toJSON
toJSON: () => InlineJSON;
class InsertNodeOperation
class InsertNodeOperation extends BaseOperation {}
class InsertTextOperation
class InsertTextOperation extends BaseOperation {}
class Leaf
class Leaf extends Immutable.Record({}) {}
property marks
marks: any;
property object
object: string;
property text
text: string;
method addMark
addMark: (mark: Mark) => Leaf;
method addMarks
addMarks: (marks: Immutable.Set<Mark>) => Leaf;
method create
static create: (properties: LeafProperties | LeafJSON | Leaf) => Leaf;
method createLeaves
static createLeaves: (leaves: Immutable.List<Leaf>) => Immutable.List<Leaf>;
method createList
static createList: ( attrs?: | Array<LeafProperties | LeafJSON | Leaf> | Immutable.List<LeafProperties | LeafJSON | Leaf>) => Immutable.List<Leaf>;
method fromJS
static fromJS: (properties: LeafJSON | LeafProperties) => Leaf;
method fromJSON
static fromJSON: (properties: LeafJSON | LeafProperties) => Leaf;
method insertText
insertText: (offset: number, string: string) => Leaf;
method isLeaf
static isLeaf: (maybeLeaf: any) => maybeLeaf is Leaf;
method isLeafList
static isLeafList: (maybeLeafList: any) => maybeLeafList is Immutable.List<Leaf>;
method removeMark
removeMark: (mark: Mark) => Leaf;
method splitLeaves
static splitLeaves: ( leaves: Immutable.List<Leaf>, offset: number) => Array<Immutable.List<Leaf>>;
method toJS
toJS: () => LeafJSON;
method toJSON
toJSON: () => LeafJSON;
method updateMark
updateMark: (mark: Mark, newMark: Mark) => Leaf;
class Mark
class Mark extends Immutable.Record({}) {}
property data
data: Data;
property object
object: string;
property type
type: string;
method create
static create: (properties: MarkProperties | MarkJSON | Mark | string) => Mark;
method createProperties
static createProperties: ( attrs: Partial<MarkProperties | MarkJSON | Mark | string>) => MarkProperties;
method createSet
static createSet: ( element?: | Array<MarkProperties | MarkJSON | Mark | string> | Immutable.Set<MarkProperties | MarkJSON | Mark | string>) => Immutable.Set<Mark>;
method fromJS
static fromJS: (properties: MarkProperties | MarkJSON | Mark) => Mark;
method fromJSON
static fromJSON: (properties: MarkProperties | MarkJSON | Mark) => Mark;
method isMark
static isMark: (maybeMark: any) => maybeMark is Mark;
method isMarkSet
static isMarkSet: (maybeMarkSet: any) => maybeMarkSet is Immutable.Set<Mark>;
method toJS
toJS: () => MarkJSON;
method toJSON
toJSON: () => MarkJSON;
class MergeNodeOperation
class MergeNodeOperation extends BaseOperation {}
property data
data: Data;
property path
path: Immutable.List<number>;
property position
position: number;
property properties
properties: NodeProperties;
property type
type: string;
class MoveNodeOperation
class MoveNodeOperation extends BaseOperation {}
class Point
class Point extends Immutable.Record({}) {}
property isSet
readonly isSet: boolean;
property isUnset
readonly isUnset: boolean;
property key
key: string;
property object
object: string;
property offset
offset: number;
property path
path: Immutable.List<number>;
method create
static create: (properties: PointProperties | PointJSON | Point) => Point;
method createProperties
static createProperties: ( properties: PointProperties | PointJSON | Point) => Point;
method fromJS
static fromJS: (properties: PointJSON | PointProperties) => Point;
method fromJSON
static fromJSON: (properties: PointJSON | PointProperties) => Point;
method isAfterPoint
isAfterPoint: (point: Point) => boolean;
method isAfterRange
isAfterRange: (range: RangeType) => boolean;
method isAtEndOfNode
isAtEndOfNode: (node: Node) => boolean;
method isAtEndofRange
isAtEndofRange: (range: RangeType) => boolean;
method isAtStartOfNode
isAtStartOfNode: (node: Node) => boolean;
method isAtStartOfRange
isAtStartOfRange: (range: RangeType) => boolean;
method isBeforePoint
isBeforePoint: (point: Point) => boolean;
method isBeforeRange
isBeforeRange: (range: RangeType) => boolean;
method isInNode
isInNode: (node: Node) => boolean;
method isInRange
isInRange: (range: RangeType) => boolean;
method isPoint
static isPoint: (maybePoint: any) => maybePoint is Point;
method moveBackward
moveBackward: (n?: number) => this;
method moveForward
moveForward: (n?: number) => this;
method moveTo
moveTo: ( path: string | number | Immutable.List<number>, offset?: number) => this;
method moveToEndOfNode
moveToEndOfNode: (node: Node) => this;
method moveToStartOfNode
moveToStartOfNode: (node: Node) => this;
method normalize
normalize: (node: Node) => this;
method setKey
setKey: (key: string) => this;
method setOffset
setOffset: (offset: number) => this;
method setPath
setPath: (path: Immutable.List<number> | number[]) => this;
method toJS
toJS: (options?: { preserveKeys?: boolean | undefined }) => PointJSON;
method toJSON
toJSON: (options?: { preserveKeys?: boolean | undefined }) => PointJSON;
method unset
unset: () => this;
class Range
class Range extends BaseRange {}
property anchor
anchor: Point;
property focus
focus: Point;
property object
object: string;
method create
static create: ( properties: RangeTypeProperties | RangeTypeJSON | RangeType) => Range;
method createList
static createList: ( elements?: | Array<RangeTypeProperties | RangeTypeJSON | RangeType> | Immutable.List<RangeTypeProperties | RangeTypeJSON | RangeType>) => Immutable.List<Range>;
method createProperties
static createProperties: ( attrs: RangeTypeProperties | RangeTypeJSON | RangeType) => RangeProperties;
method fromJS
static fromJS: (properties: RangeTypeJSON) => Range;
method fromJSON
static fromJSON: (properties: RangeTypeJSON) => Range;
method isRange
static isRange: (maybeRange: any) => maybeRange is RangeType;
method toJS
toJS: (options?: { preserveKeys?: boolean | undefined }) => RangeJSON;
method toJSON
toJSON: (options?: { preserveKeys?: boolean | undefined }) => RangeJSON;
class RemoveAnnotationOperation
class RemoveAnnotationOperation extends BaseOperation {}
class RemoveMarkOperation
class RemoveMarkOperation extends BaseOperation {}
class RemoveNodeOperation
class RemoveNodeOperation extends BaseOperation {}
class RemoveTextOperation
class RemoveTextOperation extends BaseOperation {}
class Selection
class Selection extends BaseRange {}
property anchor
anchor: Point;
property focus
focus: Point;
property isBlurred
readonly isBlurred: boolean;
property isFocused
isFocused: boolean;
property marks
marks: Immutable.Set<Mark>;
property object
object: string;
method create
static create: ( properties: RangeTypeProperties | RangeTypeJSON | RangeType) => Selection;
method createProperties
static createProperties: ( attrs: RangeTypeProperties | RangeTypeJSON | RangeType | string) => SelectionProperties;
method fromJS
static fromJS: (properties: RangeTypeProperties | RangeTypeJSON) => Selection;
method fromJSON
static fromJSON: (properties: RangeTypeProperties | RangeTypeJSON) => Selection;
method isSelection
isSelection: (maybeSelection: any) => maybeSelection is Selection;
method setIsFocused
setIsFocused: (value: boolean) => Selection;
method setMarks
setMarks: (marks: Immutable.Set<Mark>) => Selection;
method setProperties
setProperties: ( properties: RangeTypeProperties | RangeTypeJSON | RangeType | string) => Selection;
method toJS
toJS: () => SelectionJSON;
method toJSON
toJSON: () => SelectionJSON;
class SetAnnotationOperation
class SetAnnotationOperation extends BaseOperation {}
property data
data: Data;
property newProperties
newProperties: AnnotationProperties;
property properties
properties: AnnotationProperties;
property type
type: string;
class SetMarkOperation
class SetMarkOperation extends BaseOperation {}
property data
data: Data;
property newProperties
newProperties: MarkProperties;
property path
path: Immutable.List<number>;
property properties
properties: MarkProperties;
property type
type: string;
class SetNodeOperation
class SetNodeOperation extends BaseOperation {}
property data
data: Data;
property newProperties
newProperties: NodeProperties;
property path
path: Immutable.List<number>;
property properties
properties: NodeProperties;
property type
type: string;
class SetSelectionOperation
class SetSelectionOperation extends BaseOperation {}
property data
data: Data;
property newProperties
newProperties: SelectionProperties;
property properties
properties: SelectionProperties;
property type
type: string;
class SetValueOperation
class SetValueOperation extends BaseOperation {}
property data
data: Data;
property newProperties
newProperties: ValueProperties;
property properties
properties: ValueProperties;
property type
type: string;
class SlateError
class SlateError extends Error {}
property code
code: ErrorCode;
class SplitNodeOperation
class SplitNodeOperation extends BaseOperation {}
class Text
class Text extends Immutable.Record({}) {}
property key
key: string;
property marks
readonly marks: any;
property object
object: string;
property text
readonly text: string;
method addMark
addMark: (mark: MarkProperties | MarkJSON | Mark | string) => Text;
method addMarks
addMarks: ( marks: | Array<MarkProperties | MarkJSON | Mark | string> | Immutable.Set<MarkProperties | MarkJSON | Mark | string>) => Text;
method create
static create: (properties?: TextProperties | TextJSON | Text | string) => Text;
method createList
static createList: ( elements?: | Array<TextProperties | TextJSON | Text | string> | Immutable.List<TextProperties | TextJSON | Text | string>) => Immutable.List<Text>;
method fromJS
static fromJS: (properties: TextJSON | TextProperties | Text) => Text;
method fromJSON
static fromJSON: (properties: TextJSON | TextProperties | Text) => Text;
method getFirstText
getFirstText: () => Text | null;
method getKeysToPathsTable
getKeysToPathsTable: () => { [key: string]: number[] };
method getLastText
getLastText: () => Text | null;
method getLeaves
getLeaves: ( annotations: Immutable.Map<string, Annotation>, decorations?: Decoration[] | Immutable.List<Decoration>) => Immutable.List<Leaf>;
method getNode
getNode: (path: Path) => Node | null;
method getPath
getPath: ( key: Immutable.List<number> | string | Node) => Immutable.List<number> | null;
method getText
getText: () => string;
method hasNode
hasNode: (path: Path) => boolean;
method insertText
insertText: (index: number, string: string) => Text;
method isText
static isText: (maybeText: any) => maybeText is Text;
method isTextList
static isTextList: (maybeTextList: any) => maybeTextList is Immutable.List<Text>;
method mergeText
mergeText: (other: Text) => Text;
method normalize
normalize: (editor: Editor) => () => void | void;
method regenerateKey
regenerateKey: () => Text;
method removeMark
removeMark: (mark: MarkProperties | MarkJSON | Mark | string) => Text;
method removeText
removeText: (index: number, length: number) => Text;
method resolvePath
resolvePath: (path: Path, index?: number) => Immutable.List<number>;
method setMark
setMark: ( properties: MarkProperties | MarkJSON | Mark | string, newProperties: MarkProperties) => Text;
method splitText
splitText: (index: number) => Text[];
method toJS
toJS: (options?: { preserveKeys?: boolean | undefined }) => TextJSON;
method toJSON
toJSON: (options?: { preserveKeys?: boolean | undefined }) => TextJSON;
method validate
validate: (editor: Editor) => Error | void;
class Value
class Value extends Immutable.Record({}) {}
property activeMarks
readonly activeMarks: Immutable.OrderedSet<Mark>;
property anchorBlock
readonly anchorBlock: Block;
property anchorInline
readonly anchorInline: Inline;
property anchorText
readonly anchorText: Text;
property annotations
annotations: Immutable.Map<string, Annotation>;
property blocks
readonly blocks: Immutable.List<Block>;
property data
data: Data;
property document
document: Document;
property endBlock
readonly endBlock: Block;
property endInline
readonly endInline: Inline;
property endText
readonly endText: Text;
property focusBlock
readonly focusBlock: Block;
property focusInline
readonly focusInline: Inline;
property focusText
readonly focusText: Text;
property fragment
readonly fragment: Document;
property inlines
readonly inlines: Immutable.List<Inline>;
property marks
readonly marks: Immutable.OrderedSet<Mark>;
property nextBlock
readonly nextBlock: Block;
property nextInline
readonly nextInline: Inline;
property nextText
readonly nextText: Text;
property object
object: string;
property previousBlock
readonly previousBlock: Block;
property previousInline
readonly previousInline: Inline;
property previousText
readonly previousText: Text;
property selection
selection: Selection;
property startBlock
readonly startBlock: Block;
property startInline
readonly startInline: Inline;
property startText
readonly startText: Text;
property texts
readonly texts: Immutable.List<Text>;
method addAnnotation
addAnnotation: ( annotation: Annotation | AnnotationProperties | AnnotationJSON) => Value;
method addMark
addMark: (path: Path, mark: MarkProperties | MarkJSON | Mark | string) => Value;
method create
static create: (properties?: ValueProperties | ValueJSON | Value) => Value;
method createProperties
static createProperties: ( attrs: ValueProperties | ValueJSON | Value) => ValueProperties;
method fromJS
static fromJS: (properties: ValueProperties | ValueJSON) => Value;
method fromJSON
static fromJSON: (properties: ValueProperties | ValueJSON) => Value;
method insertNode
insertNode: (path: Path, node: Node) => Value;
method insertText
insertText: (path: Path, offset: number, text: string) => Value;
method isValue
static isValue: (maybeValue: any) => maybeValue is Value;
method mapPoints
mapPoints: (iterator: (point: Point) => Point) => Value;
method mapRanges
mapRanges: (iterator: (val: Selection | Annotation) => any) => Value;
method mergeNode
mergeNode: (path: Path) => Value;
method moveNode
moveNode: ( path: Immutable.List<number>, newPath: Immutable.List<number>, newIndex?: number) => Value;
method removeAnnotation
removeAnnotation: ( annotation: Annotation | AnnotationProperties | AnnotationJSON) => Value;
method removeMark
removeMark: ( path: Path, mark: MarkProperties | MarkJSON | Mark | string) => Value;
method removeNode
removeNode: (path: Path) => Value;
method removeText
removeText: (path: Path, offset: number, text: string) => Value;
method setAnnotation
setAnnotation: ( properties: AnnotationProperties | AnnotationJSON | Annotation, newProperties: AnnotationProperties | AnnotationJSON | Annotation) => Value;
method setMark
setMark: ( path: Path, properties: MarkProperties, newProperties: MarkProperties) => Value;
method setNode
setNode: (path: Path, properties: NodeProperties) => Value;
method setProperties
setProperties: (properties: ValueProperties) => Value;
method setSelection
setSelection: ( properties: RangeTypeProperties | RangeTypeJSON | RangeType | string) => Value;
method splitNode
splitNode: (path: Path, position: number, properties: NodeProperties) => Value;
method toJS
toJS: (options?: { preserveAnnotations?: boolean | undefined; preserveData?: boolean | undefined; preserveSelection?: boolean | undefined;}) => ValueJSON;
method toJSON
toJSON: (options?: { preserveAnnotations?: boolean | undefined; preserveData?: boolean | undefined; preserveSelection?: boolean | undefined;}) => ValueJSON;
Interfaces
interface AnnotationJSON
interface AnnotationJSON {}
interface AnnotationProperties
interface AnnotationProperties {}
interface BlockJSON
interface BlockJSON {}
interface BlockProperties
interface BlockProperties {}
interface Controller
interface Controller {}
method addAnnotation
addAnnotation: ( annotation: Annotation | AnnotationProperties | AnnotationJSON) => Controller;
Add annotation
method addMark
addMark: (mark: MarkProperties | MarkJSON | Mark | string) => Controller;
Add a mark to the characters in the current selection
method addMarkAtRange
addMarkAtRange: ( range: RangeType | RangeTypeProperties | RangeTypeJSON, mark: Mark | MarkProperties | string) => Controller;
Add a mark to the characters in the range. Passing a string as
mark
will implicitly create a mark with thattype
method addMarkByKey
addMarkByKey: ( key: string, offset: number, length: number, mark: MarkProperties | MarkJSON | Mark | string) => Controller;
Add a mark to length characters starting at an offset in a node by key
method addMarkByPath
addMarkByPath: ( path: Immutable.List<number>, offset: number, length: number, mark: MarkProperties | MarkJSON | Mark | string) => Controller;
Add a mark to length characters starting at an offset in a node by path
method addMarks
addMarks: ( mark: | Set<MarkProperties | MarkJSON | Mark | string> | Array<MarkProperties | MarkJSON | Mark | string>) => Controller;
method addMarksAtRange
addMarksAtRange: ( range: RangeType | RangeTypeProperties | RangeTypeJSON, marks: | Array<MarkProperties | MarkJSON | Mark | string> | Immutable.Set<MarkProperties | MarkJSON | Mark | string>) => Controller;
method addMarksByPath
addMarksByPath: ( path: Immutable.List<number>, offset: number, length: number, marks: | Array<MarkProperties | MarkJSON | Mark | string> | Immutable.Set<MarkProperties | MarkJSON | Mark | string>) => Controller;
method applyOperation
applyOperation: ( operation: Operation | OperationJSON | OperationProperties) => Controller;
Apply an
operation
to the controller, updating its value.
method blur
blur: () => Controller;
Blur the current selection
method command
command: ( type: string | ((...args: any[]) => any), ...args: any[]) => Controller;
method delete
delete: () => Controller;
Delete everything in the current selection.
method deleteAtRange
deleteAtRange: ( range: RangeType | RangeTypeProperties | RangeTypeJSON) => Controller;
Delete everything in the range
method deleteBackward
deleteBackward: (n?: number) => Controller;
Delete backward n characters at the current cursor. If the selection is expanded, behaviour is equivalent to delete()
method deleteBackwardAtRange
deleteBackwardAtRange: ( range: RangeType | RangeTypeProperties | RangeTypeJSON, n?: number) => Controller;
Delete backward n characters at a range
method deleteCharBackward
deleteCharBackward: () => Controller;
Delete backward one character
method deleteCharBackwardAtRange
deleteCharBackwardAtRange: ( range: RangeType | RangeTypeProperties | RangeTypeJSON) => Controller;
Delete backward until the char boundary at a range
method deleteCharForward
deleteCharForward: () => Controller;
Delete forward one character
method deleteCharForwardAtRange
deleteCharForwardAtRange: ( range: RangeType | RangeTypeProperties | RangeTypeJSON) => Controller;
Delete forward until the char boundary at a range
method deleteForward
deleteForward: (n?: number) => Controller;
Delete backward n characters at the current cursor. If the selection is expanded, behaviour is equivalent to delete()
method deleteForwardAtRange
deleteForwardAtRange: ( range: RangeType | RangeTypeProperties | RangeTypeJSON, n?: number) => Controller;
Delete forward n characters at a range
method deleteLineBackward
deleteLineBackward: () => Controller;
Delete backward one line
method deleteLineBackwardAtRange
deleteLineBackwardAtRange: ( range: RangeType | RangeTypeProperties | RangeTypeJSON) => Controller;
Delete backward until the line boundary at a range
method deleteLineForward
deleteLineForward: () => Controller;
Delete forward one line
method deleteLineForwardAtRange
deleteLineForwardAtRange: ( range: RangeType | RangeTypeProperties | RangeTypeJSON) => Controller;
Delete forward until the line boundary at a range
method deleteWordBackward
deleteWordBackward: () => Controller;
Delete backward one word.
method deleteWordBackwardAtRange
deleteWordBackwardAtRange: ( range: RangeType | RangeTypeProperties | RangeTypeJSON) => Controller;
Delete backward until the word boundary at a range
method deleteWordForward
deleteWordForward: () => Controller;
Delete forward one word
method deleteWordForwardAtRange
deleteWordForwardAtRange: ( range: RangeType | RangeTypeProperties | RangeTypeJSON) => Controller;
Delete forward until the word boundary at a range
method deselect
deselect: () => Controller;
Unset the selection
method flip
flip: () => Controller;
Flip the selection
method focus
focus: () => Controller;
Focus the current selection
method hasCommand
hasCommand: (type: string) => boolean;
Check if a command by type has been registered.
method hasQuery
hasQuery: (type: string) => boolean;
Check if a query by type has been registered.
method insertBlock
insertBlock: (block: Block | BlockProperties | BlockJSON | string) => Controller;
Insert a new block at the same level as the current block, splitting the current block to make room if it is non-empty. If the selection is expanded, it will be deleted first.
method insertBlockAtRange
insertBlockAtRange: ( range: RangeType | RangeTypeProperties | RangeTypeJSON, block: Block | BlockProperties | BlockJSON | string) => Controller;
Insert a block node at range, splitting text to make room if it is non-empty. If the range is expanded, it will be deleted first.
method insertFragment
insertFragment: (fragment: Document) => Controller;
Insert a document fragment at the current selection. If the selection is expanded, it will be deleted first.
method insertFragmentAtRange
insertFragmentAtRange: ( range: RangeType | RangeTypeProperties | RangeTypeJSON, fragment: Document) => Controller;
Insert a document fragment at a range, if the range is expanded, it will be deleted first.
method insertFragmentByKey
insertFragmentByKey: ( key: string, index: number, fragment: Document) => Controller;
Insert a document fragment at index inside a parent node by key
method insertFragmentByPath
insertFragmentByPath: ( path: Immutable.List<number>, index: number, fragment: Document) => Controller;
Insert a document fragment at index inside a parent node by path
method insertInline
insertInline: ( inline: Inline | InlineProperties | InlineJSON | string) => Controller;
Insert a new inline at the current cursor position, splitting the text to make room if it is non-empty. If the selection is expanded, it will be deleted first.
method insertInlineAtRange
insertInlineAtRange: ( range: RangeType | RangeTypeProperties | RangeTypeJSON, inline: Inline | InlineJSON | InlineProperties) => Controller;
Insert a new inline at range, splitting text to make room if it is non-empty. If the range is expanded, it will be deleted first.
method insertNodeByKey
insertNodeByKey: (key: string, index: number, node: Node) => Controller;
Insert a node at index inside a parent node by key
method insertNodeByPath
insertNodeByPath: ( path: Immutable.List<number>, index: number, node: Node) => Controller;
Insert a node at index inside a parent node by apth
method insertText
insertText: (text: string) => Controller;
Insert a string of text at the current selection. If the selection is expanded, it will be deleted first
method insertTextAtRange
insertTextAtRange: ( range: RangeType | RangeTypeProperties | RangeTypeJSON, text: string) => Controller;
Insert text at range. If the range is expanded it will be deleted first
method insertTextByKey
insertTextByKey: ( key: string, offset: number, text: string, marks?: | Array<MarkProperties | MarkJSON | Mark | string> | Immutable.Set<MarkProperties | MarkJSON | Mark | string>) => Controller;
Insert text at an offset in a text node by its key with optional marks
method insertTextByPath
insertTextByPath: ( path: Immutable.List<number>, offset: number, text: string, marks?: | Array<MarkProperties | MarkJSON | Mark | string> | Immutable.Set<MarkProperties | MarkJSON | Mark | string>) => Controller;
Insert text at an offset in a text node by its path with optional marks
method mergeNodeByKey
mergeNodeByKey: (key: string) => Controller;
Merge a node by its key with its previous sibling
method mergeNodeByPath
mergeNodeByPath: (path: Immutable.List<number>) => Controller;
Merge a node by its path with its previous sibling
method moveAnchorBackward
moveAnchorBackward: (n?: number) => Controller;
Move the anchor of the current selection backward n characters
method moveAnchorForward
moveAnchorForward: (n?: number) => Controller;
Move the anchor of the current selection forward n characters
method moveAnchorTo
moveAnchorTo: ( path: string | number | Immutable.List<number>, offset?: number) => Controller;
Move the anchor of the current selection to a new path and offset
method moveAnchorToEndOfBlock
moveAnchorToEndOfBlock: () => Controller;
Move the anchor of the current selection to the end of the closest block parent.
method moveAnchorToEndOfDocument
moveAnchorToEndOfDocument: () => Controller;
Move the anchor of the current selection to the end of the document.
method moveAnchorToEndOfInline
moveAnchorToEndOfInline: () => Controller;
Move the anchor of the current selection to the end of the closest inline parent.
method moveAnchorToEndOfNextBlock
moveAnchorToEndOfNextBlock: () => Controller;
Move the anchor of the current selection to the end of the next block.
method moveAnchorToEndOfNextInline
moveAnchorToEndOfNextInline: () => Controller;
Move the anchor of the current selection to the end of the next inline.
method moveAnchorToEndOfNextText
moveAnchorToEndOfNextText: () => Controller;
Move the anchor of the current selection to the end of the next text.
method moveAnchorToEndOfNode
moveAnchorToEndOfNode: (node: Node) => Controller;
Move the anchor of the current selection to the end of the provided node.
method moveAnchorToEndOfPreviousBlock
moveAnchorToEndOfPreviousBlock: () => Controller;
Move the anchor of the current selection to the end of the previous block.
method moveAnchorToEndOfPreviousInline
moveAnchorToEndOfPreviousInline: () => Controller;
Move the anchor of the current selection to the end of the previous inline.
method moveAnchorToEndOfPreviousText
moveAnchorToEndOfPreviousText: () => Controller;
Move the anchor of the current selection to the end of the previous text.
method moveAnchorToEndOfText
moveAnchorToEndOfText: () => Controller;
Move the anchor of the current selection to the end of the current text node.
method moveAnchorToStartOfBlock
moveAnchorToStartOfBlock: () => Controller;
Move the anchor of the current selection to the start of the closest block parent.
method moveAnchorToStartOfDocument
moveAnchorToStartOfDocument: () => Controller;
Move the anchor of the current selection to the start of the document.
method moveAnchorToStartOfInline
moveAnchorToStartOfInline: () => Controller;
Move the anchor of the current selection to the start of the closest inline parent.
method moveAnchorToStartOfNextBlock
moveAnchorToStartOfNextBlock: () => Controller;
Move the anchor of the current selection to the start of the next block.
method moveAnchorToStartOfNextInline
moveAnchorToStartOfNextInline: () => Controller;
Move the anchor of the current selection to the start of the next inline.
method moveAnchorToStartOfNextText
moveAnchorToStartOfNextText: () => Controller;
Move the anchor of the current selection to the start of the next text node.
method moveAnchorToStartOfNode
moveAnchorToStartOfNode: (node: Node) => Controller;
Move the anchor of the current selection to the start of the provided node.
method moveAnchorToStartOfPreviousBlock
moveAnchorToStartOfPreviousBlock: () => Controller;
Move the anchor of the current selection to the start of the previous block.
method moveAnchorToStartOfPreviousInline
moveAnchorToStartOfPreviousInline: () => Controller;
Move the anchor of the current selection to the start of the previous inline.
method moveAnchorToStartOfPreviousText
moveAnchorToStartOfPreviousText: () => Controller;
Move the anchor of the current selection to the start of the previous text node.
method moveAnchorToStartOfText
moveAnchorToStartOfText: () => Controller;
Move the anchor of the current selection to the start of the current text node.
method moveAnchorWordBackward
moveAnchorWordBackward: () => Controller;
method moveAnchorWordForward
moveAnchorWordForward: () => Controller;
method moveBackward
moveBackward: (n?: number) => Controller;
Move the anchor and focus of the selection backward n characters.
method moveEndBackward
moveEndBackward: (n?: number) => Controller;
Move the end of the selection backward n characters
method moveEndForward
moveEndForward: (n?: number) => Controller;
Move the end of the selection foward n characters
method moveEndTo
moveEndTo: ( path: string | number | Immutable.List<number>, offset?: number) => Controller;
Move the end of the selection to a new path and offset
method moveEndToEndOfBlock
moveEndToEndOfBlock: () => Controller;
Move the end of the current selection to the end of the closest block parent.
method moveEndToEndOfDocument
moveEndToEndOfDocument: () => Controller;
Move the end of the current selection to the end of the document.
method moveEndToEndOfInline
moveEndToEndOfInline: () => Controller;
Move the end of the current selection to the end of the closest inline parent.
method moveEndToEndOfNextBlock
moveEndToEndOfNextBlock: () => Controller;
Move the anchor of the current selection to the end of the next block.
method moveEndToEndOfNextInline
moveEndToEndOfNextInline: () => Controller;
Move the end of the current selection to the end of the next inline.
method moveEndToEndOfNextText
moveEndToEndOfNextText: () => Controller;
Move the end of the current selection to the end of the next text.
method moveEndToEndOfNode
moveEndToEndOfNode: (node: Node) => Controller;
Move the end of the current selection to the end of the provided node.
method moveEndToEndOfPreviousBlock
moveEndToEndOfPreviousBlock: () => Controller;
Move the end of the current selection to the end of the previous block.
method moveEndToEndOfPreviousInline
moveEndToEndOfPreviousInline: () => Controller;
Move the end of the current selection to the end of the previous inline.
method moveEndToEndOfPreviousText
moveEndToEndOfPreviousText: () => Controller;
Move the commandable of the current selection to the end of the previous text.
method moveEndToEndOfText
moveEndToEndOfText: () => Controller;
Move the end of the current selection to the end of the current text node.
method moveEndToStartOfBlock
moveEndToStartOfBlock: () => Controller;
Move the end of the current selection to the start of the closest block parent.
method moveEndToStartOfDocument
moveEndToStartOfDocument: () => Controller;
Move the end of the current selection to the start of the document.
method moveEndToStartOfInline
moveEndToStartOfInline: () => Controller;
Move the end of the current selection to the start of the closest inline parent.
method moveEndToStartOfNextBlock
moveEndToStartOfNextBlock: () => Controller;
Move the end of the current selection to the start of the next block.
method moveEndToStartOfNextInline
moveEndToStartOfNextInline: () => Controller;
Move the end of the current selection to the start of the next inline.
method moveEndToStartOfNextText
moveEndToStartOfNextText: () => Controller;
Move the end of the current selection to the start of the next text node.
method moveEndToStartOfNode
moveEndToStartOfNode: (node: Node) => Controller;
Move the end of the current selection to the start of the provided node.
method moveEndToStartOfPreviousBlock
moveEndToStartOfPreviousBlock: () => Controller;
Move the end of the current selection to the start of the previous block.
method moveEndToStartOfPreviousInline
moveEndToStartOfPreviousInline: () => Controller;
Move the end of the current selection to the start of the previous inline.
method moveEndToStartOfPreviousText
moveEndToStartOfPreviousText: () => Controller;
Move the end of the current selection to the start of the previous text node.
method moveEndToStartOfText
moveEndToStartOfText: () => Controller;
Move the end of the current selection to the start of the current text node.
method moveEndWordBackward
moveEndWordBackward: () => Controller;
method moveEndWordForward
moveEndWordForward: () => Controller;
method moveFocusBackward
moveFocusBackward: (n?: number) => Controller;
Move the focus of the current selection backward n characters
method moveFocusForward
moveFocusForward: (n?: number) => Controller;
Move the focus of the current selection forward n characters
method moveFocusTo
moveFocusTo: ( path: string | number | Immutable.List<number>, offset?: number) => Controller;
Move the focus of the current selection to a new path and offset
method moveFocusToEndOfBlock
moveFocusToEndOfBlock: () => Controller;
Move the focus of the current selection to the end of the closest block parent.
method moveFocusToEndOfDocument
moveFocusToEndOfDocument: () => Controller;
Move the focus of the current selection to the end of the document.
method moveFocusToEndOfInline
moveFocusToEndOfInline: () => Controller;
Move the focus of the current selection to the end of the closest inline parent.
method moveFocusToEndOfNextBlock
moveFocusToEndOfNextBlock: () => Controller;
Move the focus of the current selection to the end of the next block.
method moveFocusToEndOfNextInline
moveFocusToEndOfNextInline: () => Controller;
Move the focus of the current selection to the end of the next inline.
method moveFocusToEndOfNextText
moveFocusToEndOfNextText: () => Controller;
Move the focus of the current selection to the end of the next text.
method moveFocusToEndOfNode
moveFocusToEndOfNode: (node: Node) => Controller;
Move the focus of the current selection to the end of the provided node.
method moveFocusToEndOfPreviousBlock
moveFocusToEndOfPreviousBlock: () => Controller;
Move the focus of the current selection to the end of the previous block.
method moveFocusToEndOfPreviousInline
moveFocusToEndOfPreviousInline: () => Controller;
Move the focus of the current selection to the end of the previous inline.
method moveFocusToEndOfPreviousText
moveFocusToEndOfPreviousText: () => Controller;
Move the focus of the current selection to the end of the previous text.
method moveFocusToEndOfText
moveFocusToEndOfText: () => Controller;
Move the focus of the current selection to the end of the current text node.
method moveFocusToStartOfBlock
moveFocusToStartOfBlock: () => Controller;
Move the focus of the current selection to the start of the closest block parent.
method moveFocusToStartOfDocument
moveFocusToStartOfDocument: () => Controller;
Move the focus of the current selection to the start of the document.
method moveFocusToStartOfInline
moveFocusToStartOfInline: () => Controller;
Move the focus of the current selection to the start of the closest inline parent.
method moveFocusToStartOfNextBlock
moveFocusToStartOfNextBlock: () => Controller;
Move the focus of the current selection to the start of the next block.
method moveFocusToStartOfNextInline
moveFocusToStartOfNextInline: () => Controller;
Move the focus of the current selection to the start of the next inline.
method moveFocusToStartOfNextText
moveFocusToStartOfNextText: () => Controller;
Move the focus of the current selection to the start of the next text node.
method moveFocusToStartOfNode
moveFocusToStartOfNode: (node: Node) => Controller;
Move the focus of the current selection to the start of the provided node.
method moveFocusToStartOfPreviousBlock
moveFocusToStartOfPreviousBlock: () => Controller;
Move the focus of the current selection to the start of the previous block.
method moveFocusToStartOfPreviousInline
moveFocusToStartOfPreviousInline: () => Controller;
Move the focus of the current selection to the start of the previous inline.
method moveFocusToStartOfPreviousText
moveFocusToStartOfPreviousText: () => Controller;
Move the focus of the current selection to the start of the previous text node.
method moveFocusToStartOfText
moveFocusToStartOfText: () => Controller;
Move the focus of the current selection to the start of the current text node.
method moveFocusWordBackward
moveFocusWordBackward: () => Controller;
method moveFocusWordForward
moveFocusWordForward: () => Controller;
method moveForward
moveForward: (n?: number) => Controller;
Move the anchor and focus of the selection forward n characters.
method moveNodeByKey
moveNodeByKey: (key: string, newKey: string, newIndex: number) => Controller;
Move a node by its key to a new parent node with with newkey at newindex
method moveNodeByPath
moveNodeByPath: ( path: Immutable.List<number>, newPath: Immutable.List<number>, newIndex: number) => Controller;
Move a node by its path to a new parent node with with newpath at newindex
method moveStartBackward
moveStartBackward: (n?: number) => Controller;
Move the start of the current selection forward n characters
method moveStartForward
moveStartForward: (n?: number) => Controller;
Move the start of the current selection backward n characters
method moveStartTo
moveStartTo: ( path: string | number | Immutable.List<number>, n?: number) => Controller;
Move the start of the current selection to a new path and offset
method moveStartToEndOfBlock
moveStartToEndOfBlock: () => Controller;
Move the start of the current selection to the end of the closest block parent.
method moveStartToEndOfDocument
moveStartToEndOfDocument: () => Controller;
Move the start of the current selection to the end of the document.
method moveStartToEndOfInline
moveStartToEndOfInline: () => Controller;
Move the start of the current selection to the end of the closest inline parent.
method moveStartToEndOfNextBlock
moveStartToEndOfNextBlock: () => Controller;
Move the start of the current selection to the end of the next block.
method moveStartToEndOfNextInline
moveStartToEndOfNextInline: () => Controller;
Move the start of the current selection to the end of the next inline.
method moveStartToEndOfNextText
moveStartToEndOfNextText: () => Controller;
Move the start of the current selection to the end of the next text.
method moveStartToEndOfNode
moveStartToEndOfNode: (node: Node) => Controller;
Move the start of the current selection to the end of the provided node.
method moveStartToEndOfPreviousBlock
moveStartToEndOfPreviousBlock: () => Controller;
Move the start of the current selection to the end of the previous block.
method moveStartToEndOfPreviousInline
moveStartToEndOfPreviousInline: () => Controller;
Move the start of the current selection to the end of the previous inline.
method moveStartToEndOfPreviousText
moveStartToEndOfPreviousText: () => Controller;
Move the start of the current selection to the end of the previous text.
method moveStartToEndOfText
moveStartToEndOfText: () => Controller;
Move the start of the current selection to the end of the current text node.
method moveStartToStartOfBlock
moveStartToStartOfBlock: () => Controller;
Move the start of the current selection to the start of the closest block parent.
method moveStartToStartOfDocument
moveStartToStartOfDocument: () => Controller;
Move the start of the current selection to the start of the document.
method moveStartToStartOfInline
moveStartToStartOfInline: () => Controller;
Move the start of the current selection to the start of the closest inline parent.
method moveStartToStartOfNextBlock
moveStartToStartOfNextBlock: () => Controller;
Move the start of the current selection to the start of the next block.
method moveStartToStartOfNextInline
moveStartToStartOfNextInline: () => Controller;
Move the start of the current selection to the start of the next inline.
method moveStartToStartOfNextText
moveStartToStartOfNextText: () => Controller;
Move the start of the current selection to the start of the next text node.
method moveStartToStartOfNode
moveStartToStartOfNode: (node: Node) => Controller;
Move the start of the current selection to the start of the provided node.
method moveStartToStartOfPreviousBlock
moveStartToStartOfPreviousBlock: () => Controller;
Move the start of the current selection to the start of the previous block.
method moveStartToStartOfPreviousInline
moveStartToStartOfPreviousInline: () => Controller;
Move the start of the current selection to the start of the previous inline.
method moveStartToStartOfPreviousText
moveStartToStartOfPreviousText: () => Controller;
Move the start of the current selection to the start of the previous text node.
method moveStartToStartOfText
moveStartToStartOfText: () => Controller;
Move the start of the current selection to the start of the current text node.
method moveStartWordBackward
moveStartWordBackward: () => Controller;
method moveStartWordForward
moveStartWordForward: () => Controller;
method moveTo
moveTo: ( path: string | number | Immutable.List<number>, offset?: number) => Controller;
Collapse the current selection at the provided new path and offset.
method moveToAnchor
moveToAnchor: () => Controller;
Collapse the current selection at the anchor.
method moveToEnd
moveToEnd: () => Controller;
Collapse the current selection at the end.
method moveToEndOfBlock
moveToEndOfBlock: () => Controller;
Collapse the current selection at the end of the closest block parent.
method moveToEndOfDocument
moveToEndOfDocument: () => Controller;
Collapse the current selection at the end of the document.
method moveToEndOfInline
moveToEndOfInline: () => Controller;
Collapse the current selection at the end of the closest inline parent.
method moveToEndOfNextBlock
moveToEndOfNextBlock: () => Controller;
Collapse the current selection at the end of the next block.
method moveToEndOfNextInline
moveToEndOfNextInline: () => Controller;
Collapse the current selection at the end of the inline.
method moveToEndOfNextText
moveToEndOfNextText: () => Controller;
Collapse the current selection at the end of the next text node.
method moveToEndOfNode
moveToEndOfNode: (node: Node) => Controller;
Collapse the current selection at the end of the provided node.
method moveToEndOfPreviousBlock
moveToEndOfPreviousBlock: () => Controller;
Collapse the current selection at the end of the previous block.
method moveToEndOfPreviousInline
moveToEndOfPreviousInline: () => Controller;
Collapse the current selection at the end of the previous inline.
method moveToEndOfPreviousText
moveToEndOfPreviousText: () => Controller;
Collapse the current selection at the end of the previous text node.
method moveToEndOfText
moveToEndOfText: () => Controller;
Collapse the current selection at the end of the current text node.
method moveToFocus
moveToFocus: () => Controller;
Collapse the current selection at the focus.
method moveToRangeOfDocument
moveToRangeOfDocument: () => Controller;
Move the current selection's anchor to the start of the document and its focus to the end of it, selecting everything.
method moveToRangeOfNode
moveToRangeOfNode: (node: Node) => Controller;
Move the current selection's anchor to the start of the provided node and its focus to the end of it.
method moveToStart
moveToStart: () => Controller;
Collapse the current selection at the start.
method moveToStartOfBlock
moveToStartOfBlock: () => Controller;
Collapse the current selection at the start of the nearest block parent.
method moveToStartOfDocument
moveToStartOfDocument: () => Controller;
Collapse the current selection at the start of the document.
method moveToStartOfInline
moveToStartOfInline: () => Controller;
Collapse the current selection at the start of the nearest inline parent.
method moveToStartOfNextBlock
moveToStartOfNextBlock: () => Controller;
Collapse the current selection at the start of the next block.
method moveToStartOfNextInline
moveToStartOfNextInline: () => Controller;
Collapse the current selection at the start of the next inline.
method moveToStartOfNextText
moveToStartOfNextText: () => Controller;
Collapse the current selection at the start of the next text node.
method moveToStartOfNode
moveToStartOfNode: (node: Node) => Controller;
Collapse the current selection at the start of the provided node.
method moveToStartOfPreviousBlock
moveToStartOfPreviousBlock: () => Controller;
Collapse the current selection at the start of the previous block.
method moveToStartOfPreviousInline
moveToStartOfPreviousInline: () => Controller;
Collapse the current selection at the start of the previous inline.
method moveToStartOfPreviousText
moveToStartOfPreviousText: () => Controller;
Collapse the current selection at the start of the previous text node.
method moveToStartOfText
moveToStartOfText: () => Controller;
Collapse the current selection at the start of the current text node.
method moveWordBackward
moveWordBackward: () => Controller;
method moveWordForward
moveWordForward: () => Controller;
method normalize
normalize: () => Controller;
Normalizes the document with the value's schema. Run automatically unless manually disabled. Use it sparingly and strategically, as it can be very expensive.
method query
query: (query: string | ((...args: any[]) => any), ...args: any[]) => any;
method redo
redo: () => Controller;
Move forward one step in the history
method registerCommand
registerCommand: (command: string) => Controller;
Add a new command by type to the controller. This will make the command available as a top-level method on the controller
method registerQuery
registerQuery: (query: string) => Controller;
Add a new query by type to the controller. This will make the query available as a top-level method on the controller.
method removeAllMarksByKey
removeAllMarksByKey: (key: string) => Controller;
Remove all
marks
from node bykey
.
method removeAllMarksByPath
removeAllMarksByPath: (path: Immutable.List<number>) => Controller;
Remove all
marks
from node bypath
.
method removeAnnotation
removeAnnotation: ( annotation: Annotation | AnnotationProperties | AnnotationJSON) => Controller;
Remove annotation
method removeMark
removeMark: (mark: Mark | MarkProperties | MarkJSON | string) => Controller;
Remove a mark from the characters in the current selection. Passing a string will implicitly create a Mark of that type for removal.
method removeMarkAtRange
removeMarkAtRange: ( range: RangeType | RangeTypeProperties | RangeTypeJSON, mark: Mark | MarkProperties | MarkJSON | string) => Controller;
Remove a mark from characters in the range. Passing a string will implicitly create a mark of that type for deletion.
method removeMarkByKey
removeMarkByKey: ( key: string, offset: number, length: number, mark: MarkProperties | MarkJSON | Mark | string) => Controller;
Remove a mark from length characters starting at an offset in a node by key
method removeMarkByPath
removeMarkByPath: ( path: Immutable.List<number>, offset: number, length: number, mark: MarkProperties | MarkJSON | Mark | string) => Controller;
Remove a mark from length characters starting at an offset in a node by path
method removeMarksByPath
removeMarksByPath: ( path: Immutable.List<number>, offset: number, length: number, marks: | Array<MarkProperties | MarkJSON | Mark | string> | Immutable.Set<MarkProperties | MarkJSON | Mark | string>) => Controller;
method removeNodeByKey
removeNodeByKey: (key: string) => Controller;
Remove a node from the document by its key
method removeNodeByPath
removeNodeByPath: (path: Immutable.List<number>) => Controller;
Remove a node from the document by its path
method removeTextByKey
removeTextByKey: (key: string, offset: number, length: number) => Controller;
Remove length characters of text starting at an offset in a node by key
method removeTextByPath
removeTextByPath: ( path: Immutable.List<number>, offset: number, length: number) => Controller;
Remove length characters of text starting at an offset in a node by path
method replaceMark
replaceMark: ( mark: MarkProperties | MarkJSON | Mark | string, newMark: MarkProperties | MarkJSON | Mark | string) => Controller;
Remove a mark from the characters in the current selection. Passing a string will implicitly create a Mark of that type.
method replaceNodeByKey
replaceNodeByKey: (key: string, node: Node) => Controller;
Replace a node in the document with a new node by key
method replaceNodeByPath
replaceNodeByPath: (path: Immutable.List<number>, newNode: Node) => Controller;
Replace a node in the document with a new node by path
method replaceTextByKey
replaceTextByKey: (key: string, node: Node) => Controller;
Replace a length of text at offset with new text and optional marks by key
method replaceTextByPath
replaceTextByPath: ( path: Immutable.List<number>, offset: number, length: number, text: string, marks?: Immutable.Set<Mark> | Mark[]) => Controller;
Replace a length of text at offset with new text and optional marks by path
method run
run: (key: string, ...args: any[]) => Controller;
Run the middleware stack by key with args, returning its result. In normal operation you never need to use this method! Reserved for testing.
method save
save: (operation: Operation) => void;
Save an
operation
into the history.
method select
select: ( properties: RangeTypeProperties | RangeTypeJSON | RangeType | string, options?: { snapshot?: boolean | undefined }) => Controller;
Merge the current selection with the provided properties
method setAnchor
setAnchor: (point: Point) => void;
method setAnnotation
setAnnotation: ( annotation: Annotation, newProperties: AnnotationProperties | AnnotationJSON | Annotation) => Controller;
Set annotation
method setBlocks
setBlocks: ( properties: Block | BlockProperties | BlockJSON | string) => Controller;
Set the properties of the Blocks in the current selection. Passing a string will set the blocks' type only.
method setBlocksAtRange
setBlocksAtRange: ( range: RangeType | RangeTypeProperties | RangeTypeJSON, properties: Block | BlockJSON | BlockProperties | string) => Controller;
Set the properties of the block nodes in a range. Passing a string will set the nodes' type only
method setData
setData: (data: Data) => Controller;
Set data
method setEnd
setEnd: (point: Point) => void;
method setFocus
setFocus: (point: Point) => void;
method setInlines
setInlines: ( properties: Inline | InlineProperties | InlineProperties | string) => Controller;
Set the properties of the Inlines nodes in the current selection. Passing a string will set the nodes' type only.
method setInlinesAtRange
setInlinesAtRange: ( range: RangeType | RangeTypeProperties | RangeTypeJSON, properties: InlineProperties | InlineJSON | Inline | string) => Controller;
Set the properties of the inline nodes in a range. Passing a string will set the nodes' type only
method setMarkByKey
setMarkByKey: ( key: string, offset: number, length: number, properties: MarkProperties | MarkJSON | Mark | string, newProperties: Partial<MarkProperties | MarkJSON | Mark | string>) => Controller;
Remove length characters of text starting at an offset in a node by key
method setMarkByPath
setMarkByPath: ( path: Immutable.List<number>, offset: number, length: number, properties: MarkProperties | MarkJSON | Mark | string, newProperties: Partial<MarkProperties | MarkJSON | Mark | string>) => Controller;
Set a dictionary of newProperties on a mark by its path.
method setNodeByKey
setNodeByKey: ( key: string, properties: BlockProperties | InlineProperties | string) => Controller;
Set a dictionary of properties on a node by its key.
method setNodeByPath
setNodeByPath: ( path: Immutable.List<number>, newProperties: NodeProperties | InlineProperties | string) => Controller;
Set a dictionary of properties on a node by its key.
method setStart
setStart: (point: Point) => void;
method setTextByKey
setTextByKey: ( key: string, text: string, marks: Immutable.Set<Mark>) => Controller;
Insert
text
atoffset
in node bykey
.
method setTextByPath
setTextByPath: ( path: Immutable.List<number>, text: string, marks: Immutable.Set<Mark>) => Controller;
Insert
text
atoffset
in node bypath
.
method snapshotSelection
snapshotSelection: () => Controller;
Snapshot the current selection for undo purposes.
method splitBlock
splitBlock: (depth?: number) => Controller;
Split the Block in the current selection by depth levels. If the selection is expanded, it will be deleted first.
method splitBlockAtRange
splitBlockAtRange: ( range: RangeType | RangeTypeProperties | RangeTypeJSON, height?: number) => Controller;
Split the block nodes at a
range
, to optionalheight
.
method splitDescendantsByKey
splitDescendantsByKey: ( key: string, textKey: string, textOffset: number) => Controller;
Split a node deeply down the tree by
key
,textKey
andtextOffset
.
method splitDescendantsByPath
splitDescendantsByPath: ( path: Immutable.List<number>, textPath: Immutable.List<number>, textOffset: number) => Controller;
Split a node deeply down the tree by
path
,textPath
andtextOffset
.
method splitInline
splitInline: (depth: number) => Controller;
Split the Inline node in the current selection by depth levels. If the selection is expanded, it will be deleted first
method splitInlineAtRange
splitInlineAtRange: ( range: RangeType | RangeTypeProperties | RangeTypeJSON, height?: number) => Controller;
Split the inline nodes at a
range
, to optionalheight
.
method splitNodeByKey
splitNodeByKey: (key: string, offset: number) => Controller;
Split a node by its key at an offset
method splitNodeByPath
splitNodeByPath: ( path: Immutable.List<number>, position: number, options?: { target?: number | undefined }) => Controller;
Split a node by its path at an offset
method toggleMark
toggleMark: (mark: MarkProperties | MarkJSON | Mark | string) => Controller;
Add or remove a mark from the characters in the current selection, depending on it already exists on any or not. Passing a string will implicitly create a Mark of that type to toggle.
method toggleMarkAtRange
toggleMarkAtRange: ( range: RangeType | RangeTypeProperties | RangeTypeJSON, mark: Mark | MarkProperties | MarkJSON | string) => Controller;
Add or remove a mark from characters in the range. Passing a string will implicitly create a mark of that type for deletion.
method undo
undo: () => Controller;
Move backward one step in the history
method unwrapBlock
unwrapBlock: ( properties: BlockProperties | BlockJSON | Block | string) => Controller;
Unwrap all Block nodes in the current selection that match a type and/or data
method unwrapBlockAtRange
unwrapBlockAtRange: ( range: RangeType | RangeTypeProperties | RangeTypeJSON, properties: BlockProperties | BlockJSON | Block | string) => Controller;
Unwrap all block nodes in a range that match properties
method unwrapBlockByKey
unwrapBlockByKey: ( key: string, properties: BlockProperties | string) => Controller;
Unwrap all inner content of a block node by its key that match properties
method unwrapBlockByPath
unwrapBlockByPath: ( path: Path, properties: BlockProperties | string) => Controller;
Unwrap all inner content of a block node by its path that match properties
method unwrapChildrenByKey
unwrapChildrenByKey: (key: string) => Controller;
Unwrap all of the children of a node by its key.
method unwrapChildrenByPath
unwrapChildrenByPath: (path: Immutable.List<number> | number[]) => Controller;
Unwrap all of the children of a node, by removing the node and replacing it with the children in the tree.
method unwrapInline
unwrapInline: ( properties: InlineProperties | InlineJSON | Inline | string) => Controller;
Unwrap all Inline nodes in the current selection that match a type and/or data
method unwrapInlineAtRange
unwrapInlineAtRange: ( range: RangeType | RangeTypeProperties | RangeTypeJSON, properties: InlineProperties | InlineJSON | Inline | string) => Controller;
Unwrap all inline nodes in a range that match properties
method unwrapInlineByKey
unwrapInlineByKey: ( key: string, properties: InlineProperties | string) => Controller;
Unwrap all inner content of an inline node by its key that match properties
method unwrapInlineByPath
unwrapInlineByPath: ( path: Path, properties: InlineProperties | string) => Controller;
Unwrap all inner content of an inline node by its path that match properties
method unwrapNodeByKey
unwrapNodeByKey: (key: string) => Controller;
Unwrap a single node from its parent. if the node is surrounded with siblings the parent will be split. If the node is an only child, it will replace the parent
method unwrapNodeByPath
unwrapNodeByPath: (path: Immutable.List<number>) => Controller;
Unwrap a single node from its parent. if the node is surrounded with siblings the parent will be split. If the node is an only child, it will replace the parent
method withoutMerging
withoutMerging: (fn: () => void) => void;
Usually all command operations are merged into a single save point in history, if more control is desired, create single save points using this function.
method withoutNormalizing
withoutNormalizing: (fn: () => void) => Controller;
Calls the provided function with the current commandable as the first argument. Normalization does not occur while the function is executing and is deferred to execute immediately after completion.
This allows for sequence change operations to not be interrupted by normalization
method withoutSaving
withoutSaving: (fn: () => void) => void;
By default all operations are saved to the commandable's history. If you have changes that you don't want to show up in history, use this function.
method wrapBlock
wrapBlock: ( properties: BlockProperties | BlockJSON | Block | string) => Controller;
Wrap the Block nodes in the current selection with a new Block
method wrapBlockAtRange
wrapBlockAtRange: ( range: RangeType | RangeTypeProperties | RangeTypeJSON, properties: BlockProperties | BlockJSON | Block | string) => Controller;
wrap all block nodes in a range with a new block node with the provided properties
method wrapBlockByKey
wrapBlockByKey: ( key: string, properties: BlockProperties | string) => Controller;
Wrap the given node by key in a block node that matches properties.
method wrapBlockByPath
wrapBlockByPath: ( path: Immutable.List<number>, block: Block | string) => Controller;
Wrap the given node by path in a block node that matches properties.
method wrapInline
wrapInline: ( properties: InlineProperties | InlineJSON | Inline | string) => Controller;
Wrap the Block nodes in the current selection with a new Inline
method wrapInlineAtRange
wrapInlineAtRange: ( range: RangeType | RangeTypeProperties | RangeTypeJSON, properties: InlineProperties | InlineJSON | Inline | string) => Controller;
wrap all inline nodes in a range with a new inline node with the provided properties
method wrapInlineByKey
wrapInlineByKey: ( key: string, properties: InlineProperties | string) => Controller;
Wrap the given node by key in an Inline node that matches properties.
method wrapInlineByPath
wrapInlineByPath: ( path: Path, properties: InlineProperties | string) => Controller;
Wrap the given node by path in an Inline node that matches properties.
method wrapNodeByKey
wrapNodeByKey: (key: string, parent: Node) => Controller;
Wrap the node with the specified key with the parent node, this will clear all children of the parent.
method wrapNodeByPath
wrapNodeByPath: (path: Immutable.List<number>, parent: Node) => Controller;
Wrap the node with the specified key with the parent node, this will clear all children of the parent.
method wrapText
wrapText: (prefix: string, suffix?: string) => Controller;
Surround the text in the current selection with prefix and suffix strings. If the suffix is ommitted, the prefix will be used instead.
method wrapTextAtRange
wrapTextAtRange: ( range: RangeType | RangeTypeProperties | RangeTypeJSON, prefix: string, suffix?: string) => Controller;
Surround the text in a range with a prefix and suffix. If the suffix is ommitted, the prefix will be used instead.
interface Data
interface Data extends Immutable.Map<any, any> {}
interface DecorationJSON
interface DecorationJSON {}
interface DecorationProperties
interface DecorationProperties {}
interface DocumentJSON
interface DocumentJSON {}
interface DocumentProperties
interface DocumentProperties {}
interface EditorOptions
interface EditorOptions {}
property construct
construct?: boolean | undefined;
property controller
controller?: Controller | undefined;
property normalize
normalize?: boolean | undefined;
interface EditorProperties
interface EditorProperties<T extends Controller = Controller> {}
property object
object?: 'editor' | undefined;
property onChange
onChange?: | ((change: { operations: Immutable.List<Operation>; value: Value }) => void) | undefined;
property plugins
plugins?: Plugins<T> | undefined;
property readOnly
readOnly?: boolean | undefined;
property value
value?: Value | undefined;
interface InlineJSON
interface InlineJSON {}
interface InlineProperties
interface InlineProperties {}
interface LeafAndOffset
interface LeafAndOffset {}
property endOffset
endOffset: number;
property index
index: number;
property leaf
leaf: Leaf;
property startOffset
startOffset: number;
interface LeafJSON
interface LeafJSON {}
interface LeafProperties
interface LeafProperties {}
interface MarkJSON
interface MarkJSON {}
interface MarkProperties
interface MarkProperties {}
interface ObjectAndType
interface ObjectAndType {}
interface OperationJSON
interface OperationJSON {}
property annotation
annotation?: AnnotationJSON | undefined;
property data
data?: { [key: string]: any } | undefined;
property mark
mark?: MarkJSON | undefined;
property newPath
newPath?: number[] | undefined;
property newProperties
newProperties?: | NodeJSON | ValueJSON | SelectionJSON | MarkJSON | AnnotationJSON | undefined;
property node
node?: Node | undefined;
property object
object?: 'operation' | undefined;
property offset
offset?: number | undefined;
property path
path?: number[] | undefined;
property position
position?: number | undefined;
property properties
properties?: NodeJSON | ValueJSON | SelectionJSON | AnnotationJSON | undefined;
property target
target?: number | undefined;
property text
text?: string | undefined;
property type
type: string;
interface OperationProperties
interface OperationProperties {}
property annotation
annotation?: Annotation | undefined;
property data
data?: Data | { [key: string]: any } | undefined;
property mark
mark?: Mark | undefined;
property newPath
newPath?: Immutable.List<number> | undefined;
property newProperties
newProperties?: | NodeProperties | ValueProperties | SelectionProperties | MarkProperties | AnnotationProperties | undefined;
property node
node?: Node | undefined;
property object
object?: 'operation' | undefined;
property offset
offset?: number | undefined;
property path
path?: Immutable.List<number> | undefined;
property position
position?: number | undefined;
property properties
properties?: | NodeProperties | ValueProperties | SelectionProperties | AnnotationProperties | undefined;
property target
target?: number | undefined;
property text
text?: string | undefined;
property type
type: string;
interface Plugin
interface Plugin<T extends Controller = Controller> {}
property commands
commands?: { [name: string]: CommandFunc<T> } | undefined;
property normalizeNode
normalizeNode?: | ((node: Node, editor: T, next: () => void) => ((editor: T) => void) | void) | undefined;
property onChange
onChange?: ((editor: T, next: () => void) => void) | undefined;
property onCommand
onCommand?: | ((command: Command, editor: T, next: () => void) => void) | undefined;
property onConstruct
onConstruct?: ((editor: T, next: () => void) => void) | undefined;
property onQuery
onQuery?: ((query: Query, editor: T, next: () => void) => void) | undefined;
property queries
queries?: { [name: string]: QueryFunc<T> } | undefined;
property schema
schema?: SchemaProperties | undefined;
property validateNode
validateNode?: | ((node: Node, editor: T, next: () => void) => SlateError | void) | undefined;
interface Plugins
interface Plugins<T extends Controller = Controller> extends Array<Plugin<T> | Plugins<T>> {}
interface PointJSON
interface PointJSON {}
interface PointProperties
interface PointProperties {}
interface RangeJSON
interface RangeJSON {}
interface RangeProperties
interface RangeProperties {}
interface Rules
interface Rules {}
property data
data?: | { [key: string]: (v: any) => boolean; } | undefined;
property first
first?: ObjectAndType | ObjectAndType[] | undefined;
property isAtomic
isAtomic?: boolean | undefined;
property isVoid
isVoid?: boolean | undefined;
property last
last?: ObjectAndType | ObjectAndType[] | undefined;
property marks
marks?: | Array<{ type: string | ((type: string) => boolean); }> | undefined;
property next
next?: ObjectAndType | ObjectAndType[] | undefined;
property nodes
nodes?: | Array<{ min?: number | undefined; max?: number | undefined; match?: ObjectAndType | ObjectAndType[] | undefined; }> | undefined;
property normalize
normalize?: ((editor: Editor, error: SlateError) => void) | undefined;
property parent
parent?: ObjectAndType | ObjectAndType[] | undefined;
property previous
previous?: ObjectAndType | ObjectAndType[] | undefined;
property text
text?: RegExp | ((text: string) => boolean) | undefined;
interface RulesByNodeType
interface RulesByNodeType {}
index signature
[key: string]: Rules;
interface SchemaProperties
interface SchemaProperties {}
property annotations
annotations?: RulesByNodeType | undefined;
property blocks
blocks?: RulesByNodeType | undefined;
property decorations
decorations?: RulesByNodeType | undefined;
property document
document?: Rules | undefined;
property inlines
inlines?: RulesByNodeType | undefined;
property marks
marks?: RulesByNodeType | undefined;
property rules
rules?: Array<{ match: ObjectAndType | ObjectAndType[] } & Rules> | undefined;
interface SelectionJSON
interface SelectionJSON {}
interface SelectionProperties
interface SelectionProperties {}
interface TextJSON
interface TextJSON {}
interface TextProperties
interface TextProperties {}
interface ValueJSON
interface ValueJSON {}
property annotations
annotations?: { [key: string]: AnnotationJSON } | undefined;
property data
data?: { [key: string]: any } | undefined;
property document
document?: DocumentJSON | undefined;
property object
object?: 'value' | undefined;
property selection
selection?: SelectionJSON | undefined;
interface ValueProperties
interface ValueProperties {}
property annotations
annotations?: | Immutable.Map<string, Annotation> | { [key: string]: AnnotationJSON } | undefined;
property data
data?: Data | { [key: string]: any } | undefined;
property document
document?: Document | undefined;
property object
object?: 'value' | undefined;
property selection
selection?: Selection | undefined;
Type Aliases
type CommandFunc
type CommandFunc<T extends Controller = Controller> = ( editor: T, ...args: any[]) => T;
type ErrorCode
type ErrorCode = | 'child_max_invalid' | 'child_min_invalid' | 'child_object_invalid' | 'child_required' | 'child_type_invalid' | 'child_unknown' | 'first_child_object_invalid' | 'first_child_type_invalid' | 'last_child_object_invalid' | 'last_child_type_invalid' | 'next_sibling_object_invalid' | 'next_sibling_type_invalid' | 'node_data_invalid' | 'node_is_void_invalid' | 'node_mark_invalid' | 'node_object_invalid' | 'node_text_invalid' | 'node_type_invalid' | 'parent_object_invalid' | 'parent_type_invalid' | 'previous_sibling_object_invalid' | 'previous_sibling_type_invalid';
type Node
type Node = Document | Block | Inline | Text;
type NodeJSON
type NodeJSON = DocumentJSON | BlockJSON | InlineJSON | TextJSON;
type NodeProperties
type NodeProperties = | DocumentProperties | BlockProperties | InlineProperties | TextProperties;
type Operation
type Operation = | InsertTextOperation | RemoveTextOperation | AddMarkOperation | RemoveMarkOperation | SetMarkOperation | AddAnnotationOperation | RemoveAnnotationOperation | SetAnnotationOperation | InsertNodeOperation | MergeNodeOperation | MoveNodeOperation | RemoveNodeOperation | SetNodeOperation | SplitNodeOperation | SetSelectionOperation | SetValueOperation;
type Path
type Path = Immutable.List<number> | number[] | string;
type QueryFunc
type QueryFunc<T extends Controller = Controller> = ( editor: T, ...args: any[]) => any;
type RangeType
type RangeType = Range | Selection | Decoration | Annotation;
type RangeTypeJSON
type RangeTypeJSON = RangeJSON | SelectionJSON | DecorationJSON | AnnotationJSON;
type RangeTypeProperties
type RangeTypeProperties = | RangeProperties | SelectionProperties | DecorationProperties | AnnotationProperties;
type resetMemoization
type resetMemoization = () => void;
type useMemoization
type useMemoization = (enabled: boolean) => void;
Namespaces
namespace Data
namespace Data {}
namespace KeyUtils
namespace KeyUtils {}
function create
create: (key?: string) => string;
function resetGenerator
resetGenerator: () => void;
function setGenerator
setGenerator: (func: () => any) => void;
namespace NodeFactory
namespace NodeFactory {}
function create
create: (attrs: Node | NodeJSON | NodeProperties) => Node;
function createList
createList: ( elements?: | Array<Node | NodeJSON | NodeProperties> | Immutable.List<Node | NodeJSON | NodeProperties>) => Immutable.List<Node>;
function createProperties
createProperties: ( attrs?: | Block | Inline | string | { type?: string | undefined; data?: object | undefined }) => NodeProperties;
function fromJS
fromJS: (value: { [key: string]: any }) => NodeJSON;
function fromJSON
fromJSON: (value: { [key: string]: any }) => NodeJSON;
function isNode
isNode: (maybeNode: any) => maybeNode is Node;
function isNodeList
isNodeList: (maybeNodeList: any) => maybeNodeList is Immutable.List<Node>;
namespace PathUtils
namespace PathUtils {}
function compare
compare: ( path: Immutable.List<number>, target: Immutable.List<number>) => number | null;
Compare paths
path
andtarget
to see which is before or after.
function create
create: (attrs: Immutable.List<number> | number[]) => Immutable.List<number>;
Create a path from
attrs
.
function crop
crop: ( a: Immutable.List<number>, b: Immutable.List<number>, size?: number) => Array<Immutable.List<number>>;
Crop paths
a
andb
to an equal size, defaulting to the shortest.
function decrement
decrement: ( path: Immutable.List<number>, n?: number, index?: number) => Immutable.List<number>;
Decrement a
path
byn
atindex
, defaulting to the last index.
function drop
drop: (path: Immutable.List<number>, n?: number) => Immutable.List<number>;
Drop a
path
, returning a relative path from a depth ofn
.
function getAncestors
getAncestors: (path: Immutable.List<number>) => Immutable.List<number>;
Get all ancestor paths of the given path.
function increment
increment: ( path: Immutable.List<number>, n?: number, index?: number) => Immutable.List<number>;
Increment a
path
byn
atindex
, defaulting to the last index.
function isAbove
isAbove: ( path: Immutable.List<number>, target: Immutable.List<number>) => boolean;
Is a
path
above anothertarget
path?
function isAfter
isAfter: ( path: Immutable.List<number>, target: Immutable.List<number>) => boolean;
Is a
path
after anothertarget
path in a document?
function isBefore
isBefore: ( path: Immutable.List<number>, target: Immutable.List<number>) => boolean;
Is a
path
before anothertarget
path in a document?
function isEqual
isEqual: ( path: Immutable.List<number>, target: Immutable.List<number>) => boolean;
Is a
path
equal to anothertarget
path in a document?
function isOlder
isOlder: ( path: Immutable.List<number>, target: Immutable.List<number>) => boolean;
Is a
path
older than atarget
path? Meaning that it ends as an older sibling of one of the indexes in the target.
function isPath
isPath: (maybePath: any) => maybePath is any;
Is an
any
object a path?
function isSibling
isSibling: ( path: Immutable.List<number>, target: Immutable.List<number>) => boolean;
Is a
path
a sibling of atarget
path?
function isYounger
isYounger: ( path: Immutable.List<number>, target: Immutable.List<number>) => boolean;
Is a
path
younger than atarget
path? Meaning that it ends as a younger sibling of one of the indexes in the target.
function lift
lift: (path: Immutable.List<number>, n?: number) => Immutable.List<number>;
Lift a
path
to refer to itsn
th ancestor.
function max
max: (a: Immutable.List<number>, b: Immutable.List<number>) => number;
Get the maximum length of paths
a
andb
.
function min
min: (a: Immutable.List<number>, b: Immutable.List<number>) => number;
Get the minimum length of paths
a
andb
.
function relate
relate: ( a: Immutable.List<number>, b: Immutable.List<number>) => Immutable.List<number>;
Get the common ancestor path of path
a
and pathb
.
function transform
transform: ( path: Immutable.List<number>, operation: Operation | OperationJSON | OperationProperties) => Immutable.List<Immutable.List<number>>;
Transform a
path
by anoperation
, adjusting it to stay current.
Package Files (1)
Dependencies (2)
Dev Dependencies (0)
No dev dependencies.
Peer Dependencies (0)
No peer dependencies.
Badge
To add a badge like this oneto your package's README, use the codes available below.
You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@types/slate
.
- Markdown[![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@types/slate)
- HTML<a href="https://www.jsdocs.io/package/@types/slate"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 14892 ms. - Missing or incorrect documentation? Open an issue for this package.