Skip to main content

TextDocument

ai-research-agent / editor/document/TextDocument

Classes

default

Accessors

change
Get Signature
get change(): default
Returns

default

Constructors

new default()
new default(linesOrDocOrDelta?, selection?): default
Parameters
ParameterTypeDefault value

linesOrDocOrDelta?

default | default[] | default

undefined

selection?

null | EditorRange

null

Returns

default

Methods

apply()
apply(
change,
selection?,
throwOnError?): default
Parameters
ParameterType

change

default | default

selection?

null | EditorRange

throwOnError?

boolean

Returns

default

equals()
equals(other, options?): boolean
Parameters
ParameterType

other

default

options?

{ contentOnly: boolean; }

options.contentOnly?

boolean

Returns

boolean

getFormats()
getFormats(at, options?): default
Parameters
ParameterType

at

number | EditorRange

options?

FormattingOptions

Returns

default

getLineAt()
getLineAt(at): default
Parameters
ParameterType

at

number

Returns

default

getLineBy()
getLineBy(id): default
Parameters
ParameterType

id

string

Returns

default

getLineFormat()
getLineFormat(at, options?): default
Parameters
ParameterType

at

number | EditorRange

options?

FormattingOptions

Returns

default

getLineRange()
getLineRange(at): EditorRange
Parameters
ParameterType

at

string | number | default

Returns

EditorRange

getLineRanges()
getLineRanges(at?): any[]
Parameters
ParameterType

at?

number | EditorRange

Returns

any[]

getLinesAt()
getLinesAt(atOrRange, encompassed?): default[]
Parameters
ParameterType

atOrRange

number | EditorRange

encompassed?

boolean

Returns

default[]

getText()
getText(range?): string
Parameters
ParameterType

range?

EditorRange

Returns

string

getTextFormat()
getTextFormat(at, options?): default
Parameters
ParameterType

at

number | EditorRange

options?

FormattingOptions

Returns

default

replace()
replace(delta?, selection?): default
Parameters
ParameterType

delta?

default

selection?

null | EditorRange

Returns

default

slice()
slice(start, end): default
Parameters
ParameterTypeDefault value

start

number

0

end

number

Infinity

Returns

default

toDelta()
toDelta(): default
Returns

default

toJSON()
toJSON(): default
Returns

default

toString()
toString(): string
Returns

string

Properties

byId
byId: LineIds;
length
length: number;
lines
lines: default[];
selection
selection: null | EditorRange;

Interfaces

FormattingOptions

Properties

allFormats?
optional allFormats: boolean;
nameOnly?
optional nameOnly: boolean;