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:47
Parameters
Section titled “Parameters”config
Section titled “config”editor
Section titled “editor”InternalEditor
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:54
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:71
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:111
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:129
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:147
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:160
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:153
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:175
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:189
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:203
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:491
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:219
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:233
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:247
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:261
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:349
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:368
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:325
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:87
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:275
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:288
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:301
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:379
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:537
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:372
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:388
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:523
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:425
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:404
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:442
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:461
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:477
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:508
Parameters
Section titled “Parameters”editor
Section titled “editor”PortableTextEditor
Returns
Section titled “Returns”void