@modular/sdk/editor
645 exports in 5 groups.
Interfaces124
- BaseCaretinterfacedirection, getAdjacentCaret, getNodeAtCaret, getParentAtCaret, getSiblingCaret, insert, origin, remove, replaceOrInsert, splice, type, __@iterator@281474976711162()
- BaseSelectioninterface_cachedNodes, dirty, clone(), extract(), getCachedNodes(), getNodes(), getStartEndPoints(), getTextContent(), insertNodes(), insertRawText(), insertText(), is(), isBackward(), isCollapsed(), setCachedNodes()
- CancellationTokeninterfaceA cancellation token is passed to an asynchronous or long running operation to request cancellation, like cancelling a request for completion items because the user continued to type. To get an instance of a `CancellationToken` use a CancellationTokenSource.
- CaretRangeinterfaceA RangeSelection expressed as a pair of Carets
- ChildCaretinterfaceA ChildCaret points from an origin ElementNode towards its first or last child.
- CommonAncestorResultAncestorinterfaceNode a is an ancestor of node b, and not the same node
- CommonAncestorResultBranchinterfaceNode a and node b have a common ancestor but are on different branches, the `a` and `b` properties of this result are the ancestors of a and b that are children of the commonAncestor.
- CommonAncestorResultDescendantinterfaceNode a was a descendant of node b, and not the same node
- CommonAncestorResultSameinterfaceThe two compared nodes are the same
- CompactSerializedEditorStateinterfaceA document written in the compact form, which omits from every node the properties parsing restores on its own.
- ConfigurationChangeEventinterfaceAn event describing the change in Configuration
- CreateEditorArgsinterfacedisableEvents, dom, editable, editorState, html, namespace, nodes, onError, onWarn, parentEditor, theme
- CSSPropertiesinterfaceaccentColor, alignContent, alignItems, alignmentBaseline, alignSelf, alignTracks, all, anchorName, anchorScope, animation, animationComposition, animationDelay, animationDirection, animationDuration, animationFillMode, animationIterationCount, animationName, animationPlayState, animationRange, animationRangeEnd, animationRangeStart, animationTimeline, animationTimingFunction, appearance, aspectRatio, backdropFilter, backfaceVisibility, background, backgroundAttachment, backgroundBlendMode, backgroundClip, backgroundColor, backgroundImage, backgroundOrigin, backgroundPosition, backgroundPositionX, backgroundPositionY, backgroundRepeat, backgroundSize, baselineShift, blockSize, border, borderBlock, borderBlockColor, borderBlockEnd, borderBlockEndColor, borderBlockEndStyle, borderBlockEndWidth, borderBlockStart, borderBlockStartColor, borderBlockStartStyle, borderBlockStartWidth, borderBlockStyle, borderBlockWidth, borderBottom, borderBottomColor, borderBottomLeftRadius, borderBottomRightRadius, borderBottomStyle, borderBottomWidth, borderCollapse, borderColor, borderEndEndRadius, borderEndStartRadius, borderImage, borderImageOutset, borderImageRepeat, borderImageSlice, borderImageSource, borderImageWidth, borderInline, borderInlineColor, borderInlineEnd, borderInlineEndColor, borderInlineEndStyle, borderInlineEndWidth, borderInlineStart, borderInlineStartColor, borderInlineStartStyle, borderInlineStartWidth, borderInlineStyle, borderInlineWidth, borderLeft, borderLeftColor, borderLeftStyle, borderLeftWidth, borderRadius, borderRight, borderRightColor, borderRightStyle, borderRightWidth, borderSpacing, borderStartEndRadius, borderStartStartRadius, borderStyle, borderTop, borderTopColor, borderTopLeftRadius, borderTopRightRadius, borderTopStyle, borderTopWidth, borderWidth, bottom, boxAlign, boxDecorationBreak, boxDirection, boxFlex, boxFlexGroup, boxLines, boxOrdinalGroup, boxOrient, boxPack, boxShadow, boxSizing, breakAfter, breakBefore, breakInside, captionSide, caret, caretColor, caretShape, clear, clip, clipPath, clipRule, color, colorAdjust, colorInterpolation, colorInterpolationFilters, colorRendering, colorScheme, columnCount, columnFill, columnGap, columnRule, columnRuleColor, columnRuleStyle, columnRuleWidth, columns, columnSpan, columnWidth, contain, container, containerName, containerType, containIntrinsicBlockSize, containIntrinsicHeight, containIntrinsicInlineSize, containIntrinsicSize, containIntrinsicWidth, content, contentVisibility, counterIncrement, counterReset, counterSet, cursor, cx, cy, d, direction, display, dominantBaseline, emptyCells, fieldSizing, fill, fillOpacity, fillRule, filter, flex, flexBasis, flexDirection, flexFlow, flexGrow, flexShrink, flexWrap, float, floodColor, floodOpacity, font, fontFamily, fontFeatureSettings, fontKerning, fontLanguageOverride, fontOpticalSizing, fontPalette, fontSize, fontSizeAdjust, fontSmooth, fontStretch, fontStyle, fontSynthesis, fontSynthesisPosition, fontSynthesisSmallCaps, fontSynthesisStyle, fontSynthesisWeight, fontVariant, fontVariantAlternates, fontVariantCaps, fontVariantEastAsian, fontVariantEmoji, fontVariantLigatures, fontVariantNumeric, fontVariantPosition, fontVariationSettings, fontWeight, fontWidth, forcedColorAdjust, gap, glyphOrientationVertical, grid, gridArea, gridAutoColumns, gridAutoFlow, gridAutoRows, gridColumn, gridColumnEnd, gridColumnGap, gridColumnStart, gridGap, gridRow, gridRowEnd, gridRowGap, gridRowStart, gridTemplate, gridTemplateAreas, gridTemplateColumns, gridTemplateRows, hangingPunctuation, height, hyphenateCharacter, hyphenateLimitChars, hyphens, imageOrientation, imageRendering, imageResolution, imeMode, initialLetter, initialLetterAlign, inlineSize, inset, insetArea, insetBlock, insetBlockEnd, insetBlockStart, insetInline, insetInlineEnd, insetInlineStart, interpolateSize, isolation, justifyContent, justifyItems, justifySelf, justifyTracks, KhtmlBoxAlign, KhtmlBoxDirection, KhtmlBoxFlex, KhtmlBoxFlexGroup, KhtmlBoxLines, KhtmlBoxOrdinalGroup, KhtmlBoxOrient, KhtmlBoxPack, KhtmlLineBreak, KhtmlOpacity, KhtmlUserSelect, left, letterSpacing, lightingColor, lineBreak, lineClamp, lineHeight, lineHeightStep, listStyle, listStyleImage, listStylePosition, listStyleType, margin, marginBlock, marginBlockEnd, marginBlockStart, marginBottom, marginInline, marginInlineEnd, marginInlineStart, marginLeft, marginRight, marginTop, marginTrim, marker, markerEnd, markerMid, markerStart, mask, maskBorder, maskBorderMode, maskBorderOutset, maskBorderRepeat, maskBorderSlice, maskBorderSource, maskBorderWidth, maskClip, maskComposite, maskImage, maskMode, maskOrigin, maskPosition, maskRepeat, maskSize, maskType, masonryAutoFlow, mathDepth, mathShift, mathStyle, maxBlockSize, maxHeight, maxInlineSize, maxLines, maxWidth, minBlockSize, minHeight, minInlineSize, minWidth, mixBlendMode, motion, motionDistance, motionPath, motionRotation, MozAnimation, MozAnimationDelay, MozAnimationDirection, MozAnimationDuration, MozAnimationFillMode, MozAnimationIterationCount, MozAnimationName, MozAnimationPlayState, MozAnimationTimingFunction, MozAppearance, MozBackfaceVisibility, MozBackgroundClip, MozBackgroundOrigin, MozBackgroundSize, MozBinding, MozBorderBottomColors, MozBorderEndColor, MozBorderEndStyle, MozBorderEndWidth, MozBorderImage, MozBorderLeftColors, MozBorderRadius, MozBorderRadiusBottomleft, MozBorderRadiusBottomright, MozBorderRadiusTopleft, MozBorderRadiusTopright, MozBorderRightColors, MozBorderStartColor, MozBorderStartStyle, MozBorderTopColors, MozBoxAlign, MozBoxDirection, MozBoxFlex, MozBoxOrdinalGroup, MozBoxOrient, MozBoxPack, MozBoxShadow, MozBoxSizing, MozColumnCount, MozColumnFill, MozColumnRule, MozColumnRuleColor, MozColumnRuleStyle, MozColumnRuleWidth, MozColumns, MozColumnWidth, MozContextProperties, MozFloatEdge, MozFontFeatureSettings, MozFontLanguageOverride, MozForceBrokenImageIcon, MozHyphens, MozMarginEnd, MozMarginStart, MozOpacity, MozOrient, MozOsxFontSmoothing, MozOutline, MozOutlineColor, MozOutlineRadius, MozOutlineRadiusBottomleft, MozOutlineRadiusBottomright, MozOutlineRadiusTopleft, MozOutlineRadiusTopright, MozOutlineStyle, MozOutlineWidth, MozPaddingEnd, MozPaddingStart, MozPerspective, MozPerspectiveOrigin, MozStackSizing, MozTabSize, MozTextAlignLast, MozTextBlink, MozTextDecorationColor, MozTextDecorationLine, MozTextDecorationStyle, MozTextSizeAdjust, MozTransform, MozTransformOrigin, MozTransformStyle, MozTransition, MozTransitionDelay, MozTransitionDuration, MozTransitionProperty, MozTransitionTimingFunction, MozUserFocus, MozUserInput, MozUserModify, MozUserSelect, MozWindowDragging, MozWindowShadow, msAccelerator, msBlockProgression, msContentZoomChaining, msContentZooming, msContentZoomLimit, msContentZoomLimitMax, msContentZoomLimitMin, msContentZoomSnap, msContentZoomSnapPoints, msContentZoomSnapType, msFilter, msFlex, msFlexDirection, msFlexPositive, msFlowFrom, msFlowInto, msGridColumns, msGridRows, msHighContrastAdjust, msHyphenateLimitChars, msHyphenateLimitLines, msHyphenateLimitZone, msHyphens, msImeAlign, msImeMode, msLineBreak, msOrder, msOverflowStyle, msOverflowX, msOverflowY, msScrollbar3dlightColor, msScrollbarArrowColor, msScrollbarBaseColor, msScrollbarDarkshadowColor, msScrollbarFaceColor, msScrollbarHighlightColor, msScrollbarShadowColor, msScrollbarTrackColor, msScrollChaining, msScrollLimit, msScrollLimitXMax, msScrollLimitXMin, msScrollLimitYMax, msScrollLimitYMin, msScrollRails, msScrollSnapPointsX, msScrollSnapPointsY, msScrollSnapType, msScrollSnapX, msScrollSnapY, msScrollTranslation, msTextAutospace, msTextCombineHorizontal, msTextOverflow, msTouchAction, msTouchSelect, msTransform, msTransformOrigin, msTransition, msTransitionDelay, msTransitionDuration, msTransitionProperty, msTransitionTimingFunction, msUserSelect, msWordBreak, msWrapFlow, msWrapMargin, msWrapThrough, msWritingMode, OAnimation, OAnimationDelay, OAnimationDirection, OAnimationDuration, OAnimationFillMode, OAnimationIterationCount, OAnimationName, OAnimationPlayState, OAnimationTimingFunction, OBackgroundSize, objectFit, objectPosition, objectViewBox, OBorderImage, offset, offsetAnchor, offsetBlock, offsetBlockEnd, offsetBlockStart, offsetDistance, offsetInline, offsetInlineEnd, offsetInlineStart, offsetPath, offsetPosition, offsetRotate, offsetRotation, OObjectFit, OObjectPosition, opacity, order, orphans, OTabSize, OTextOverflow, OTransform, OTransformOrigin, OTransition, OTransitionDelay, OTransitionDuration, OTransitionProperty, OTransitionTimingFunction, outline, outlineColor, outlineOffset, outlineStyle, outlineWidth, overflow, overflowAnchor, overflowBlock, overflowClipBox, overflowClipMargin, overflowInline, overflowWrap, overflowX, overflowY, overlay, overscrollBehavior, overscrollBehaviorBlock, overscrollBehaviorInline, overscrollBehaviorX, overscrollBehaviorY, padding, paddingBlock, paddingBlockEnd, paddingBlockStart, paddingBottom, paddingInline, paddingInlineEnd, paddingInlineStart, paddingLeft, paddingRight, paddingTop, page, pageBreakAfter, pageBreakBefore, pageBreakInside, paintOrder, perspective, perspectiveOrigin, placeContent, placeItems, placeSelf, pointerEvents, position, positionAnchor, positionArea, positionTry, positionTryFallbacks, positionTryOptions, positionTryOrder, positionVisibility, printColorAdjust, quotes, r, resize, right, rotate, rowGap, rubyAlign, rubyMerge, rubyOverhang, rubyPosition, rx, ry, scale, scrollbarColor, scrollbarGutter, scrollbarWidth, scrollBehavior, scrollInitialTarget, scrollMargin, scrollMarginBlock, scrollMarginBlockEnd, scrollMarginBlockStart, scrollMarginBottom, scrollMarginInline, scrollMarginInlineEnd, scrollMarginInlineStart, scrollMarginLeft, scrollMarginRight, scrollMarginTop, scrollPadding, scrollPaddingBlock, scrollPaddingBlockEnd, scrollPaddingBlockStart, scrollPaddingBottom, scrollPaddingInline, scrollPaddingInlineEnd, scrollPaddingInlineStart, scrollPaddingLeft, scrollPaddingRight, scrollPaddingTop, scrollSnapAlign, scrollSnapCoordinate, scrollSnapDestination, scrollSnapMargin, scrollSnapMarginBottom, scrollSnapMarginLeft, scrollSnapMarginRight, scrollSnapMarginTop, scrollSnapPointsX, scrollSnapPointsY, scrollSnapStop, scrollSnapType, scrollSnapTypeX, scrollSnapTypeY, scrollTimeline, scrollTimelineAxis, scrollTimelineName, shapeImageThreshold, shapeMargin, shapeOutside, shapeRendering, speakAs, stopColor, stopOpacity, stroke, strokeColor, strokeDasharray, strokeDashoffset, strokeLinecap, strokeLinejoin, strokeMiterlimit, strokeOpacity, strokeWidth, tableLayout, tabSize, textAlign, textAlignLast, textAnchor, textAutospace, textBox, textBoxEdge, textBoxTrim, textCombineUpright, textDecoration, textDecorationColor, textDecorationLine, textDecorationSkip, textDecorationSkipInk, textDecorationStyle, textDecorationThickness, textEmphasis, textEmphasisColor, textEmphasisPosition, textEmphasisStyle, textIndent, textJustify, textOrientation, textOverflow, textRendering, textShadow, textSizeAdjust, textSpacingTrim, textTransform, textUnderlineOffset, textUnderlinePosition, textWrap, textWrapMode, textWrapStyle, timelineScope, top, touchAction, transform, transformBox, transformOrigin, transformStyle, transition, transitionBehavior, transitionDelay, transitionDuration, transitionProperty, transitionTimingFunction, translate, unicodeBidi, userSelect, vectorEffect, verticalAlign, viewTimeline, viewTimelineAxis, viewTimelineInset, viewTimelineName, viewTransitionClass, viewTransitionName, visibility, WebkitAlignContent, WebkitAlignItems, WebkitAlignSelf, WebkitAnimation, WebkitAnimationDelay, WebkitAnimationDirection, WebkitAnimationDuration, WebkitAnimationFillMode, WebkitAnimationIterationCount, WebkitAnimationName, WebkitAnimationPlayState, WebkitAnimationTimingFunction, WebkitAppearance, WebkitBackdropFilter, WebkitBackfaceVisibility, WebkitBackgroundClip, WebkitBackgroundOrigin, WebkitBackgroundSize, WebkitBorderBefore, WebkitBorderBeforeColor, WebkitBorderBeforeStyle, WebkitBorderBeforeWidth, WebkitBorderBottomLeftRadius, WebkitBorderBottomRightRadius, WebkitBorderImage, WebkitBorderImageSlice, WebkitBorderRadius, WebkitBorderTopLeftRadius, WebkitBorderTopRightRadius, WebkitBoxAlign, WebkitBoxDecorationBreak, WebkitBoxDirection, WebkitBoxFlex, WebkitBoxFlexGroup, WebkitBoxLines, WebkitBoxOrdinalGroup, WebkitBoxOrient, WebkitBoxPack, WebkitBoxReflect, WebkitBoxShadow, WebkitBoxSizing, WebkitClipPath, WebkitColumnCount, WebkitColumnFill, WebkitColumnRule, WebkitColumnRuleColor, WebkitColumnRuleStyle, WebkitColumnRuleWidth, WebkitColumns, WebkitColumnSpan, WebkitColumnWidth, WebkitFilter, WebkitFlex, WebkitFlexBasis, WebkitFlexDirection, WebkitFlexFlow, WebkitFlexGrow, WebkitFlexShrink, WebkitFlexWrap, WebkitFontFeatureSettings, WebkitFontKerning, WebkitFontSmoothing, WebkitFontVariantLigatures, WebkitHyphenateCharacter, WebkitHyphens, WebkitInitialLetter, WebkitJustifyContent, WebkitLineBreak, WebkitLineClamp, WebkitLogicalHeight, WebkitLogicalWidth, WebkitMarginEnd, WebkitMarginStart, WebkitMask, WebkitMaskAttachment, WebkitMaskBoxImage, WebkitMaskBoxImageOutset, WebkitMaskBoxImageRepeat, WebkitMaskBoxImageSlice, WebkitMaskBoxImageSource, WebkitMaskBoxImageWidth, WebkitMaskClip, WebkitMaskComposite, WebkitMaskImage, WebkitMaskOrigin, WebkitMaskPosition, WebkitMaskPositionX, WebkitMaskPositionY, WebkitMaskRepeat, WebkitMaskRepeatX, WebkitMaskRepeatY, WebkitMaskSize, WebkitMaxInlineSize, WebkitOrder, WebkitOverflowScrolling, WebkitPaddingEnd, WebkitPaddingStart, WebkitPerspective, WebkitPerspectiveOrigin, WebkitPrintColorAdjust, WebkitRubyPosition, WebkitScrollSnapType, WebkitShapeMargin, WebkitTapHighlightColor, WebkitTextCombine, WebkitTextDecorationColor, WebkitTextDecorationLine, WebkitTextDecorationSkip, WebkitTextDecorationStyle, WebkitTextEmphasis, WebkitTextEmphasisColor, WebkitTextEmphasisPosition, WebkitTextEmphasisStyle, WebkitTextFillColor, WebkitTextOrientation, WebkitTextSizeAdjust, WebkitTextStroke, WebkitTextStrokeColor, WebkitTextStrokeWidth, WebkitTextUnderlinePosition, WebkitTouchCallout, WebkitTransform, WebkitTransformOrigin, WebkitTransformStyle, WebkitTransition, WebkitTransitionDelay, WebkitTransitionDuration, WebkitTransitionProperty, WebkitTransitionTimingFunction, WebkitUserModify, WebkitUserSelect, WebkitWritingMode, whiteSpace, whiteSpaceCollapse, widows, width, willChange, wordBreak, wordSpacing, wordWrap, writingMode, x, y, zIndex, zoom
- DataTransferFileinterfaceA file associated with a DataTransferItem. Instances of this type can only be created by the editor and not by extensions.
- DOMExportOutputinterface$getChildNodes, after, append, element
- DOMSelectionBoundaryPointsinterfaceA subset of `Selection` covering the four boundary-point fields Lexical reads plus `direction`.
- EditorConfiginterfacedisableEvents, dom, namespace, theme
- EditorExternalFrameAllowedResultinterfaceallowed, src, trustedDomains
- EditorExternalFrameCapabilityinterfacegetTrustedDomains(), onDidChangeTrustedDomains(), validateSrc()
- EditorExternalFrameDeniedResultinterfaceallowed, message, reason, trustedDomains
- EditorHostEditorCapabilityinterface$append, $create, $createExtensionDecoratorNode, $createExtensionElementNode, $createExtensionFigureNode, $insert, $isExtensionDecoratorNode, $isExtensionElementNode, $move, ExtensionElementNode, ExtensionRendererNode, externalFrames, TOGGLE_AUDIO_RECORDING_COMMAND, registerElement(), registerExtensionNodeRenderer(), registerSlashCommand(), useChildren(), useNodeState()
- EditorHostModuleApiinterfacedefault, mod
- EditorStateReadOptionsinterfaceeditor
- EditorThemeClassesinterfaceblockCursor, characterLimit, code, codeHighlight, collaboration, embedBlock, hashtag, heading, hr, hrSelected, image, indent, link, list, ltr, mark, markOverlap, paragraph, quote, root, rtl, specialText, tab, table, tableAddColumns, tableAddRows, tableCell, tableCellActionButton, tableCellActionButtonContainer, tableCellHeader, tableCellResizer, tableCellSelected, tableRow, tableScrollableWrapper, tableSelected, tableSelection, tableStickyScrollbar, text
- EventinterfaceRepresents a typed event. A function that represents an event to which you subscribe by calling it with a listener function as argument.
- ExtensionBuildStateinterfacegetDependency, getDirectDependentNames, getInitResult, getPeer, getPeerNameSet
- ExtensionElementCapabilityinterfaceregisterElement()
- ExtensionElementChildHandleinterfacekey, props, type
- ExtensionElementChildPropsinterfacefor
- ExtensionElementChildSchemainterfaceallow, inline, max, min, autofill()
- ExtensionElementDefinitioninterfacechildren, render()
- ExtensionElementRenderContextinterfaceChild, children, Children, nodeKey, props, setProps(), update()
- ExtensionInitStateinterfaceAn object that the init method can use to access the configuration for extension dependencies
- ExtensionLanguageCapabilityinterfaceregisterProvider()
- ExtensionLanguageCellinterfaceblockId, blockType, languageId, text
- ExtensionLanguageDiagnosticinterfacefixes, id, message, range, severity
- ExtensionLanguageDiagnosticFixinterfaceedits, title
- ExtensionLanguageProviderinterfaceid, rules
- ExtensionLanguageRangeinterfaceend, start
- ExtensionLanguageRuleinterfaceid, selector, analyze()
- ExtensionLanguageRuleContextinterfacecell, signal
- ExtensionLanguageTextEditinterfaceblockId, range, text
- ExtensionNodeRendererCapabilityinterfaceregisterExtensionNodeRenderer()
- ExtensionNodeRenderPropsinterfacenodeKey, props, type
- ExtensionRegisterStateinterfaceAn object that the register method can use to detect unmount and access the configuration for extension dependencies
- ExtensionSlashCommandinterfaceid, keywords, title, run()
- ExtensionSlashCommandCapabilityinterfaceregisterSlashCommand()
- ExtensionSlashCommandRunContextinterfaceeditor, query
- ExtensionWidgetCapabilityinterfaceregisterExtensionWidget()
- FieldOptionsinterfaceBoth directions of a property that *is* a node field, as withField takes them: the field name, the two value tables (each used by the one direction it names), and the accessor each direction stands in for.
- FileChangeEventinterfaceThe event filesystem providers must use to signal a file change.
- FileCreateEventinterfaceAn event that is fired after files are created.
- FileDeleteEventinterfaceAn event that is fired after files are deleted.
- FileRenameEventinterfaceAn event that is fired after files are renamed.
- FileStatinterfaceThe `FileStat`-type represents metadata about a file
- FileSysteminterfaceThe file system interface exposes the editor's built-in and contributed file system providers.
- FileSystemProviderinterfaceThe filesystem provider defines what the editor needs to read, write, discover, and to manage files and folders.
- FileSystemWatcherinterfaceA file system watcher notifies about changes to files and folders on disk or from other FileSystemProviders. To get an instance of a `FileSystemWatcher` use workspace.createFileSystemWatcher createFileSystemWatcher.
- FileWillCreateEventinterfaceAn event that is fired when files are going to be created. To make modifications to the workspace before the files are created, call the waitUntil-function with a thenable that resolves to a workspace edit.
- FileWillDeleteEventinterfaceAn event that is fired when files are going to be deleted. To make modifications to the workspace before the files are deleted, call the `waitUntil`-function with a thenable that resolves to a workspace edit.
- FileWillRenameEventinterfaceAn event that is fired when files are going to be renamed. To make modifications to the workspace before the files are renamed, call the `waitUntil`-function with a thenable that resolves to a workspace edit.
- FormEventinterfacebubbles, cancelable, currentTarget, defaultPrevented, eventPhase, isTrusted, nativeEvent, target, timeStamp, type, isDefaultPrevented(), isPropagationStopped(), persist(), preventDefault(), stopPropagation()
- HostContextinterfaceThe context for code the host runs inside the renderer itself: editor extensions, canvas elements, and React UI reached through `useMod()`. It carries the same capabilities as a view minus the panel.
- InitialEditorConfiginterface$initialEditorState, editable, html, namespace, nodes, onError, onWarn, parentEditor, theme
- InlineFormattableNodeinterfacegetFormat(), getFormatFlags(), hasFormat(), setFormat(), toggleFormat()
- KeyboardShortcutinterface$disabled, $dispatch, bubbleFromNestedEditors, command, description, key, modifiers, unshiftedKey
- KeyboardShortcutMatchinterfacekey, modifiers, unshiftedKey
- LexicalCommandinterface__@LexicalCommandBrand@35033, type
- LexicalEditorWithDisposeinterfaceA handle to the editor with an attached dispose function
- LexicalExtensioninterfaceAn Extension is a composable unit of LexicalEditor configuration (nodes, theme, etc) used to create an editor, plus runtime behavior that is registered after the editor is created. An Extension may depend on other Extensions, and provide functionality to other extensions through its config.
- LexicalExtensionDependencyinterfaceconfig, init, output
- ModularEditorHostApiinterfacecontext, editor, language, ui
- MouseEventinterfacealtKey, bubbles, button, buttons, cancelable, clientX, clientY, ctrlKey, currentTarget, defaultPrevented, detail, eventPhase, isTrusted, metaKey, movementX, movementY, nativeEvent, pageX, pageY, relatedTarget, screenX, screenY, shiftKey, target, timeStamp, type, view, getModifierState(), isDefaultPrevented(), isPropagationStopped(), persist(), preventDefault(), stopPropagation()
- NodeSchemaMetainterfaceWhat a nodeSchema carries: the properties a node declares, and a kind of its own. Not a member of SerializationSchemaMeta, because a node schema is never nested inside another schema.
- NodeSerializationSchemainterfacemeta
- NotebookCellinterfaceRepresents a cell of a notebook, either a code-cell or markup-cell. NotebookCell instances are immutable and are kept in sync for as long as they are part of their notebook.
- NotebookCellExecutionSummaryinterfaceThe summary of a notebook cell execution.
- NotebookDocumentinterfaceRepresents a notebook which itself is a sequence of code or markup cells.
- NotebookDocumentCellChangeinterfaceDescribes a change to a notebook cell.
- NotebookDocumentChangeEventinterfaceAn event describing a transactional notebook change.
- NotebookDocumentContentChangeinterfaceDescribes a structural change to a notebook document, e.g newly added and removed cells.
- NotebookDocumentContentOptionsinterfaceNotebook content options define what parts of a notebook are persisted.
- NotebookDocumentWillSaveEventinterfaceAn event that is fired when a notebook document will be saved. To make modifications to the document before it is being saved, call the waitUntil-function with a thenable that resolves to a workspace edit.
- NotebookSerializerinterfaceThe notebook serializer enables the editor to open notebook files. At its core the editor only knows a notebook data structure but not how that data structure is written to a file, nor how it is read from a file.
- NumberValueOptionsinterfaceDomain constraints for numberValue.
- OwnedStateinterfaceA writable handle to state your own mod declared. Returned by `ctx.state(declaration)` when you pass the value you built with state.
- OwnStaticNodeConfiginterfacedeclaresOwnConfig, klass, ownNodeConfig, ownNodeType
- ParsableSerializedEditorStateinterfaceA document as a structural subtree — what $parseSerializedNode accepts at every level — for a caller holding serialized nodes rather than a `SerializedEditorState`: `@lexical/clipboard`'s `BaseSerializedNode[]` from `$generateJSONFromSelectedNodes`, whose `version` is optional and whose interface carries no index signature, matched neither of the two forms above and could not be handed back to `parseEditorState` without a cast.
- RawTextVisitorinterfacePush-lexer visitor passed to tokenizeRawText.
- RefCountedRegistryinterfaceA registry mapping keys to a per-key activation, reference counted so the activation is created on the first registration for a key and torn down only when the last outstanding registration for that key is released.
- RefObjectinterfaceCreated by createRef, or useRef when passed `null`.
- SchemaAccessorsinterfaceThe node accessors a SerializationSchema field is applied through. A string resolves to a method on the node; `{field}` resolves to one of the node's own fields.
- SchemaFieldBaseinterfaceDeclares that a serialized property *is* a node field, read and written directly rather than through an accessor method.
- SchemaGetterFieldinterfaceA node field read directly on export.
- SchemaSetterFieldinterfaceA node field written directly on import.
- SerializationSchemainterfaceA `SerializationSchema` is a Parse (so it can be called directly to coerce a value and dropped straight into createState's `parse` option) that also carries its recoverable default and an introspectable meta description of its domain. Schemas are built with stringValue, numberValue, booleanValue, enumValue, nullable, and composed into whole-object schemas with objectValue — nodeSchema for a node's own, which is where accessors are named.
- SerializedEditorStateinterfaceroot
- SetDOMUnmanagedOptionsinterfaceOptions accepted by setDOMUnmanaged.
- ShadowRootNodeinterface__@ShadowRootNodeBrand@37374, $config(), afterCloneFrom(), append(), canBeEmpty(), canIndent(), canInsertTextAfter(), canInsertTextBefore(), canMergeWhenEmpty(), clear(), collapseAtStart(), config(), createDOM(), createParentElementNode(), excludeFromCopy(), exportDOM(), exportJSON(), extractWithChild(), getAllTextNodes(), getChildAtIndex(), getChildren(), getChildrenKeys(), getChildrenSize(), getDescendantByIndex(), getDirection(), getDOMSlot(), getFirstChild(), getFirstChildOrThrow(), getFirstDescendant(), getFormat(), getFormatFlags(), getFormatType(), getIndent(), getIndexWithinParent(), getKey(), getLastChild(), getLastChildOrThrow(), getLastDescendant(), getLatest(), getNextSibling(), getNextSiblings(), getNodesBetween(), getParent(), getParentKeys(), getParentOrThrow(), getParents(), getPreviousSibling(), getPreviousSiblings(), getStyle(), getTextContent(), getTextContentSize(), getTextFormat(), getTextStyle(), getTopLevelElement(), getTopLevelElementOrThrow(), getType(), getWritable(), hasFormat(), hasTextFormat(), insertAfter(), insertBefore(), insertNewAfter(), is(), isAttached(), isBefore(), isDirty(), isEmpty(), isInline(), isLastChild(), isParentOf(), isParentRequired(), isSelected(), isShadowRoot(), markDirty(), remove(), replace(), resetOnCopyNodeFrom(), select(), selectEnd(), selectNext(), selectPrevious(), selectStart(), setDirection(), setFormat(), setIndent(), setStyle(), setTextFormat(), setTextStyle(), splice(), updateDOM(), updateFromJSON()
- SiblingCaretinterfaceA SiblingCaret points from an origin LexicalNode towards its next or previous sibling.
- SlotChildNodeinterfaceA node that can occupy a named slot, implemented by ElementNode and DecoratorNode.
- SlotHostNodeinterfaceA node that can host named slots, implemented by ElementNode and DecoratorNode.
- SplitAtPointCaretNextOptionsinterface$copyElementNode, $shouldSplit, $splitTextPointCaretNext, removeEmptyDestination, rootMode
- StateinterfaceA read-only handle to one state value. Returned by `ctx.state('editor.selection')` and the other built-in state names.
- StateSnapshotinterfaceaccessScope, capturedAt, descriptor, id, kind, previous, revision, value
- StateValueConfiginterfaceConfigure a value to be used with StateConfig. The value type should be inferred from the definition of parse. If the value type is not JSON serializable, then unparse must also be provided. Values should be treated as immutable, much like React.useState.
- StaticNodeConfigValueinterfaceEXPERIMENTAL The configuration of a node returned by LexicalNode.$config()
- StepwiseIteratorConfiginterfacehasNext, initial, map, step
- TextDocumentinterfaceRepresents a text document, such as a source file.
- TextDocumentChangeEventinterfaceAn event describing a transactional document change.
- TextDocumentContentChangeEventinterfaceAn event describing an individual change in the text of a document.
- TextDocumentContentProviderinterfaceA text document content provider allows to add readonly documents to the editor, such as source from a dll or generated html from md. Content providers are workspace.registerTextDocumentContentProvider registered for a uri-scheme.
- TextDocumentWillSaveEventinterfaceAn event that is fired when a document will be saved. To make modifications to the document before it is being saved, call the waitUntil-function with a thenable that resolves to an array of text edits.
- TextLineinterfaceRepresents a line of text, such as a line of source code. TextLine objects are __immutable__.
- TextPointCaretinterfaceA TextPointCaret is a special case of a SiblingCaret that also carries an offset used for representing partially selected TextNode at the edges of a CaretRange. The direction determines which part of the text is adjacent to the caret, if next it's all of the text after offset.
- TextPointCaretSliceinterfaceA TextPointCaretSlice is a wrapper for a TextPointCaret that carries a signed distance representing the direction and amount of text selected from the given caret.
- ThenableinterfaceThenable is a common denominator between ES6 promises, Q, jquery.Deferred, WinJS.Promise, and others.
- UpdateListenerPayloadinterfaceThe payload passed to an UpdateListener
- WorkspaceApiinterfaceNamespace for dealing with the current workspace.
- WorkspaceConfigurationinterfaceRepresents the configuration.
- WorkspaceEditEntryMetadatainterfaceAdditional data for entries of a workspace edit.
- WorkspaceEditMetadatainterfaceAdditional data about a workspace edit.
- WorkspaceFolderinterfaceA workspace folder is one of potentially many roots opened by the editor.
- WorkspaceFoldersChangeEventinterfaceAn event describing a change to the set of workspace.workspaceFolders workspace folders.
Types152
- AnyLexicalCommandtypeLexicalCommand<any>
- AnyLexicalExtensiontypeAny concrete LexicalExtension
- AnyLexicalExtensionArgumenttypeAny LexicalExtension or NormalizedLexicalExtensionArgument
- AnyNormalizedLexicalExtensionArgumenttypeAny NormalizedLexicalExtensionArgument
- AnySerializationSchematypeA SerializationSchema for an unknown type, used where the type is not relevant.
- AnyStateConfigtypeFor advanced use cases, using this type is not recommended unless it is required (due to TypeScript's lack of features like higher-kinded types). A StateConfig type with any key and any value that can be used in situations where the key and value type can not be known, such as in a generic constraint when working with a collection of StateConfig. StateConfigKey and StateConfigValue will be useful when this is used as a generic constraint.
- BaseStaticNodeConfigtypeThis is the type of LexicalNode.$config() that can be overridden by subclasses. Concrete nodes are keyed by their string `type`.
- CaretDirectiontypeThe direction of a caret, 'next' points towards the end of the document and 'previous' points towards the beginning
- CaretTypetypeA sibling caret type points from a LexicalNode origin to its next or previous sibling, and a child caret type points from an ElementNode origin to its first or last child.
- CommandListenertype(payload: P, editor: LexicalEditor) => boolean
- CommandListenerPrioritytype0 | 1 | 2 | 3 | 4
- CommandListenerPriorityBeforetypetypeof COMMAND_PRIORITY_BEFORE_CRITICAL | typeof COMMAND_PRIORITY_BEFORE_EDITOR | typeof COMMAND_PRIORITY_BEFORE_HIGH | typeof COMMAND_PRIORITY_BEFORE_LOW | typeof COMMAND_PRIORITY_BEFORE_NORMAL
- CommandPayloadArgstype[ TPayload extends undefined ? true : never ] extends [never] ? [payload: TPayload] : [payload?: TPayload]
- CommandPayloadTypetypeType helper for extracting the payload type from a command.
- CommonAncestorResulttypeThe result of comparing two nodes that share some common ancestor
- ConfigurationScopetypeThe configuration scope which can be: - a Uri representing a resource - a TextDocument representing an open text document - a WorkspaceFolder representing a workspace folder - an object containing: - `uri`: an optional Uri of a text document - `languageId`: the language identifier of a text document
- ConfigurationTargettypeThe configuration target
- DispatchtypeA function that can be used to update the state of a useState or useReducer hook.
- Disposabletypetypes.Disposable
- DOMChildConversiontype(lexicalNode: LexicalNode, parentLexicalNode: LexicalNode | null | undefined) => LexicalNode | null | undefined
- DOMConversiontype{ conversion: DOMConversionFn<T>; priority?: 0 | 1 | 2 | 3 | 4; }
- DOMConversionFntype(element: T) => DOMConversionOutput | null
- DOMConversionMaptypeRecord<NodeName, DOMConversionProp<T>>
- DOMConversionOutputtype{ after?: (childLexicalNodes: LexicalNode[]) => LexicalNode[]; forChild?: DOMChildConversion; node: null | LexicalNode | LexicalNode[]; }
- DOMConversionProptype(node: T) => DOMConversion<T> | null
- DOMConversionPropByTagNametypeDOMConversionProp<K extends keyof HTMLElementTagNameMap ? HTMLElementTagNameMap[K] : HTMLElement>
- DOMConversionTagNameMaptype{ [NodeName in K]?: DOMConversionPropByTagName<NodeName>; }
- DOMExportOutputMaptypeMap<Klass<LexicalNode>, (editor: LexicalEditor, target: LexicalNode) => DOMExportOutput>
- DOMSlotForNodetypeN extends ElementNode ? ElementDOMSlot<HTMLElement> : DOMSlot<HTMLElement>
- EditableListenertypeA listener that is called when LexicalEditor.setEditable changes the editable state of the editor.
- EditorExternalFrameDeniedReasontype'empty-src' | 'invalid-src' | 'unsupported-scheme' | 'untrusted-domain'
- EditorExternalFrameTrustResulttypeEditorExternalFrameAllowedResult | EditorExternalFrameDeniedResult
- EditorHostUiCapabilitytypeExtensionWidgetCapability
- EditorReadModetypeControls which editor state LexicalEditor.read observes and whether pending updates are flushed before the read. - `'force-commit'` (the default) flushes any pending updates immediately before the read, so it always observes a fully committed and reconciled state. - `'pending'` reads the pending state if it exists, otherwise the committed state, without flushing.
- EditorSetOptionstype{ tag?: string; }
- EditorThemeClassNametypestring
- EditorUpdateOptionstype{ /** * A function to run once the update is complete. See also {@link $onUpdate}. */ onUpdate?: () => void; /** * Setting this to true will suppress all node * transforms for this update cycle. * Useful for synchronizing updates in some cases. */ skipTransforms?: true; /** * A tag to identify this update, in an update listener, for instance. * See also {@link $addUpdateTag}. */ tag?: UpdateTag | UpdateTag[]; /** * If true, prevents this update from being batched, forcing it to * run synchronously. */ discrete?: true; /** @internal */ event?: undefined | UIEvent | Event | null; }
- ElementFormatTypetype'left' | 'start' | 'center' | 'right' | 'end' | 'justify' | ''
- ElementPointtype{ _selection: BaseSelection; getNode: () => ElementNode; is: (point: PointType) => boolean; isBefore: (point: PointType) => boolean; key: NodeKey; offset: number; set: (key: NodeKey, offset: number, type: 'text' | 'element', onlyIfChanged?: boolean) => void; type: 'element'; }
- EndOfLinetypetypes.EndOfLine
- EventEmittertypetypes.EventEmitter<T>
- EventHandlertype(event: Event, editor: LexicalEditor) => void
- EventListenerMaptypeA map of event type to listener for a given EventTarget.
- ExtensionConfigBasetypeThe default extension configuration of an empty object
- ExtensionElementChildComponenttypeComponentType<ExtensionElementChildProps>
- ExtensionElementChildrenComponenttypeComponentType
- ExtensionLanguageCellLanguageIdtype'studio-writing' | 'studio-code' | 'mermaid'
- ExtensionLanguageSelectortype{ readonly kind: 'all'; } | { readonly kind: 'language'; readonly languageId: ExtensionLanguageCellLanguageId; } | { readonly kind: 'block-type'; readonly blockType: string; }
- ExtensionNodeRenderertypeComponentType<ExtensionNodeRenderProps>
- ExtensionWidgetRenderertype() => ReactNode
- FileChangeTypetypetypes.FileChangeType
- FilePermissiontypetypes.FilePermission
- FileSystemErrortypetypes.FileSystemError
- FileTypetypetypes.FileType
- FlipDirectiontypeA type utility to flip next and previous
- GlobPatterntypeA file glob pattern to match file paths against.
- HTMLConfigtype{ export?: DOMExportOutputMap; import?: DOMConversionMap; }
- IconPathtypeRepresents an icon in the UI.
- InitialEditorStateTypetypeAll of the possible ways to initialize $initialEditorState: - `null` an empty state, the default - `string` an EditorState serialized to JSON - `EditorState` an EditorState that has been deserialized already (not just parsed JSON) - `((editor: LexicalEditor) => void)` A function that is called with the editor for you to mutate it
- InnerSerializationSchematypeA SerializationSchema that names no accessor: what every combinator takes (see withAccessors), and what every `inner`, `item` and `members` in a schema's meta is, so a schema reached through those can be wrapped again as it is.
- InnerSerializationSchemaFieldstypeThe record objectValue takes: fields that name no accessor, since an object's field is not a node's property (see withAccessors).
- KeyboardEventModifierMasktypeA record of keyboard modifiers that must be enabled. If the value is `'any'` then the modifier key's state is ignored. If the value is `true` then the modifier key must be pressed. If the value is `false` or the property is omitted then the modifier key must not be pressed.
- KeyboardEventModifierstypeA KeyboardEvent or structurally similar object with a string `key` as well as `altKey`, `ctrlKey`, `metaKey`, and `shiftKey` boolean properties.
- KlasstypeInstanceType<T['constructor']> extends T ? T['constructor'] : GenericConstructor<T> & T['constructor']
- KlassConstructortypeGenericConstructor<InstanceType<Cls>> & { [k in keyof Cls]: Cls[k]; }
- LexicalExportJSONtypePrettify<Omit<LexicalFullExportJSON<T>, 'type' | 'version'> & { type: GetStaticNodeType<T>; /** * Written by `exportJSON()` so the output remains readable by older * versions. Required, like {@link SerializedLexicalNode.version}: this is * the legacy form, which writes it unconditionally. `exportJSON(true)` * returns the {@link SerializedPartial} of this, where it is optional * along with everything else parsing restores on its own. */ version: number; } & NodeStateJSON<T>>
- LexicalExtensionArgumenttypeA LexicalExtension or NormalizedLexicalExtensionArgument (extension with config overrides)
- LexicalExtensionConfigtypeExtract the Config type from an Extension
- LexicalExtensionInittypeExtract the Init type from an Extension
- LexicalExtensionNametypeExtract the Name type from an Extension
- LexicalExtensionOutputtypeExtract the Output type from an Extension
- LexicalNodeConfigtypeA LexicalNode class or LexicalNodeReplacement configuration
- LexicalNodeReplacementtypeConfiguration entry passed in CreateEditorArgs.nodes to substitute a core node class with a custom subclass.
- LexicalParseJSONtypeThe shape LexicalNode.updateFromJSON accepts for a node whose serialized type is `S`, as a schema-driven parser faces it: every node-specific property optional (a compact export omits a default-valued one, and an older document predates a newer one) and `unknown`, with `type`, `version` and `children` dropped. `unknown`, because this is the untrusted-JSON boundary and a parser here is *total*: it validates every property against the schema's domain and substitutes a default for anything outside it.
- LexicalSchemaInputtypeEvery serialized property `T` accepts, composed across its `$config` chain — its own and the ones it inherits. The *accepted* input rather than the parsed output, which is wider wherever a schema reads more than it writes: a legacy alias, a number spelled as a string, an absent property.
- LexicalUpdateJSONtypeOmit the children, type, and version properties from the given SerializedLexicalNode definition. This is the shape a hand-written `updateFromJSON` override reads: each property keeps its declared type.
- MarkdownStringtypetypes.MarkdownString
- MemberOftypeEvery member of `N` a schema may name: its own fields (`__`-prefixed by convention, which is what makes them distinguishable) and its methods, which covers accessors and `when` predicates alike. This is what `$config` checks a node's schema against, so a `field`, `getter`, `setter` or `when` naming something the node does not have is a compile error at the declaration rather than a property that silently stops round-tripping.
- MutationListenertype(nodes: Map<NodeKey, NodeMutation>, payload: { updateTags: Set<string>; dirtyLeaves: Set<string>; prevEditorState: EditorState; }) => void
- NamesOftypeThe members a schema's declarations name; see MemberOf.
- NodeCarettypeA NodeCaret is the combination of an origin node and a direction that points towards where a connected node will be fetched, inserted, or replaced.
- NodeKeytypestring
- NodeMaptypeMap<NodeKey, LexicalNode>
- NodeMutationtype'created' | 'updated' | 'destroyed'
- NodeStateJSONtypeThe NodeState JSON produced by this LexicalNode
- NodeStateVersiontypetypeof NODE_STATE_DIRECT | typeof NODE_STATE_LATEST
- NormalizedLexicalExtensionArgumenttypeA tuple of `[extension, ...configOverrides]`
- NormalizedPeerDependencytypeThe result of declarePeerDependency, a tuple of a peer dependency name and its associated configuration.
- NotebookCellDatatypetypes.NotebookCellData
- NotebookCellKindtypetypes.NotebookCellKind
- NotebookCellOutputtypetypes.NotebookCellOutput
- NotebookCellOutputItemtypetypes.NotebookCellOutputItem
- NotebookDatatypetypes.NotebookData
- NotebookEdittypetypes.NotebookEdit
- NotebookRangetypetypes.NotebookRange
- OutputComponentExtensiontypeAn Extension that has an OutputComponent of the given type (e.g.
- OutputExtensiontypeAn Extension that has an Output of the given type
- ParsableSerializedNodetypeThe least a value has to be for $parseSerializedNode to read it: a `type` to look the class up by, and subtrees of the same shape. A type alias rather than an `interface`, which is what lets it stand in for the internal shape the parse walks: TypeScript gives an alias an implicit index signature and an interface none, and the walk's own parameter carries one.
- ParsetypeA function that validates an untrusted `value` (such as a property parsed from JSON) and coerces it into the expected type `T`, returning a default value when `value` is not in the expected domain. By convention — and exactly like the `parse` of StateValueConfig — calling a `Parse` with `undefined` returns its default value.
- PasteCommandTypetypeClipboardEvent | InputEvent | KeyboardEvent
- PointCarettypeA PointCaret is a NodeCaret that also includes a TextPointCaret type which refers to a specific offset of a TextNode. This type is separate because it is not relevant to general node traversal so it doesn't make sense to have it show up except when defining a CaretRange and in those cases there will be at most two of them only at the boundaries. The addition of TextPointCaret allows this type to represent any location that is representable by PointType, as the TextPointCaret refers to a specific offset within a TextNode.
- PointTypetypeTextPointType | ElementPointType
- Positiontypetypes.Position
- PropsWithChildrentypeP & { children?: ReactNode | undefined }
- ProviderResulttypeA provider result represents the values a provider, like the HoverProvider, may return.
- Rangetypetypes.Range
- RelativePatterntypetypes.RelativePattern
- RootListenertypeA listener that is called when LexicalEditor.setRootElement changes the element that the editor is attached to.
- RootModetypeThe RootMode is specified in all caret traversals where the traversal can go up towards the root.
- SchemaAccessortypeOne direction of a SerializationSchema field: a method name, a SchemaField naming a node field, or `null` for a direction that is deliberately unsupported.
- SchemaFieldtypeA node field in whichever direction it was declared for.
- SchemaGetterAccessortypeHow the export direction reaches a property.
- SchemaInputtypeThe serialized values a schema accepts; see SerializationSchema and its `In` parameter.
- SchemaSetterAccessortypeHow the import direction reaches a property.
- SerializationSchemaFieldstypeA record of named SerializationSchemas: what an object schema's meta holds in `fields`.
- SerializationSchemaMetatypeA structural, introspectable description of a SerializationSchema.
- SerializationSchemaShapetypeMaps an object type `T` to the record of per-property SerializationSchemas. The input domain is left open.
- SerializationSchemaValuetypeThe value type a SerializationSchema parses to.
- SerializedEditortype{ /** * Typed as the compact shape because {@link LexicalEditor.toJSON} writes * whichever form encloses it: a nested editor serialized inside a compact * document is compact too, so promising the full shape here would promise * properties that are not there. Both forms satisfy this, and both parse. */ editorState: CompactSerializedEditorState; }
- SerializedElementNodetypeNo type parameter for the children: a node cannot declare what kind of children it accepts, so any node may appear under any element and `SerializedLexicalNode` is the only type this can honestly give them.
- SerializedLexicalNodetypeThe base type for all serialized nodes
- SerializedLineBreakNodetypeSerializedLexicalNode
- SerializedParagraphNodetypeSpread<{ textFormat: number; textStyle: string; }, SerializedElementNode>
- SerializedPartialtypeThe serialized form of a node as accepted by the parsing methods (LexicalNode.importJSON and LexicalNode.updateFromJSON). Only `type` identifies the node here: every node-specific property is made optional via `Partial`.
- SerializedPartialNodetypeA node of a compact document read without knowing its type, which is every child: a node cannot declare what kind of children it accepts, so any node may appear under any element and there is no type to name their properties from.
- SerializedRootNodetypeSerializedElementNode
- SerializedTabNodetypeSerializedTextNode
- SerializedTextNodetypeSpread<{ detail: number; format: number; mode: TextModeType; style: string; text: string; }, SerializedLexicalNode>
- SetStateActiontypeThe instruction passed to a Dispatch function in useState to tell React what the next value of the useState should be. Often found wrapped in Dispatch.
- SlotNametypeSlot-name hint for a host node's slot accessors: the names declared in the host class's `$config().slots` (for editor autocomplete) unioned with `string` — every string is still accepted (slots take undeclared names at runtime), the declared names just surface as suggestions.
- SnippetStringtypetypes.SnippetString
- SnippetTextEdittypetypes.SnippetTextEdit
- SpreadtypeOmit<T2, keyof T1> & T1
- StateConfigKeytypeGet the key type (K) from a StateConfig
- StateConfigValuetypeGet the value type (V) from a StateConfig
- StateValueOrUpdatertypeA type alias to make it easier to define setter methods on your node class
- StaticNodeConfigtypeUsed to extract the node and type from a StaticNodeConfigRecord
- TextDocumentChangeReasontypetypes.TextDocumentChangeReason
- TextDocumentSaveReasontypeRepresents reasons why a text document is saved.
- TextEdittypetypes.TextEdit
- TextFormatTypetype'bold' | 'underline' | 'strikethrough' | 'italic' | 'highlight' | 'code' | 'subscript' | 'superscript' | 'lowercase' | 'uppercase' | 'capitalize'
- TextModeTypetype'normal' | 'token' | 'segmented'
- TextPointtype{ _selection: BaseSelection; getNode: () => TextNode; is: (point: PointType) => boolean; isBefore: (point: PointType) => boolean; key: NodeKey; offset: number; set: (key: NodeKey, offset: number, type: 'text' | 'element', onlyIfChanged?: boolean) => void; type: 'text'; }
- TextPointCaretSliceTupletypeA utility type to specify that a CaretRange may have zero, one, or two associated TextPointCaretSlice.
- ThemeColortypetypes.ThemeColor
- ThemeIcontypetypes.ThemeIcon
- Transformtype(node: T) => void
- UpdateListenertypeA listener that gets called after the editor is updated
- UpdateTagtypeThe set of known update tags to help with TypeScript suggestions.
- Uritypetypes.Uri
- ValueOrUpdatertypeA value type, or an updater for that value type.
- WorkspaceEdittypetypes.WorkspaceEdit
Functions224
- $addUpdateTagfunctionAdds a tag to the current update, which can be read by update listeners and $hasUpdateTag.
- $applyNodeReplacementfunctionApplies any registered node replacement for the given node's type, returning the replacement node or the original if none is registered.
- $caretFromPointfunction<D extends CaretDirection>(point: Pick<PointType, 'type' | 'key' | 'offset'>, direction: D) => PointCaret<D>
- $caretRangeFromSelectionfunctionGet a pair of carets for a RangeSelection. If the focus is before the anchor, then the direction will be 'previous', otherwise the direction will be 'next'.
- $cloneWithPropertiesfunctionReturns a clone of a node using `node.constructor.clone()` followed by `clone.afterCloneFrom(node)`.
- $cloneWithPropertiesEphemeralfunctionReturns a clone with $cloneWithProperties and then "detaches" it from the state by overriding its getLatest and getWritable to always return this.
- $comparePointCaretNextfunctionA total ordering for `PointCaret<'next'>`, based on the same order that a CaretRange would iterate them. For a given origin node: - ChildCaret comes before SiblingCaret - TextPointCaret comes before SiblingCaret An exception is thrown when a and b do not have any common ancestor. This ordering is a sort of mix of pre-order and post-order because each ElementNode will show up as a ChildCaret on 'enter' (pre-order) and a SiblingCaret on 'leave' (post-order).
- $copyNodefunctionReturns a shallow clone of node with a new key.
- $createfunctionCreate an node from its class. This directly constructs the final `withKlass` node type, skipping the intermediate steps where each replaced node would be created and then immediately discarded — once per configured replacement of that node. A deprecated `replace` given without a `withKlass` is the one case that cannot be resolved ahead of construction, since only its `with` function knows what to build.
- $createChildrenArrayfunctionBuilds an ordered array of child node keys for the given ElementNode by walking its linked-list pointers.
- $createLineBreakNodefunctionCreates a LineBreakNode representing a soft line break (Shift+Enter).
- $createNodeSelectionfunctionCreates an empty NodeSelection with no selected node keys.
- $createParagraphNodefunctionCreates a ParagraphNode, the default block-level container for text.
- $createPointfunctionCreates a selection endpoint (Point) targeting the given node key at the specified offset.
- $createRangeSelectionfunctionCreates a detached RangeSelection anchored at the root element origin (offset 0).
- $createRangeSelectionFromDomfunctionCreates a RangeSelection from the given DOM selection, or returns null if one cannot be resolved.
- $createTabNodefunctionCreates a TabNode representing a horizontal tab character.
- $createTextNodefunctionCreates a TextNode initialized with the given text, defaulting to empty.
- $exportNodeJSONfunctionExport one node's JSON in the form the active export asks for, with the sanity checks every export walk relies on: the serialized `type` must match the class, and an element must carry a `children` array for the walk to fill. Use this instead of calling `node.exportJSON()` directly when writing a serialization walk of your own — it is what `editorState.toJSON()` and the `@lexical/clipboard` selection export both call, so $withCompactExport governs every one of them alike. Which form that is decides the shape, so the return type is the SerializedPartial — the one both forms satisfy.
- $extendCaretToRangefunctionConstruct a CaretRange that starts at anchor and goes to the end of the document in the anchor caret's direction.
- $flushSyncAfterUpdatefunctionEquivalent to setting `{discrete: true}` on the containing `editor.update`, generally used to ensure that the DOM is updated before returning from an event listener where the browser is expected to natively finish handling the event.
- $formatTextfunctionApplies the provided format to TextNodes and inline formattable nodes (e.g.
- $generateHtmlFromNodesfunctionGenerate an HTML string from the editor's current state (or `selection` if provided). Must be called inside an active editor scope — i.e.
- $generateNodesFromDOMfunctionHow you parse your html string to get a document is left up to you.
- $generateNodesFromRawTextfunctionConvert a raw text string into a flat array of `TextNode`, `LineBreakNode`, and `TabNode` siblings, splitting on `\n`, `\r\n`, and `\t`.
- $getAdjacentChildCaretfunctionGets the adjacent caret, if not-null and if the origin of the adjacent caret is an ElementNode, then return the ChildCaret.
- $getAdjacentNodefunctionReturns the node adjacent to the given selection point in the specified direction, or null if at a boundary.
- $getAdjacentSiblingOrParentSiblingCaretfunctionReturns the Node sibling when this exists, otherwise the closest parent sibling.
- $getCaretInDirectionfunctionReturn the caret if it's in the given direction, otherwise return caret.getFlipped().
- $getCaretRangefunctionConstruct a CaretRange from anchor and focus carets pointing in the same direction.
- $getCaretRangeInDirectionfunctionReturn the range if it's in the given direction, otherwise construct a new range using a flipped focus as the anchor and a flipped anchor as the focus.
- $getCharacterOffsetsfunctionReturns the character offsets of the selection's anchor and focus points as an [anchor, focus] tuple.
- $getChildCaretfunctionGet a caret that points at the first or last child of the given origin node, which must be an ElementNode.
- $getChildCaretAtIndexfunctionGet a caret pointing at the child at the given index, or the last caret in that node if out of bounds.
- $getChildCaretOrSelffunctionGets the ChildCaret if one is possible at this caret origin, otherwise return the caret
- $getCollapsedCaretRangefunctionConstruct a collapsed CaretRange that starts and ends at anchor.
- $getCommonAncestorfunctionFind a common ancestor of a and b and return a detailed result object, or null if there is no common ancestor between the two nodes. The result object will have a commonAncestor property, and the other properties can be used to quickly compare these positions in the tree.
- $getCommonAncestorResultBranchOrderfunctionReturn the ordering of siblings in a CommonAncestorResultBranch
- $getDocumentfunctionReturns the Document that owns the active editor's root element. Falls back to `globalThis.document` when there is no active editor (e.g. a node method such as `createDOM` / `exportDOM` is invoked headlessly, outside of `editor.update()` / `editor.read()`), or when the active editor has no root element (e.g.
- $getDOMSlotfunction<N extends LexicalNode>(node: N, dom: HTMLElement, editor?: LexicalEditor) => DOMSlotForNode<N>
- $getDOMTextNodefunction(node: TextNode, dom: HTMLElement, editor?: LexicalEditor) => Text | null
- $getEditorfunctionUtility function for accessing current active editor instance.
- $getEditorDOMRenderConfigfunction(editor?: LexicalEditor) => EditorDOMRenderConfig
- $getNearestNodeFromDOMNodefunctionReturns the nearest LexicalNode by walking up the DOM tree from the given node, or null if no Lexical node is found.
- $getNearestNodeOfTypefunctionTakes a node and traverses up its ancestors (toward the root node) in order to find a specific type of node.
- $getNearestRootOrShadowRootfunctionReturns the given node itself (if it is a slot boundary) or its nearest ancestor that is a RootNode, ShadowRootNode, or slot boundary.
- $getNodeByKeyfunctionReturns the node with the given key from the active EditorState (or the given EditorState), or null if it does not exist.
- $getNodeByKeyOrThrowfunctionReturns the node with the given key from the active EditorState, or throws if it does not exist.
- $getNodeFromDOMNodefunctionReturns the LexicalNode directly associated with the given DOM node, or null if the DOM node has no Lexical key.
- $getPreviousSelectionfunctionReturns the selection from the previous editor state, or null if none existed.
- $getRootfunctionReturns the RootNode of the active EditorState.
- $getSelectionfunctionReturns the current selection of the active editor state, or null if none exists.
- $getSelectionSlotFramefunctionReturns the slot frame that `selection` lives in, or null when it is outside any slot (or there is no selection).
- $getSiblingCaretfunctionGet a caret that points at the next or previous sibling of the given origin node.
- $getSlotfunctionReturns the node occupying the named slot, or null if the slot is empty. Slots are a shadow-root-isolated channel kept separate from children; see $getSlotHost for the reverse up-link.
- $getSlotFramefunctionReturns the slot value (the "slot frame") whose isolated subtree contains `node`, or `node` itself when it is a slot value, or null when the node is not inside any slot.
- $getSlotHostfunctionReturns the host element when this node occupies one of its named slots, or null if this node is not slotted.
- $getSlotNamesfunctionReturns the names of this node's occupied slots, in insertion order.
- $getSlotNameWithinHostfunctionReturns the slot name this node occupies on its host, or null when the node is not a slot value.
- $getStatefunctionThe accessor for working with node state.
- $getStateChangefunctionGiven two versions of a node and a stateConfig, compare their state values using `$getState(nodeVersion, stateConfig, NODE_STATE_DIRECT)`. If the values are equal according to `stateConfig.isEqual`, return `null`, otherwise return `[value, prevValue]`. This is useful for implementing updateDOM.
- $getTextContentfunctionReturns the text content of the current selection, or an empty string if no selection exists.
- $getTextNodeOffsetfunctionGet a normalized offset into a TextNode given a numeric offset or a direction for which end of the string to use.
- $getTextPointCaretfunctionConstruct a TextPointCaret
- $getTextPointCaretSlicefunctionConstruct a TextPointCaretSlice given a TextPointCaret and a signed distance.
- $hasAncestorfunctionReturns true if targetNode is an ancestor of child by walking up the parent chain.
- $hasUpdateTagfunctionReturns true if the given tag has been added to the current update via $addUpdateTag.
- $insertNodesfunctionInserts nodes into the current selection, falling back to the previous selection or the end of the root.
- $insertNodeToNearestRootAtCaretfunctionIf the insertion caret is the root/shadow root node (see $isRootOrShadowRoot), the node will be inserted there, otherwise the parent nodes will be split according to the given options.
- $isBlockElementNodefunctionReturns true if the given node is a non-inline ElementNode.
- $isBlockFullySelectedfunctionChecks whether the selection covers the entire block: the selection's start point is at or before the first position inside blockNode and its end point is at or after the last position inside blockNode.
- $isChildCaretfunctionGuard to check if the given argument is specifically a ChildCaret
- $isCompactExportfunctionWhether the export walk in progress is writing the compact form. For the one thing that cannot be told: a schema getter.
- $isDecoratorNodefunctionReturns true if the given node is a DecoratorNode.
- $isEditorStatefunctionType guard that returns true if the argument is an EditorState
- $isElementDOMSlotfunction(slot: DOMSlot<HTMLElement>) => slot is ElementDOMSlot<HTMLElement>
- $isElementNodefunctionReturns true if the given node is an ElementNode.
- $isExtendableTextPointCaretfunctionDetermine whether the TextPointCaret's offset can be extended further without leaving the TextNode. Returns false if the given caret is not a TextPointCaret or the offset can not be moved further in direction.
- $isInlineElementOrDecoratorNodefunctionReturns true if the given node is an inline ElementNode or an inline DecoratorNode.
- $isInlineFormattablefunctionReturns true if the given node supports inline text formatting.
- $isLeafNodefunctionReturns true if the given node is a leaf (TextNode, LineBreakNode, or DecoratorNode).
- $isLexicalNodefunctionReturns true if the given value is a LexicalNode instance.
- $isLineBreakNodefunctionReturns true if the given node is a LineBreakNode.
- $isNodeCaretfunctionGuard to check if the given argument is any type of caret
- $isNodeSelectionfunctionReturns true if the given value is a NodeSelection.
- $isParagraphNodefunctionReturns true if the given node is a ParagraphNode.
- $isRangeSelectionfunctionReturns true if the given value is a RangeSelection.
- $isRootNodefunctionReturns true if the given node is a RootNode.
- $isRootOrShadowRootfunctionReturns true if the given node is a RootNode or a ShadowRootNode.
- $isSelectionCapturedInDecoratorInputfunctionReturns true if the active element (resolved from the anchor's root) is a decorator's own input (e.g.
- $isShadowRootNodefunctionReturns true if the given node is an ElementNode whose isShadowRoot() returns true.
- $isSiblingCaretfunctionGuard to check if the given argument is specifically a SiblingCaret (or TextPointCaret)
- $isSlotChildfunctionShape predicate: true when `node` carries the child's `__slotHost` field — i.e.
- $isSlotHostfunctionShape predicate: true when `node` carries the host's `__slots` field — i.e. it is an ElementNode or a DecoratorNode.
- $isTabNodefunctionReturns true if the given node is a TabNode.
- $isTextNodefunctionReturns true if the given node is a TextNode.
- $isTextPointCaretfunctionGuard to check if the given caret is specifically a TextPointCaret
- $isTextPointCaretSlicefunctionGuard to check for a TextPointCaretSlice
- $isTokenOrSegmentedfunctionReturn true if the TextNode is a TabNode, or is in token or segmented mode.
- $isTokenOrTabfunctionReturn true if the TextNode is a TabNode or is in token mode.
- $markSlotEditablefunctionMark a DOM element as a named-slot editable island: set its `contentEditable` to follow the editor's editable state.
- $needsBlockCursorBesidefunctionReturns true if the given node needs a block cursor given an adjacent selection, the node must be non-inline and one of: - DecoratorNode - ShadowRootNode with a parent that is not also a ShadowRootNode - An ElementNode that can't be empty
- $nodesOfTypefunctionReturns all nodes of the given type in the active editor state. Consider LexicalEditor.registerMutationListener with `skipInitialization: false` instead if you need to track these nodes over time rather than read them once.
- $normalizeCaretfunctionNormalize a caret to the deepest equivalent PointCaret. This will return a TextPointCaret with the offset set according to the direction if given a caret with a TextNode origin or a caret with an ElementNode origin with the deepest ChildCaret having an adjacent TextNode. If given a TextPointCaret, it will be returned, as no normalization is required when an offset is already present.
- $normalizeSelection__EXPERIMENTALfunctionDescends element-type anchor and focus points of a RangeSelection toward the deepest text-type points, stopping at non-element leaf nodes.
- $onUpdatefunctionAdd a function to run after the current update.
- $parseSerializedNodefunctionDeserializes a SerializedLexicalNode JSON object into its corresponding LexicalNode instance.
- $removeSlotfunctionRemoves the named slot from `host`, detaching its value (its slot up-link is cleared).
- $removeTextFromCaretRangefunctionRemove all text and nodes in the given range.
- $rewindSiblingCaretfunctionGiven a SiblingCaret we can always compute a caret that points to the origin of that caret in the same direction.
- $selectAllfunctionSelects all content within the root.
- $setCompositionKeyfunctionSets the active composition key, marking the previous and new composition nodes as dirty for re-rendering.
- $setDirectionFromDOMfunctionReads the `dir` attribute from a DOM element and applies it to the given ElementNode via ElementNode.setDirection when it is a valid direction value (`'ltr'` or `'rtl'`).
- $setFormatFromDOMfunctionReads the `style` and CSS `textAlign` property from a DOM element and set format to the given ElementNode via ElementNode.setFormat when it is a valid alignment value ElementFormatType Other values, including missing or empty, leave the node unchanged. Useful inside `importDOM` converters to preserve explicit alignment from imported HTML.
- $setPointFromCaretfunctionUpdate the given point in-place from the PointCaret
- $setSelectionfunctionSets the current selection in the active EditorState, marking it dirty and clamping to slot boundaries when applicable.
- $setSelectionFromCaretRangefunctionSet a RangeSelection on the editor from the given CaretRange
- $setSlotfunctionPlaces `node` into the named slot of `host`, replacing any existing value under that name.
- $setStatefunctionSet the state defined by stateConfig on node.
- $setTextFormatfunctionExplicitly sets or unsets text formats on the selection.
- $splitAtPointCaretNextfunctionSplit a node at a PointCaret and return a NodeCaret at that point, or null if the node can't be split.
- $splitNodefunctionSplits an ElementNode at the given child offset, returning [original, newCopy].
- $updateRangeSelectionFromCaretRangefunctionUpdate the points of a RangeSelection based on the given PointCaret.
- $withCompactExportfunctionRun `f` writing the compact form of the document (or, with `false`, the legacy form), for any export it performs: the `@lexical/clipboard` selection export, a serialization walk of your own, and the nested editors those serialize.
- addClassNamesToElementfunctionTakes an HTML element and adds the classNames passed within an array, ignoring any non-string types.
- aliasedValuefunctionCombinator for a value that older documents may spell as one of a fixed set of names — TextNode's `format: 'bold'` for the numeric bit it stands for. A string matching one of `aliases` yields the value it names; anything else is `inner`'s to validate, so the domain, the default and the equality all stay `inner`'s and only the accepted *input* is wider. This is transformValue narrowed to the case where the normalization is a lookup, and the reason to prefer it is that the lookup is data: it goes into the schema's meta, where a tool can see it.
- arrayValuefunctionBuild a SerializationSchema for an array whose entries are each coerced by `item`. A non-array value (including `undefined`) yields the empty array, which is the recoverable default.
- batchfunctionCombine multiple value updates into one "commit" at the end of the provided callback. Batches can be nested and changes are only flushed once the outermost batch callback completes. Accessing a signal that has been modified within a batch will reflect its updated value.
- booleanValuefunctionBuild a SerializationSchema that returns `value` when it is a `boolean`, otherwise returns `defaultValue` (`false` by default).
- buildImportMapfunctionAn identity function that will infer the type of DOM nodes based on tag names to make it easier to construct a DOMConversionMap.
- computedfunctionCreate a new signal that is computed based on the values of other signals. The returned computed signal is read-only, and its value is automatically updated when any signals accessed from within the callback function change.
- configExtensionfunctionOverride a partial of the configuration of an Extension, to be used in the dependencies array of another extension, or as an argument to buildEditorFromExtensions. Before building the editor, configurations will be merged using `extension.mergeConfig(extension, config)` or shallowMergeConfig if this is not directly implemented by the Extension.
- createCommandfunctionCrete a command that can be used with `editor.dispatchCommand` and `editor.registerCommand`.
- createContextfunctionLets you create a Context that components can provide or read.
- createEditorfunctionCreates a new LexicalEditor attached to a single contentEditable (provided in the config).
- createRefCountedRegistryfunctionCreates a RefCountedRegistry.
- createStatefunctionCreate a StateConfig for the given string key and StateValueConfig. The key must be locally unique.
- declarePeerDependencyfunctionUsed to declare a peer dependency of an extension in a type-safe way, requires the type parameter.
- defineExtensionfunctionDefine a LexicalExtension from the given object literal.
- enumValuefunctionBuild a SerializationSchema for a fixed set of allowed `values` (an enumeration or a union of literals such as the `mode` of a TextNode).
- flipDirectionfunctionFlip a direction ('next' -> 'previous'; 'previous' -> 'next'). Note that TypeScript can't prove that FlipDirection is its own inverse (but if you have a concrete 'next' or 'previous' it will simplify accordingly).
- forwardReffunctionLets your component expose a DOM node to a parent component using a ref.
- getActiveElementfunctionReturns the focused element within the same Document or ShadowRoot as `node`, using the standard `DocumentOrShadowRoot.activeElement`. Unlike `document.activeElement` — which is retargeted to the outermost shadow host when focus is inside a shadow tree — this returns the focused element within `node`'s own tree (e.g.
- getActiveElementDeepfunctionDescends from `root.activeElement` through nested open ShadowRoots to the deepest focused element.
- getComposedEventTargetfunctionReturns the un-retargeted event target — the real element the user interacted with — for events observed by a listener above an enclosing DOM shadow root.
- getComposedStaticRangefunctionResolves a DOM Selection's range through any DOM ShadowRoots enclosing `rootElement`, using the standard Selection.getComposedRanges (https://developer.mozilla.org/docs/Web/API/Selection/getComposedRanges) platform API. When a selection is inside a shadow tree the browser retargets `Selection.getRangeAt`/`anchorNode`/`focusNode` to the shadow host, which hides the real nodes Lexical needs to resolve.
- getDeclaredSlotsfunctionReturns the canonical slot declaration for a node class: the `slots` array from the nearest StaticNodeConfigValue in its prototype chain (a subclass redeclaration overrides its ancestors'), or an empty array when nothing is declared.
- getDOMOwnerDocumentfunctionReturns the owner Document of the given EventTarget, or the target itself if it is a Document.
- getDOMSelectionfunctionReturns the selection for the given window, or the global window if null. Will return null if CAN_USE_DOM is false.
- getDOMSelectionFromTargetfunctionReturns the selection for the defaultView of the ownerDocument of given EventTarget.
- getDOMSelectionPointsfunctionResolves a DOM Selection's anchor/focus boundary points through any DOM ShadowRoots enclosing `rootElement`.
- getDOMSelectionRangefunctionReturns a live DOM Range for the Selection, resolved through any DOM ShadowRoots enclosing `rootElement`.
- getDOMSelectionRangeAndPointsfunctionResolves the live DOM Range (for layout reads like `getBoundingClientRect`) and the anchor/focus boundary points in one pass, sharing a single getComposedStaticRange read rather than computing it twice as a call to getDOMSelectionRange followed by getDOMSelectionPoints would.
- getDOMShadowRootsfunction(node: Node) => ShadowRoot[]
- getDOMTextNodefunctionReturns the first DOM Text node found by descending the firstChild chain from the given node, or null.
- getNearestEditorFromDOMNodefunctionReturns the nearest LexicalEditor instance by walking up the DOM tree from the given node, or null if none is found.
- getParentElementfunctionReturns the parent element of a DOM node, crossing shadow root boundaries and following slot assignments.
- getRegisteredSubtypeMapfunctionBuild a map from each registered node type to the set of registered node types that are it or extend it (including the type itself).
- getStyleObjectFromCSSfunctionParses inline CSS text into an object that is compatible with `CSSStyleDeclaration.setProperty()`. Property names are expected to be kebab-case, such as `font-size`, and values are expected to include explicit units where needed, such as `12px`.
- getTextDirectionfunctionReturns the text direction ('ltr' or 'rtl') of the given string, or null if it contains no strong directional characters.
- INTERNAL_$expandSelectionToWholeDocumentfunctionWhen `selection` covers the whole document, widen it to the root's own element points, so the range describes the top-level blocks themselves rather than only the text inside them. A delete over that range then removes the blocks outright and leaves the editor on a fresh empty paragraph, instead of gutting them and leaving an empty heading, quote or list behind that keeps its type and styles the next character typed (#5835).
- isBlockDomNodefunction(node: Node) => node is HTMLElement & { [BlockDOMBrand]: never; }
- isCurrentlyReadOnlyModefunctionReturns true if the current editor update context is read-only.
- isDocumentFragmentfunction(x: unknown) => x is DocumentFragment
- isDOMCapturingSelectionfunctionTrue if the DOM node sits inside a subtree marked with `{captureSelection: true}` via setDOMUnmanaged.
- isDOMDocumentNodefunction(node: unknown) => node is Document
- isDOMNodefunction(x: unknown) => x is Node
- isDOMShadowRootfunction(node: unknown) => node is ShadowRoot
- isDOMTextNodefunction(node: unknown) => node is Text
- isDOMUnmanagedfunctionTrue if this DOM node was marked with setDOMUnmanaged.
- isExactShortcutMatchfunctionMatch a KeyboardEvent with its expected state
- isHTMLAnchorElementfunction(x: unknown) => x is HTMLAnchorElement
- isHTMLElementfunction(x: unknown) => x is HTMLElement
- isHTMLTableCellElementfunction(x: unknown) => x is HTMLTableCellElement
- isHTMLTableRowElementfunction(x: unknown) => x is HTMLTableRowElement
- isInlineDomNodefunction(node: Node) => node is (HTMLElement | Text) & { [InlineDOMBrand]: never; }
- isLastChildInBlockNodefunctionTrue when `node` is the trailing non-whitespace child of a block DOM element (excluding the only-child case).
- isLexicalEditorfunction(editor: unknown) => editor is LexicalEditor
- isModifierMatchfunctionMatch a KeyboardEvent with its expected modifier state
- isOnlyChildInBlockNodefunctionTrue when `node` is the sole non-whitespace child of a block DOM element.
- isSchemaFieldfunctionWhether an accessor names a node field rather than a method. Generic in the field type so it narrows to the direction it was handed: given a SchemaGetterAccessor it yields a SchemaGetterField, whose `getterTable` is then the only table in scope.
- isSelectionWithinEditorfunctionReturns true if the given DOM anchor and focus nodes are inside the editor's root element and not captured by a decorator input.
- makeStepwiseIteratorfunctionA generalized utility for creating a stepwise iterator based on: - an initial state - a stop guard that returns true if the iteration is over, this is typically used to detect a sentinel value such as null or undefined from the state but may return true for other conditions as well - a step function that advances the state (this will be called after map each time next() is called to prepare the next state) - a map function that will be called that may transform the state before returning it.
- memofunctionLets you skip re-rendering a component when its props are unchanged.
- mergeRegisterfunctionReturns a function that will execute all functions passed when called.
- mountSlotContainerfunction(editor: LexicalEditor, nodeKey: NodeKey, slotName: string, target: HTMLElement) => HTMLElement | null
- namedSignalsfunctionReturn an object with the same shape as `defaults` with a Signal for each value.
- nodeSchemafunctionA node's serialization schema, checked against the node it is for. The same shape objectValue takes, with one type argument naming the node — which is what lets every `field`, accessor `method` and `when` predicate be verified to exist.
- nullablefunctionCombinator that makes any SerializationSchema nullable.
- numberValuefunctionBuild a SerializationSchema that returns `value` when it is a finite `number`, otherwise returns `defaultValue` (`0` by default).
- objectValuefunctionCompose per-property SerializationSchemas into a single SerializationSchema for an object-valued property.
- optionalfunctionCombinator that makes any SerializationSchema optional.
- rawValuefunctionBuild a SerializationSchema for a value this schema deliberately does not validate, because something else owns its domain — the motivating case is a nested SerializedEditor, which the nested editor's own `parseEditorState` validates when the property is applied. The value is passed through unchanged and `undefined` is the recoverable default, so declaring the property still routes it through the node's setter (and keeps it visible to schema-walking tooling) without pretending to validate its contents.
- registerEventListenerfunctionAdd an event listener to `target` and return a function that removes it. This is a thin, strongly typed wrapper around EventTarget.addEventListener that mirrors its overloads but returns a dispose function instead of `void`.
- registerEventListenersfunctionAdd several event listeners to a single `target` and return one function that removes all of them. This is the batch form of registerEventListener: it takes a `{type: listener}` object (strongly typed per event type) and shares one `options` value across every listener.
- removeClassNamesFromElementfunctionTakes an HTML element and removes the classNames passed within an array, ignoring any non-string types.
- resetRandomKeyfunctionResets the internal key counter, primarily for deterministic test output.
- safeCastfunctionExplicitly and safely cast a value to a specific type when inference or satisfies isn't going to work as expected (often useful for the config property with defineExtension)
- setDOMStyleFromCSSfunctionApplies inline CSS text to a DOM style declaration using `CSSStyleDeclaration.setProperty()`. Property names are expected to be kebab-case, such as `font-size`, and values are expected to include explicit units where needed, such as `12px`.
- setDOMStyleObjectfunctionApplies a style object to a DOM style declaration using `CSSStyleDeclaration.setProperty()`. Property names are expected to be kebab-case, such as `font-size`, and values are expected to include explicit units where needed, such as `12px`.
- setDOMUnmanagedfunctionMark this DOM element as unmanaged by lexical's mutation observer (like decorator nodes are).
- setNodeIndentFromDOMfunctionReads the indent level from a DOM element's `data-lexical-indent` attribute or `paddingInlineStart` style, and applies it to the given ElementNode.
- shallowMergeConfigfunctionThe default merge strategy for extension configuration is a shallow merge.
- signalfunctionCreate a new plain signal.
- stringValuefunctionBuild a SerializationSchema that returns `value` when it is a `string`, otherwise returns `defaultValue` (the empty string by default).
- toggleTextFormatTypefunctionToggles the given text format type on a format bitmask, clearing mutually exclusive formats (subscript/superscript, lowercase/uppercase/capitalize).
- tokenizeRawTextfunctionPush-lex a raw text string into `linebreak` (`\n` / `\r\n`), `tab` (`\t`), and `text` (everything else) tokens, dispatching each to the matching callback on `visitor` in source order. Shared by $generateNodesFromRawText (which builds `LineBreakNode` / `TabNode` / `TextNode` siblings) and by `@lexical/clipboard`'s default `text/plain` clipboard importer (which maps `linebreak` to a real paragraph break via `insertParagraph` so multi-line plain text becomes multi-paragraph rich text).
- transformValuefunctionCombinator that normalizes the value another SerializationSchema parsed, for serialized properties whose accepted domain is wider than the stored one — the motivating case is a legacy shorthand that older documents carry (`format: 'bold'`) being folded into the stored numeric form.
- unionValuefunctionCombinator for a value whose domain is the union of several schemas, such as a dimension that is either a number or the literal `'inherit'`.
- unmountSlotContainerfunction(editor: LexicalEditor, nodeKey: NodeKey, container: HTMLElement) => void
- untrackedfunctionRun a callback function that can access signal values without subscribing to the signal updates. When called inside a `createModel` factory, this also suppresses model-owned effect capture.
- useCallbackfunction`useCallback` will return a memoized version of the callback that only changes if one of the `inputs` has changed.
- useEffectfunctionAccepts a function that contains imperative, possibly effectful code.
- useIdfunction() => string
- useLayoutEffectfunctionThe signature is identical to `useEffect`, but it fires synchronously after all DOM mutations. Use this to read layout from the DOM and synchronously re-render.
- useMemofunction`useMemo` will only recompute the memoized value when one of the `deps` has changed.
- useModMetadatafunction<TValue>(metadata: BoundMetadata<TValue>) => TValue
- useModStatefunction<TValue>(state: State<TValue>) => StateSnapshot<TValue>
- useReffunction`useRef` returns a mutable ref object whose `.current` property is initialized to the passed argument (`initialValue`).
- useStatefunctionReturns a stateful value, and a function to update it.
- useSyncExternalStorefunction<Snapshot>(subscribe: (onStoreChange: () => void) => () => void, getSnapshot: () => Snapshot, getServerSnapshot?: () => Snapshot) => Snapshot
- watchedSignalfunctionCreate a Signal that will subscribe to a value from an external store when watched, similar to React's [useSyncExternalStore](https://react.dev/reference/react/useSyncExternalStore).
- withAccessorsfunctionReturn a copy of `schema` that records both accessor names at once, which is the common case for a property whose node methods do not follow the default `get<Prop>`/`set<Prop>` naming.
- withFieldfunctionReturn a copy of `schema` that declares the serialized property to *be* a node field rather than a pair of accessor methods. This is the fast path in both directions: exporting reads the field, and importing assigns it, with no method call on either side — and no version resolution either way, since the node being parsed into is writable by construction and the node being exported is one the walk already resolved from the EditorState.
Classes16
- DecoratorNodeclassimportDOM, $config(), afterCloneFrom(), clone(), config(), createDOM(), createParentElementNode(), decorate(), exportDOM(), exportJSON(), getDOMSlot(), getIndexWithinParent(), getKey(), getLatest(), getNextSibling(), getNextSiblings(), getNodesBetween(), getParent(), getParentKeys(), getParentOrThrow(), getParents(), getPreviousSibling(), getPreviousSiblings(), getTextContent(), getTextContentSize(), getTopLevelElement(), getTopLevelElementOrThrow(), getType(), getType(), getWritable(), importJSON(), insertAfter(), insertBefore(), is(), isAttached(), isBefore(), isDirty(), isInline(), isIsolated(), isKeyboardSelectable(), isParentOf(), isParentRequired(), isSelected(), markDirty(), remove(), replace(), resetOnCopyNodeFrom(), selectEnd(), selectNext(), selectPrevious(), selectStart(), transform(), updateDOM(), updateFromJSON()
- DOMSlotclassBase class for DOM slots — a pointer to the content-bearing element of a node's DOM, plus optional `before` / `after` boundaries marking where the lexical-managed content sits inside that element. For ElementNode children management see ElementDOMSlot.
- EditorStateclass_flushSync, _nodeMap, _parsed, _readOnly, _selection, _slotsUsed, clone(), isEmpty(), read(), toJSON()
- ElementDOMSlotclassA utility class for managing the DOM children of an ElementNode. Extends DOMSlot with ElementNode-specific scaffolding — the reconciler-managed line break that keeps empty elements selectable, and the offset / index resolution helpers needed when mapping DOM selections onto lexical positions.
- ElementNodeclassimportDOM, $config(), afterCloneFrom(), append(), canBeEmpty(), canIndent(), canInsertTextAfter(), canInsertTextBefore(), canMergeWhenEmpty(), clear(), clone(), collapseAtStart(), config(), createDOM(), createParentElementNode(), excludeFromCopy(), exportDOM(), exportJSON(), extractWithChild(), getAllTextNodes(), getChildAtIndex(), getChildren(), getChildrenKeys(), getChildrenSize(), getDescendantByIndex(), getDirection(), getDOMSlot(), getFirstChild(), getFirstChildOrThrow(), getFirstDescendant(), getFormat(), getFormatFlags(), getFormatType(), getIndent(), getIndexWithinParent(), getKey(), getLastChild(), getLastChildOrThrow(), getLastDescendant(), getLatest(), getNextSibling(), getNextSiblings(), getNodesBetween(), getParent(), getParentKeys(), getParentOrThrow(), getParents(), getPreviousSibling(), getPreviousSiblings(), getStyle(), getTextContent(), getTextContentSize(), getTextFormat(), getTextStyle(), getTopLevelElement(), getTopLevelElementOrThrow(), getType(), getType(), getWritable(), hasFormat(), hasTextFormat(), importJSON(), insertAfter(), insertBefore(), insertNewAfter(), is(), isAttached(), isBefore(), isDirty(), isEmpty(), isInline(), isLastChild(), isParentOf(), isParentRequired(), isSelected(), isShadowRoot(), markDirty(), remove(), replace(), resetOnCopyNodeFrom(), select(), selectEnd(), selectNext(), selectPrevious(), selectStart(), setDirection(), setFormat(), setIndent(), setStyle(), setTextFormat(), setTextStyle(), splice(), transform(), updateDOM(), updateFromJSON()
- LexicalEditorclassversion, blur(), dispatchCommand(), focus(), getDecorators(), getEditorState(), getElementByKey(), getKey(), getRootElement(), hasNode(), hasNodes(), isComposing(), isEditable(), parseEditorState(), read(), registerCommand(), registerDecoratorListener(), registerEditableListener(), registerMutationListener(), registerNodeTransform(), registerRootListener(), registerTextContentListener(), registerUpdateListener(), setEditable(), setEditorState(), setRootElement(), toJSON(), update()
- LexicalNodeclassimportDOM, $config(), afterCloneFrom(), clone(), config(), createDOM(), createParentElementNode(), exportDOM(), exportJSON(), getDOMSlot(), getIndexWithinParent(), getKey(), getLatest(), getNextSibling(), getNextSiblings(), getNodesBetween(), getParent(), getParentKeys(), getParentOrThrow(), getParents(), getPreviousSibling(), getPreviousSiblings(), getTextContent(), getTextContentSize(), getTopLevelElement(), getTopLevelElementOrThrow(), getType(), getType(), getWritable(), importJSON(), insertAfter(), insertBefore(), is(), isAttached(), isBefore(), isDirty(), isInline(), isParentOf(), isParentRequired(), isSelected(), markDirty(), remove(), replace(), resetOnCopyNodeFrom(), selectEnd(), selectNext(), selectPrevious(), selectStart(), transform(), updateDOM(), updateFromJSON()
- LineBreakNodeclassimportDOM, $config(), afterCloneFrom(), clone(), config(), createDOM(), createParentElementNode(), exportDOM(), exportJSON(), getDOMSlot(), getIndexWithinParent(), getKey(), getLatest(), getNextSibling(), getNextSiblings(), getNodesBetween(), getParent(), getParentKeys(), getParentOrThrow(), getParents(), getPreviousSibling(), getPreviousSiblings(), getTextContent(), getTextContentSize(), getTopLevelElement(), getTopLevelElementOrThrow(), getType(), getType(), getWritable(), importJSON(), insertAfter(), insertBefore(), is(), isAttached(), isBefore(), isDirty(), isInline(), isParentOf(), isParentRequired(), isSelected(), markDirty(), remove(), replace(), resetOnCopyNodeFrom(), selectEnd(), selectNext(), selectPrevious(), selectStart(), transform(), updateDOM(), updateFromJSON()
- NodeSelectionclass_cachedNodes, _nodes, dirty, add(), clear(), clone(), delete(), deleteNodes(), extract(), getCachedNodes(), getNodes(), getStartEndPoints(), getTextContent(), has(), insertNodes(), insertRawText(), insertText(), is(), isBackward(), isCollapsed(), setCachedNodes()
- ParagraphNodeclassimportDOM, $config(), afterCloneFrom(), append(), canBeEmpty(), canIndent(), canInsertTextAfter(), canInsertTextBefore(), canMergeWhenEmpty(), clear(), clone(), collapseAtStart(), config(), createDOM(), createParentElementNode(), excludeFromCopy(), exportDOM(), exportJSON(), extractWithChild(), getAllTextNodes(), getChildAtIndex(), getChildren(), getChildrenKeys(), getChildrenSize(), getDescendantByIndex(), getDirection(), getDOMSlot(), getFirstChild(), getFirstChildOrThrow(), getFirstDescendant(), getFormat(), getFormatFlags(), getFormatType(), getIndent(), getIndexWithinParent(), getKey(), getLastChild(), getLastChildOrThrow(), getLastDescendant(), getLatest(), getNextSibling(), getNextSiblings(), getNodesBetween(), getParent(), getParentKeys(), getParentOrThrow(), getParents(), getPreviousSibling(), getPreviousSiblings(), getStyle(), getTextContent(), getTextContentSize(), getTextFormat(), getTextStyle(), getTopLevelElement(), getTopLevelElementOrThrow(), getType(), getType(), getWritable(), hasFormat(), hasTextFormat(), importJSON(), insertAfter(), insertBefore(), insertNewAfter(), is(), isAttached(), isBefore(), isDirty(), isEmpty(), isInline(), isLastChild(), isParentOf(), isParentRequired(), isSelected(), isShadowRoot(), markDirty(), remove(), replace(), resetOnCopyNodeFrom(), select(), selectEnd(), selectNext(), selectPrevious(), selectStart(), setDirection(), setFormat(), setIndent(), setStyle(), setTextFormat(), setTextStyle(), splice(), transform(), updateDOM(), updateFromJSON()
- Pointclass_selection, key, offset, type, getNode(), is(), isBefore(), set()
- RangeSelectionclass_cachedNodes, anchor, dirty, focus, format, style, applyDOMRange(), clone(), deleteCharacter(), deleteLine(), deleteWord(), extract(), formatText(), forwardDeletion(), getCachedNodes(), getNodes(), getStartEndPoints(), getTextContent(), hasFormat(), insertLineBreak(), insertNodes(), insertParagraph(), insertRawText(), insertText(), is(), isBackward(), isCollapsed(), modify(), removeText(), setCachedNodes(), setFormat(), setStyle(), setTextNodeRange(), toggleFormat()
- RootNodeclassimportDOM, $config(), afterCloneFrom(), append(), canBeEmpty(), canIndent(), canInsertTextAfter(), canInsertTextBefore(), canMergeWhenEmpty(), clear(), clone(), collapseAtStart(), config(), createDOM(), createParentElementNode(), excludeFromCopy(), exportDOM(), exportJSON(), extractWithChild(), getAllTextNodes(), getChildAtIndex(), getChildren(), getChildrenKeys(), getChildrenSize(), getDescendantByIndex(), getDirection(), getDOMSlot(), getFirstChild(), getFirstChildOrThrow(), getFirstDescendant(), getFormat(), getFormatFlags(), getFormatType(), getIndent(), getIndexWithinParent(), getKey(), getLastChild(), getLastChildOrThrow(), getLastDescendant(), getLatest(), getNextSibling(), getNextSiblings(), getNodesBetween(), getParent(), getParentKeys(), getParentOrThrow(), getParents(), getPreviousSibling(), getPreviousSiblings(), getStyle(), getTextContent(), getTextContentSize(), getTextFormat(), getTextStyle(), getTopLevelElement(), getTopLevelElementOrThrow(), getType(), getType(), getWritable(), hasFormat(), hasTextFormat(), importJSON(), insertAfter(), insertBefore(), insertNewAfter(), is(), isAttached(), isBefore(), isDirty(), isEmpty(), isInline(), isLastChild(), isParentOf(), isParentRequired(), isSelected(), isShadowRoot(), markDirty(), remove(), replace(), resetOnCopyNodeFrom(), select(), selectEnd(), selectNext(), selectPrevious(), selectStart(), setDirection(), setFormat(), setIndent(), setStyle(), setTextFormat(), setTextStyle(), splice(), transform(), updateDOM(), updateFromJSON()
- StateConfigclassThe return value of createState, for use with $getState and $setState.
- TabNodeclass__text, importDOM, $config(), afterCloneFrom(), canHaveFormat(), canInsertTextAfter(), canInsertTextBefore(), clone(), config(), createDOM(), createParentElementNode(), exportDOM(), exportJSON(), getDetail(), getDOMSlot(), getFormat(), getFormatFlags(), getIndexWithinParent(), getKey(), getLatest(), getMode(), getNextSibling(), getNextSiblings(), getNodesBetween(), getParent(), getParentKeys(), getParentOrThrow(), getParents(), getPreviousSibling(), getPreviousSiblings(), getStyle(), getTextContent(), getTextContentSize(), getTopLevelElement(), getTopLevelElementOrThrow(), getType(), getType(), getWritable(), hasFormat(), importJSON(), insertAfter(), insertBefore(), is(), isAttached(), isBefore(), isComposing(), isDirectionless(), isDirty(), isInline(), isParentOf(), isParentRequired(), isSegmented(), isSelected(), isSimpleText(), isTextEntity(), isToken(), isUnmergeable(), markDirty(), mergeWithSibling(), remove(), replace(), resetOnCopyNodeFrom(), select(), selectEnd(), selectionTransform(), selectNext(), selectPrevious(), selectStart(), setDetail(), setFormat(), setMode(), setStyle(), setTextContent(), spliceText(), splitText(), toggleDirectionless(), toggleFormat(), toggleUnmergeable(), transform(), updateDOM(), updateFromJSON()
- TextNodeclass__text, importDOM, $config(), afterCloneFrom(), canHaveFormat(), canInsertTextAfter(), canInsertTextBefore(), clone(), config(), createDOM(), createParentElementNode(), exportDOM(), exportJSON(), getDetail(), getDOMSlot(), getFormat(), getFormatFlags(), getIndexWithinParent(), getKey(), getLatest(), getMode(), getNextSibling(), getNextSiblings(), getNodesBetween(), getParent(), getParentKeys(), getParentOrThrow(), getParents(), getPreviousSibling(), getPreviousSiblings(), getStyle(), getTextContent(), getTextContentSize(), getTopLevelElement(), getTopLevelElementOrThrow(), getType(), getType(), getWritable(), hasFormat(), importJSON(), insertAfter(), insertBefore(), is(), isAttached(), isBefore(), isComposing(), isDirectionless(), isDirty(), isInline(), isParentOf(), isParentRequired(), isSegmented(), isSelected(), isSimpleText(), isTextEntity(), isToken(), isUnmergeable(), markDirty(), mergeWithSibling(), remove(), replace(), resetOnCopyNodeFrom(), select(), selectEnd(), selectionTransform(), selectNext(), selectPrevious(), selectStart(), setDetail(), setFormat(), setMode(), setStyle(), setTextContent(), spliceText(), splitText(), toggleDirectionless(), toggleFormat(), toggleUnmergeable(), transform(), updateDOM(), updateFromJSON()
Values129
- $findMatchingParentconstStarts with a node and moves up the tree (toward the root node) to find a matching node based on the search parameters of the findFn.
- BEFORE_INPUT_COMMANDconstDispatched on a beforeinput event.
- BLUR_COMMANDconstDispatched when the editor loses focus.
- CAN_REDO_COMMANDconstLexicalCommand<boolean>
- CAN_UNDO_COMMANDconstLexicalCommand<boolean>
- CAN_USE_BEFORE_INPUTconstWhether the browser supports the `beforeinput` event via `InputEvent.getTargetRanges()`.
- CAN_USE_DOMconstWhether a browser DOM environment is available.
- CLEAR_EDITOR_COMMANDconstDispatched to clear all editor content.
- CLEAR_HISTORY_COMMANDconstDispatched to clear the undo/redo history stack.
- CLICK_COMMANDconstDispatched on a mouse click event in the editor.
- COLLABORATION_TAGconstIndicates that the update is related to collaborative editing
- COMMAND_PRIORITY_BEFORE_CRITICALconstLexicalEditor.registerCommand listener added to the beginning of the critical priority queue (before high, normal, low, editor)
- COMMAND_PRIORITY_BEFORE_EDITORconstLexicalEditor.registerCommand listener added to the beginning of the editor priority queue (after critical, high, normal, low)
- COMMAND_PRIORITY_BEFORE_HIGHconstLexicalEditor.registerCommand listener added to the beginning of the high priority queue (after critical; before normal, low, editor)
- COMMAND_PRIORITY_BEFORE_LOWconstLexicalEditor.registerCommand listener added to the beginning of the low priority queue (after critical, high, normal; before editor)
- COMMAND_PRIORITY_BEFORE_NORMALconstLexicalEditor.registerCommand listener added to the beginning of the normal priority queue (after critical, high; before low, editor)
- COMMAND_PRIORITY_CRITICALconstLexicalEditor.registerCommand listener added to the end of the critical priority queue (before high, normal, low, editor)
- COMMAND_PRIORITY_EDITORconstLexicalEditor.registerCommand listener added to the end of the editor priority queue (after critical, high, normal, low)
- COMMAND_PRIORITY_HIGHconstLexicalEditor.registerCommand listener added to the end of the high priority queue (after critical; before normal, low, editor)
- COMMAND_PRIORITY_LOWconstLexicalEditor.registerCommand listener added to the end of the low priority queue (after critical, high, normal; before editor)
- COMMAND_PRIORITY_NORMALconstLexicalEditor.registerCommand listener added to the end of the normal priority queue (after critical, high; before low, editor)
- COMPOSITION_END_COMMANDconstDispatched when an IME composition session ends.
- COMPOSITION_END_TAGconstThe update was triggered by composition-end
- COMPOSITION_START_COMMANDconstDispatched when an IME composition session starts.
- COMPOSITION_START_TAGconstThe update was triggered by composition-start
- ConfigurationTargetconstThe configuration target
- CONTROL_OR_ALTconstThe modifier mask for the secondary shortcut modifier: Option (altKey) on Apple platforms and Ctrl elsewhere, conventionally used for word-level editing and block-format shortcuts.
- CONTROL_OR_METAconstKeyboardEventModifierMask & KeyboardEventControlOrOther
- CONTROLLED_TEXT_INSERTION_COMMANDconstDispatched to insert text from an InputEvent or a string.
- COPY_COMMANDconstDispatched on a copy event, either via the clipboard or a KeyboardEvent (Cmd+C on macOS, Ctrl+C elsewhere).
- CUT_COMMANDconstDispatched on a cut event, either via the clipboard or a KeyboardEvent (Cmd+X on macOS, Ctrl+X elsewhere).
- CUT_TAGconstIndicates that the update is related to a cut operation
- DELETE_CHARACTER_COMMANDconstDispatched to delete a character, the payload will be `true` if the deletion is backwards (backspace or delete on macOS) and `false` if forwards (delete or Fn+Delete on macOS).
- DELETE_LINE_COMMANDconstDispatched to delete a line, the payload will be `true` if the deletion is backwards (Cmd+Delete on macOS), and `false` if forwards (Fn+Cmd+Delete on macOS).
- DELETE_WORD_COMMANDconstDispatched to delete a word, the payload will be `true` if the deletion is backwards (Ctrl+Backspace or Opt+Delete on macOS), and `false` if forwards (Ctrl+Delete or Fn+Opt+Delete on macOS).
- Disposableconsttypeof types.Disposable
- DRAGEND_COMMANDconstDispatched when a drag operation ends.
- DRAGOVER_COMMANDconstDispatched when a dragged element is over the editor.
- DRAGSTART_COMMANDconstDispatched when a drag operation starts.
- DROP_COMMANDconstDispatched on a drop event.
- EndOfLineconsttypeof types.EndOfLine
- EventEmitterconsttypeof types.EventEmitter
- FileChangeTypeconsttypeof types.FileChangeType
- FilePermissionconsttypeof types.FilePermission
- FileSystemErrorconsttypeof types.FileSystemError
- FileTypeconsttypeof types.FileType
- FOCUS_COMMANDconstDispatched when the editor receives focus.
- FORMAT_ELEMENT_COMMANDconstDispatched to set the element format (alignment) of the selected block.
- FORMAT_TEXT_COMMANDconstDispatched to format the selected text.
- HISTORIC_TAGconstIndicates that the update is related to history operations (undo/redo)
- HISTORY_MERGE_TAGconstIndicates that the current update should be merged with the previous history entry
- HISTORY_PUSH_TAGconstIndicates that a new history entry should be pushed to the history stack
- INDENT_CONTENT_COMMANDconstDispatched to indent the selected content.
- INPUT_COMMANDconstDispatched on an input event.
- INSERT_LINE_BREAK_COMMANDconstDispatched to insert a line break.
- INSERT_PARAGRAPH_COMMANDconstDispatched to insert a new paragraph (Enter key).
- INSERT_TAB_COMMANDconstDispatched to insert a tab character.
- IS_ALL_FORMATTINGconstBitmask combining all text format flags.
- IS_ANDROIDconstWhether the current platform is Android.
- IS_ANDROID_CHROMEconstWhether the current browser is Chrome on Android.
- IS_APPLEconstWhether the current platform is Apple (macOS, iOS, iPadOS, iPod).
- IS_APPLE_WEBKITconstWhether the current browser is Apple WebKit (Safari on macOS/iOS, excludes Chrome).
- IS_BOLDconstBitmask for bold text formatting.
- IS_CHROMEconstWhether the current browser is Chrome (or Chromium-based).
- IS_CODEconstBitmask for code (monospace) text formatting.
- IS_FIREFOXconstWhether the current browser is Firefox (excludes SeaMonkey).
- IS_HIGHLIGHTconstBitmask for highlighted text formatting.
- IS_IOSconstWhether the current platform is iOS or iPadOS (iPhone, iPad, iPod).
- IS_ITALICconstBitmask for italic text formatting.
- IS_SAFARIconstWhether the current browser is Safari (excludes Android WebView which has a similar UA string).
- IS_STRIKETHROUGHconstBitmask for strikethrough text formatting.
- IS_SUBSCRIPTconstBitmask for subscript text formatting.
- IS_SUPERSCRIPTconstBitmask for superscript text formatting.
- IS_UNDERLINEconstBitmask for underline text formatting.
- isSelectionCapturedInDecoratorInputconsttypeof $isSelectionCapturedInDecoratorInput
- KEY_ARROW_DOWN_COMMANDconstDispatched when the `'ArrowDown'` key is pressed. The shift and/or alt (option) modifier keys may also be down.
- KEY_ARROW_LEFT_COMMANDconstDispatched when the `'ArrowLeft'` key is pressed. The shift modifier key may also be down.
- KEY_ARROW_RIGHT_COMMANDconstDispatched when the `'ArrowRight'` key is pressed. The shift modifier key may also be down.
- KEY_ARROW_UP_COMMANDconstDispatched when the `'ArrowUp'` key is pressed. The shift and/or alt (option) modifier keys may also be down.
- KEY_BACKSPACE_COMMANDconstDispatched whenever the `'Backspace'` key is pressed, the shift modifier key may be down.
- KEY_DELETE_COMMANDconstDispatched whenever the `'Delete'` key is pressed (Fn+Delete on macOS).
- KEY_DOWN_COMMANDconstDispatched when any key is pressed.
- KEY_ENTER_COMMANDconstDispatched when the enter key is pressed, may also be called with a null payload when the intent is to insert a newline.
- KEY_ESCAPE_COMMANDconstDispatched whenever the `'Escape'` key is pressed, any modifier keys may be down.
- KEY_MODIFIER_COMMANDconstLexicalCommand<KeyboardEvent>
- KEY_SPACE_COMMANDconstDispatched whenever the space (`' '`) key is pressed, any modifier keys may be down.
- KEY_TAB_COMMANDconstDispatched whenever the `'Tab'` key is pressed.
- MarkdownStringconsttypeof types.MarkdownString
- modconstimport('@modular/sdk/editor').ModularEditorHostApi
- MOVE_TO_ENDconstDispatched when the move to end keyboard shortcut is pressed, (Cmd+Right on macOS; Ctrl+Right elsewhere).
- MOVE_TO_STARTconstDispatched when the move to start keyboard shortcut is pressed, (Cmd+Left on macOS; Ctrl+Left elsewhere).
- NODE_STATE_DIRECTconstRead the state directly from the given object without `node.getLatest()`. Safe to use outside of editor state context or to read a previous version, equivalent to reading the property directly.
- NODE_STATE_KEYconstThe property key used to store node state on serialized node JSON.
- NODE_STATE_LATESTconstUse `node.getLatest()` before reading the state, per the lexical convention of only working with the latest version of a node.
- NotebookCellDataconsttypeof types.NotebookCellData
- NotebookCellKindconsttypeof types.NotebookCellKind
- NotebookCellOutputconsttypeof types.NotebookCellOutput
- NotebookCellOutputItemconsttypeof types.NotebookCellOutputItem
- NotebookDataconsttypeof types.NotebookData
- NotebookEditconsttypeof types.NotebookEdit
- NotebookRangeconsttypeof types.NotebookRange
- OUTDENT_CONTENT_COMMANDconstDispatched to outdent the selected content.
- PASTE_COMMANDconstDispatched on a paste event.
- PASTE_TAGconstIndicates that the update is related to a paste operation
- Positionconsttypeof types.Position
- Rangeconsttypeof types.Range
- REDO_COMMANDconstDispatched on redo (Shift+Cmd+Z on macOS, Shift+Ctrl+Z or Ctrl+Y elsewhere).
- RelativePatternconsttypeof types.RelativePattern
- REMOVE_TEXT_COMMANDconstDispatched to remove the currently selected text.
- removeFromParentconsttypeof $removeFromParent
- SELECT_ALL_COMMANDconstDispatched on the select all keyboard shortcut (Cmd+A on macOS, Ctrl+A elsehwere).
- SELECTION_CHANGE_COMMANDconstDispatched in an update, before reconciliation, when the selection changes. $getSelection() is the pending selection; $getPreviousSelection() is the last committed selection.
- SELECTION_INSERT_CLIPBOARD_NODES_COMMANDconstDispatched to insert clipboard nodes at the current selection.
- SET_TEXT_FORMAT_COMMANDconstDispatched to explicitly set or unset text formats on the selection. Unlike FORMAT_TEXT_COMMAND which toggles, this command sets each specified format to the exact boolean value provided.
- SKIP_COLLAB_TAGconstIndicates that the update should skip collaborative sync
- SKIP_DOM_SELECTION_TAGconstIndicates that the update should skip updating the DOM selection This is useful when you want to make updates without changing the selection or focus. Note: this tag has no effect on the initial editor state setup (e.g.
- SKIP_SCROLL_INTO_VIEW_TAGconstIndicates that the update should skip scrolling the selection into view
- SKIP_SELECTION_FOCUS_TAGconstIndicates that after changing the selection, the editor should not focus itself This tag is ignored if SKIP_DOM_SELECTION_TAG is used
- SnippetStringconsttypeof types.SnippetString
- SnippetTextEditconsttypeof types.SnippetTextEdit
- TEXT_TYPE_TO_FORMATconstMaps TextFormatType string names to their bitmask values.
- TextDocumentChangeReasonconsttypeof types.TextDocumentChangeReason
- TextDocumentSaveReasonconstRepresents reasons why a text document is saved.
- TextEditconsttypeof types.TextEdit
- ThemeColorconsttypeof types.ThemeColor
- ThemeIconconsttypeof types.ThemeIcon
- UNDO_COMMANDconstDispatched on undo (Cmd+Z on macOS, Ctrl+Z elsewhere).
- Uriconsttypeof types.Uri
- WorkspaceEditconsttypeof types.WorkspaceEdit