PortableTextEditor
Defined in: packages/editor/src/editor/PortableTextEditor.tsx:33
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new PortableTextEditor(
config):PortableTextEditor
Defined in: packages/editor/src/editor/PortableTextEditor.tsx:43
Parameters
Section titled “Parameters”config
Section titled “config”editable
Section titled “editable”EditableAPI
editorActor
Section titled “editorActor”ActorRef
Returns
Section titled “Returns”PortableTextEditor
Properties
Section titled “Properties”schemaTypes
Section titled “schemaTypes”schemaTypes:
Schema
Defined in: packages/editor/src/editor/PortableTextEditor.tsx:37
A lookup table for all the relevant schema types for this portable text type.
Methods
Section titled “Methods”setEditable()
Section titled “setEditable()”setEditable(
editable):void
Defined in: packages/editor/src/editor/PortableTextEditor.tsx:48
Parameters
Section titled “Parameters”editable
Section titled “editable”EditableAPI
Returns
Section titled “Returns”void
activeAnnotations()
Section titled “activeAnnotations()”
staticactiveAnnotations(editor):PortableTextObject[]
Defined in: packages/editor/src/editor/PortableTextEditor.tsx:65
Parameters
Section titled “Parameters”editor
Section titled “editor”PortableTextEditor
Returns
Section titled “Returns”addAnnotation()
Section titled “addAnnotation()”
staticaddAnnotation<TSchemaType>(editor,type,value?):AddedAnnotationPaths|undefined
Defined in: packages/editor/src/editor/PortableTextEditor.tsx:105
Type Parameters
Section titled “Type Parameters”TSchemaType
Section titled “TSchemaType”TSchemaType extends object
Parameters
Section titled “Parameters”editor
Section titled “editor”PortableTextEditor
TSchemaType
value?
Section titled “value?”Returns
Section titled “Returns”AddedAnnotationPaths | undefined
blur()
Section titled “blur()”
staticblur(editor):void
Defined in: packages/editor/src/editor/PortableTextEditor.tsx:123
Parameters
Section titled “Parameters”editor
Section titled “editor”PortableTextEditor
Returns
Section titled “Returns”void
delete()
Section titled “delete()”
staticdelete(editor,selection,options?):void
Defined in: packages/editor/src/editor/PortableTextEditor.tsx:141
Parameters
Section titled “Parameters”editor
Section titled “editor”PortableTextEditor
selection
Section titled “selection”options?
Section titled “options?”Returns
Section titled “Returns”void
findByPath()
Section titled “findByPath()”
staticfindByPath(editor,path): [PortableTextObject|PortableTextSpan|PortableTextTextBlock<PortableTextObject|PortableTextSpan> |undefined,Path|undefined]
Defined in: packages/editor/src/editor/PortableTextEditor.tsx:154
Parameters
Section titled “Parameters”editor
Section titled “editor”PortableTextEditor
Path
Returns
Section titled “Returns”[PortableTextObject | PortableTextSpan | PortableTextTextBlock<PortableTextObject | PortableTextSpan> | undefined, Path | undefined]
findDOMNode()
Section titled “findDOMNode()”
staticfindDOMNode(editor,element):Node|undefined
Defined in: packages/editor/src/editor/PortableTextEditor.tsx:147
Parameters
Section titled “Parameters”editor
Section titled “editor”PortableTextEditor
element
Section titled “element”PortableTextObject | PortableTextSpan | PortableTextTextBlock<PortableTextObject | PortableTextSpan>
Returns
Section titled “Returns”Node | undefined
focus()
Section titled “focus()”
staticfocus(editor):void
Defined in: packages/editor/src/editor/PortableTextEditor.tsx:169
Parameters
Section titled “Parameters”editor
Section titled “editor”PortableTextEditor
Returns
Section titled “Returns”void
focusBlock()
Section titled “focusBlock()”
staticfocusBlock(editor):PortableTextBlock|undefined
Defined in: packages/editor/src/editor/PortableTextEditor.tsx:183
Parameters
Section titled “Parameters”editor
Section titled “editor”PortableTextEditor
Returns
Section titled “Returns”PortableTextBlock | undefined
focusChild()
Section titled “focusChild()”
staticfocusChild(editor):PortableTextChild|undefined
Defined in: packages/editor/src/editor/PortableTextEditor.tsx:197
Parameters
Section titled “Parameters”editor
Section titled “editor”PortableTextEditor
Returns
Section titled “Returns”PortableTextChild | undefined
getFragment()
Section titled “getFragment()”
staticgetFragment(editor):PortableTextBlock[] |undefined
Defined in: packages/editor/src/editor/PortableTextEditor.tsx:485
Parameters
Section titled “Parameters”editor
Section titled “editor”PortableTextEditor
Returns
Section titled “Returns”PortableTextBlock[] | undefined
getSelection()
Section titled “getSelection()”
staticgetSelection(editor):EditorSelection
Defined in: packages/editor/src/editor/PortableTextEditor.tsx:213
Parameters
Section titled “Parameters”editor
Section titled “editor”PortableTextEditor
Returns
Section titled “Returns”getValue()
Section titled “getValue()”
staticgetValue(editor):PortableTextBlock[] |undefined
Defined in: packages/editor/src/editor/PortableTextEditor.tsx:227
Parameters
Section titled “Parameters”editor
Section titled “editor”PortableTextEditor
Returns
Section titled “Returns”PortableTextBlock[] | undefined
hasBlockStyle()
Section titled “hasBlockStyle()”
statichasBlockStyle(editor,blockStyle):boolean
Defined in: packages/editor/src/editor/PortableTextEditor.tsx:241
Parameters
Section titled “Parameters”editor
Section titled “editor”PortableTextEditor
blockStyle
Section titled “blockStyle”string
Returns
Section titled “Returns”boolean
hasListStyle()
Section titled “hasListStyle()”
statichasListStyle(editor,listStyle):boolean
Defined in: packages/editor/src/editor/PortableTextEditor.tsx:255
Parameters
Section titled “Parameters”editor
Section titled “editor”PortableTextEditor
listStyle
Section titled “listStyle”string
Returns
Section titled “Returns”boolean
insertBlock()
Section titled “insertBlock()”
staticinsertBlock<TSchemaType>(editor,type,value?):Path|undefined
Defined in: packages/editor/src/editor/PortableTextEditor.tsx:343
Type Parameters
Section titled “Type Parameters”TSchemaType
Section titled “TSchemaType”TSchemaType extends object
Parameters
Section titled “Parameters”editor
Section titled “editor”PortableTextEditor
TSchemaType
value?
Section titled “value?”Returns
Section titled “Returns”Path | undefined
insertBreak()
Section titled “insertBreak()”
staticinsertBreak(editor):void
Defined in: packages/editor/src/editor/PortableTextEditor.tsx:362
Parameters
Section titled “Parameters”editor
Section titled “editor”PortableTextEditor
Returns
Section titled “Returns”void
insertChild()
Section titled “insertChild()”
staticinsertChild<TSchemaType>(editor,type,value?):Path|undefined
Defined in: packages/editor/src/editor/PortableTextEditor.tsx:319
Type Parameters
Section titled “Type Parameters”TSchemaType
Section titled “TSchemaType”TSchemaType extends object
Parameters
Section titled “Parameters”editor
Section titled “editor”PortableTextEditor
TSchemaType
value?
Section titled “value?”Returns
Section titled “Returns”Path | undefined
isAnnotationActive()
Section titled “isAnnotationActive()”
staticisAnnotationActive(editor,annotationType):boolean
Defined in: packages/editor/src/editor/PortableTextEditor.tsx:81
Parameters
Section titled “Parameters”editor
Section titled “editor”PortableTextEditor
annotationType
Section titled “annotationType”string
Returns
Section titled “Returns”boolean
isCollapsedSelection()
Section titled “isCollapsedSelection()”
staticisCollapsedSelection(editor):boolean
Defined in: packages/editor/src/editor/PortableTextEditor.tsx:269
Parameters
Section titled “Parameters”editor
Section titled “editor”PortableTextEditor
Returns
Section titled “Returns”boolean
isExpandedSelection()
Section titled “isExpandedSelection()”
staticisExpandedSelection(editor):boolean
Defined in: packages/editor/src/editor/PortableTextEditor.tsx:282
Parameters
Section titled “Parameters”editor
Section titled “editor”PortableTextEditor
Returns
Section titled “Returns”boolean
isMarkActive()
Section titled “isMarkActive()”
staticisMarkActive(editor,mark):boolean
Defined in: packages/editor/src/editor/PortableTextEditor.tsx:295
Parameters
Section titled “Parameters”editor
Section titled “editor”PortableTextEditor
string
Returns
Section titled “Returns”boolean
isObjectPath()
Section titled “isObjectPath()”
staticisObjectPath(_editor,path):boolean
Defined in: packages/editor/src/editor/PortableTextEditor.tsx:373
Parameters
Section titled “Parameters”_editor
Section titled “_editor”PortableTextEditor
Path
Returns
Section titled “Returns”boolean
isSelectionsOverlapping()
Section titled “isSelectionsOverlapping()”
staticisSelectionsOverlapping(editor,selectionA,selectionB):boolean
Defined in: packages/editor/src/editor/PortableTextEditor.tsx:531
Parameters
Section titled “Parameters”editor
Section titled “editor”PortableTextEditor
selectionA
Section titled “selectionA”selectionB
Section titled “selectionB”Returns
Section titled “Returns”boolean
isVoid()
Section titled “isVoid()”
staticisVoid(editor,element):boolean
Defined in: packages/editor/src/editor/PortableTextEditor.tsx:366
Parameters
Section titled “Parameters”editor
Section titled “editor”PortableTextEditor
element
Section titled “element”PortableTextObject | PortableTextSpan | PortableTextTextBlock<PortableTextObject | PortableTextSpan>
Returns
Section titled “Returns”boolean
marks()
Section titled “marks()”
staticmarks(editor):string[]
Defined in: packages/editor/src/editor/PortableTextEditor.tsx:382
Parameters
Section titled “Parameters”editor
Section titled “editor”PortableTextEditor
Returns
Section titled “Returns”string[]
redo()
Section titled “redo()”
staticredo(editor):void
Defined in: packages/editor/src/editor/PortableTextEditor.tsx:517
Parameters
Section titled “Parameters”editor
Section titled “editor”PortableTextEditor
Returns
Section titled “Returns”void
removeAnnotation()
Section titled “removeAnnotation()”
staticremoveAnnotation<TSchemaType>(editor,type):void
Defined in: packages/editor/src/editor/PortableTextEditor.tsx:419
Type Parameters
Section titled “Type Parameters”TSchemaType
Section titled “TSchemaType”TSchemaType extends object
Parameters
Section titled “Parameters”editor
Section titled “editor”PortableTextEditor
TSchemaType
Returns
Section titled “Returns”void
select()
Section titled “select()”
staticselect(editor,selection):void
Defined in: packages/editor/src/editor/PortableTextEditor.tsx:398
Parameters
Section titled “Parameters”editor
Section titled “editor”PortableTextEditor
selection
Section titled “selection”Returns
Section titled “Returns”void
toggleBlockStyle()
Section titled “toggleBlockStyle()”
statictoggleBlockStyle(editor,blockStyle):void
Defined in: packages/editor/src/editor/PortableTextEditor.tsx:436
Parameters
Section titled “Parameters”editor
Section titled “editor”PortableTextEditor
blockStyle
Section titled “blockStyle”string
Returns
Section titled “Returns”void
toggleList()
Section titled “toggleList()”
statictoggleList(editor,listStyle):void
Defined in: packages/editor/src/editor/PortableTextEditor.tsx:455
Parameters
Section titled “Parameters”editor
Section titled “editor”PortableTextEditor
listStyle
Section titled “listStyle”string
Returns
Section titled “Returns”void
toggleMark()
Section titled “toggleMark()”
statictoggleMark(editor,mark):void
Defined in: packages/editor/src/editor/PortableTextEditor.tsx:471
Parameters
Section titled “Parameters”editor
Section titled “editor”PortableTextEditor
string
Returns
Section titled “Returns”void
undo()
Section titled “undo()”
staticundo(editor):void
Defined in: packages/editor/src/editor/PortableTextEditor.tsx:502
Parameters
Section titled “Parameters”editor
Section titled “editor”PortableTextEditor
Returns
Section titled “Returns”void