Skip to content

Reference ​

ts
import { DocumentModel } from '@adecore/editor-core';

DocumentModel ​

GroupMembersGuide
TextgetText, getLength, getLineCount, getLine, slice, positionAt, offsetAtDocuments
SelectionsgetSelections, getSelectionCount, getPrimary, setSelections, expandSelectionTo, occurrencesExhaustedDocuments
EditsapplyEdits, setText, undo, redo, getRevisionDocuments
StategetSnapshot, subscribeDocuments
SavingmarkSaved, getModifiedLines, cleanUpWhitespaceDocuments
CommandstypeText, paste, execute, wordSelectionAt, wordStartBefore, wordEndAfterTyping and commands
Searchfind, findNext, replace, replaceAll, replaceMatchesSearch
FoldinggetFoldingRangesFolding
LexicalmatchBracket, placeAt, postfixOperands, surroundShape, unwrapTargets, findTodosLexical queries

@adecore/editor-core ​

Every name the package exports, read from its source. Anything not listed is internal.

NameKindSource
DocumentModelclassdocument
DocumentEditOptionstypedocument
DocumentLinetypedocument
OffsetRangetypedocument
ReplaceAllOptionstypedocument
ReplaceOptionstypedocument
TypeTextOptionstypedocument
scanBracketsfunctionbrackets
BracketIndextypebrackets
BracketMatchtypebrackets
findMatchesfunctionsearch
iterateMatchesfunctionsearch
findMatchFromfunctionsearch
replacementTextfunctionsearch
FindMatchtypesearch
FindNextOptionstypesearch
FindOptionstypesearch
indentationColumnfunctionstructure
commentSyntaxfunctionlanguages
CommentSyntaxtypelanguages
findDocCommentsfunctiondoc-comments
MAX_DOC_COMMENTSconstdoc-comments
DocCommenttypedoc-comments
DEFAULT_TODO_WORDSconsttodo
findTodosfunctiontodo
TodoMatchtypetodo
TodoOptionstypetodo
detectIndentationfunctionline-order
DetectedIndentationtypeline-order
TrailingWhitespacetypewhitespace-cleanup
WhitespaceCleanupOptionstypewhitespace-cleanup
FoldHintstypestructure
FoldRangeHinttypestructure
FoldRoletypestructure
FoldSymbolHinttypestructure
FoldingOptionstypestructure
FoldingRangetypestructure
ChangeSourcetypetypes
CommandOptionstypetypes
ContentEdittypetypes
Disposabletypetypes
DocumentChangetypetypes
EditOptionstypetypes
EditorCommandtypetypes
EditorSnapshottypetypes
Positiontypetypes
Selectiontypetypes
TextEdittypetypes
changedSpanfunctiontext-span
changedSpansfunctiontext-span
TextSpantypetext-span
TextPlacetypetext-places
TextPlaceKindtypetext-places
PostfixOperandtypepostfix-operands
SurroundShapetypesurround-shape
UnwrapKindtypeunwrap
UnwrapTargettypeunwrap

Licenses and third-party notices are listed in each package.