Class: RichTextNamespace
Hierarchy
NamespaceBase
↳
RichTextNamespace
Accessors
audio
• get
audio(): (url
: string
) => RichTextBuilder
Returns
fn
▸ (url
): RichTextBuilder
Parameters
Name | Type |
---|---|
url | string |
Returns
RichTextBuilder
code
• get
code(): (text
: string
, language
: string
) => RichTextBuilder
Returns
fn
▸ (text
, language
): RichTextBuilder
Parameters
Name | Type |
---|---|
text | string |
language | string |
Returns
RichTextBuilder
image
• get
image(): (url
: string
, width?
: number
, height?
: number
) => RichTextBuilder
Returns
fn
▸ (url
, width?
, height?
): RichTextBuilder
Parameters
Name | Type |
---|---|
url | string |
width? | number |
height? | number |
Returns
RichTextBuilder
latex
• get
latex(): (text
: string
, block
: boolean
) => RichTextBuilder
Returns
fn
▸ (text
, block?
): RichTextBuilder
Parameters
Name | Type | Default value |
---|---|---|
text | string | undefined |
block | boolean | false |
Returns
RichTextBuilder
newline
• get
newline(): () => RichTextBuilder
Returns
fn
▸ (): RichTextBuilder
Returns
RichTextBuilder
rem
• get
rem(): (rem
: string
| Rem
) => RichTextBuilder
Returns
fn
▸ (rem
): RichTextBuilder
Parameters
Name | Type |
---|---|
rem | string | Rem |
Returns
RichTextBuilder
text
• get
text(): (text
: string
, formats
: ("bold"
| "italic"
| "underline"
| "Red"
| "Orange"
| "Yellow"
| "Green"
| "Blue"
| "Purple"
| "quote"
| "Gray"
| "Brown"
| "Pink"
)[]) => RichTextBuilder
Returns
fn
▸ (text
, formats?
): RichTextBuilder
Parameters
Name | Type | Default value |
---|---|---|
text | string | undefined |
formats | ("bold" | "italic" | "underline" | "Red" | "Orange" | "Yellow" | "Green" | "Blue" | "Purple" | "quote" | "Gray" | "Brown" | "Pink" )[] | [] |
Returns
RichTextBuilder
video
• get
video(): (url
: string
) => RichTextBuilder
Returns
fn
▸ (url
): RichTextBuilder
Parameters
Name | Type |
---|---|
url | string |
Returns
RichTextBuilder
Methods
applyTextFormatToRange
▸ applyTextFormatToRange(text
, start
, end
, format
): Promise
<RichTextInterface
>
Parameters
Name | Type |
---|---|
text | RichTextInterface |
start | number |
end | number |
format | RichTextFormatName |
Returns
Promise
<RichTextInterface
>
charAt
▸ charAt(richText
, index
): Promise
<null
| string
>
Parameters
Name | Type |
---|---|
richText | RichTextInterface |
index | number |
Returns
Promise
<null
| string
>
deepGetRemAndAliasIdsFromRichText
▸ deepGetRemAndAliasIdsFromRichText(richText
): Promise
<string
[]>
Parameters
Name | Type |
---|---|
richText | RichTextInterface |
Returns
Promise
<string
[]>
deepGetRemIdsFromRichText
▸ deepGetRemIdsFromRichText(richText
): Promise
<string
[]>
Parameters
Name | Type |
---|---|
richText | RichTextInterface |
Returns
Promise
<string
[]>
empty
▸ empty(richText
, allowSpaces?
): Promise
<boolean
>
Parameters
Name | Type |
---|---|
richText | RichTextInterface |
allowSpaces? | boolean |
Returns
Promise
<boolean
>
equals
▸ equals(richText1
, richText2
): Promise
<boolean
>
Parameters
Name | Type |
---|---|
richText1 | RichTextInterface |
richText2 | RichTextInterface |
Returns
Promise
<boolean
>
findAllExternalURLs
▸ findAllExternalURLs(richText
): Promise
<string
[]>
Parameters
Name | Type |
---|---|
richText | RichTextInterface |
Returns
Promise
<string
[]>
getRemAndAliasIdsFromRichText
▸ getRemAndAliasIdsFromRichText(richText
): Promise
<string
[]>
Parameters
Name | Type |
---|---|
richText | RichTextInterface |
Returns
Promise
<string
[]>
getRemIdsFromRichText
▸ getRemIdsFromRichText(richText
): Promise
<string
[]>
Parameters
Name | Type |
---|---|
richText | RichTextInterface |
Returns
Promise
<string
[]>
indexOf
▸ indexOf(richText
, character
, startChar?
): Promise
<number
>
Parameters
Name | Type |
---|---|
richText | RichTextInterface |
character | string |
startChar? | number |
Returns
Promise
<number
>
indexOfElementAt
▸ indexOfElementAt(richText
, position
): Promise
<number
>
Parameters
Name | Type |
---|---|
richText | RichTextInterface |
position | number |
Returns
Promise
<number
>
length
▸ length(richText
): Promise
<number
>
Parameters
Name | Type |
---|---|
richText | RichTextInterface |
Returns
Promise
<number
>
normalize
▸ normalize(richText
): Promise
<RichTextInterface
>
Parameters
Name | Type |
---|---|
richText | RichTextInterface |
Returns
Promise
<RichTextInterface
>
parseAndInsertHtml
▸ parseAndInsertHtml(html
, rem
): Promise
<void
>
Parameters
Name | Type | Description |
---|---|---|
html | string | |
rem | string | Rem |
Returns
Promise
<void
>
parseFromMarkdown
▸ parseFromMarkdown(markdown
): Promise
<RichTextInterface
>
Parameters
Name | Type |
---|---|
markdown | string |
Returns
Promise
<RichTextInterface
>
removeTextFormatFromRange
▸ removeTextFormatFromRange(text
, start
, end
, format
): Promise
<RichTextInterface
>
Parameters
Name | Type |
---|---|
text | RichTextInterface |
start | number |
end | number |
format | RichTextFormatName |
Returns
Promise
<RichTextInterface
>
replaceAllRichText
▸ replaceAllRichText(richText
, findText
, replacementText
): Promise
<RichTextInterface
>
Parameters
Name | Type |
---|---|
richText | RichTextInterface |
findText | RichTextInterface |
replacementText | RichTextInterface |
Returns
Promise
<RichTextInterface
>
split
▸ split(richText
, separationCharacter
): Promise
<RichTextInterface
>
Parameters
Name | Type |
---|---|
richText | RichTextInterface |
separationCharacter | string |
Returns
Promise
<RichTextInterface
>
splitRichText
▸ splitRichText(richText
, splitText
): Promise
<RichTextInterface
>
Parameters
Name | Type |
---|---|
richText | RichTextInterface |
splitText | RichTextInterface |
Returns
Promise
<RichTextInterface
>
substring
▸ substring(richText
, start
, end?
): Promise
<RichTextInterface
>
Parameters
Name | Type |
---|---|
richText | RichTextInterface |
start | number |
end? | number |
Returns
Promise
<RichTextInterface
>
toHTML
▸ toHTML(richText
): Promise
<string
>
Parameters
Name | Type |
---|---|
richText | RichTextInterface |
Returns
Promise
<string
>
toMarkdown
▸ toMarkdown(richText
): Promise
<string
>
Parameters
Name | Type |
---|---|
richText | RichTextInterface |
Returns
Promise
<string
>
toString
▸ toString(richText
): Promise
<string
>
Parameters
Name | Type |
---|---|
richText | RichTextInterface |
Returns
Promise
<string
>
toggleTextFormatOnRange
▸ toggleTextFormatOnRange(text
, start
, end
, format
): Promise
<RichTextInterface
>
Parameters
Name | Type |
---|---|
text | RichTextInterface |
start | number |
end | number |
format | RichTextFormatName |
Returns
Promise
<RichTextInterface
>
trim
▸ trim(richText
): Promise
<RichTextInterface
>
Parameters
Name | Type |
---|---|
richText | RichTextInterface |
Returns
Promise
<RichTextInterface
>
trimEnd
▸ trimEnd(richText
): Promise
<RichTextInterface
>
Parameters
Name | Type |
---|---|
richText | RichTextInterface |
Returns
Promise
<RichTextInterface
>
trimStart
▸ trimStart(richText
): Promise
<RichTextInterface
>
Parameters
Name | Type |
---|---|
richText | RichTextInterface |
Returns
Promise
<RichTextInterface
>