Class: RichTextBuilder
Mixes
ParagraphContainer
Mixes
HeadingContainer
Mixes
HorizontalRuleContainer
Mixes
BlockQuoteContainer
Mixes
CodeBlockContainer
Mixes
EmbedContainer
Mixes
ListContainer
Mixes
TableContainer
Mixes
ImageContainer
Mixes
VideoContainer
Implements
ParagraphContainer<RichTextBuilder>HeadingContainer<RichTextBuilder>HorizontalRuleContainer<RichTextBuilder>BlockQuoteContainer<RichTextBuilder>CodeBlockContainer<RichTextBuilder>EmbedContainer<RichTextBuilder>ListContainer<RichTextBuilder>TableContainer<RichTextBuilder>ImageContainer<RichTextBuilder>VideoContainer<RichTextBuilder>
Table of contents
Constructors
Methods
- animatedImage
- blockQuote
- build
- codeBlock
- embed
- heading
- horizontalRule
- image
- list
- paragraph
- table
- video
Constructors
constructor
• new RichTextBuilder(): RichTextBuilder
Returns
Methods
animatedImage
▸ animatedImage(_opts): RichTextBuilder
Parameters
| Name | Type |
|---|---|
_opts | MediaOptions |
Returns
Implementation of
ImageContainer.animatedImage
blockQuote
▸ blockQuote(_opts, _cb): RichTextBuilder
Parameters
| Name | Type |
|---|---|
_opts | BlockQuoteOptions |
_cb | (blockQuote: BlockQuoteContext) => void |
Returns
Implementation of
BlockQuoteContainer.blockQuote
build
▸ build(): string
Serializes the document to a JSON string
Returns
string
codeBlock
▸ codeBlock(_opts, _cb): RichTextBuilder
Parameters
| Name | Type |
|---|---|
_opts | CodeBlockOptions |
_cb | (codeBlock: CodeBlockContext) => void |
Returns
Implementation of
CodeBlockContainer.codeBlock
embed
▸ embed(_opts): RichTextBuilder
Parameters
| Name | Type |
|---|---|
_opts | EmbedOptions |
Returns
Implementation of
EmbedContainer.embed
heading
▸ heading(_opts, _cb): RichTextBuilder
Parameters
| Name | Type |
|---|---|
_opts | HeadingOptions |
_cb | (heading: HeadingContext) => void |
Returns
Implementation of
HeadingContainer.heading
horizontalRule
▸ horizontalRule(): RichTextBuilder
Returns
Implementation of
HorizontalRuleContainer.horizontalRule
image
▸ image(_opts): RichTextBuilder
Parameters
| Name | Type |
|---|---|
_opts | MediaOptions |
Returns
Implementation of
ImageContainer.image
list
▸ list(_opts, _cb): RichTextBuilder
Parameters
| Name | Type |
|---|---|
_opts | ListOptions |
_cb | (list: ListContext) => void |
Returns
Implementation of
ListContainer.list
paragraph
▸ paragraph(_cb): RichTextBuilder
Parameters
| Name | Type |
|---|---|
_cb | (paragraph: ParagraphContext) => void |
Returns
Implementation of
ParagraphContainer.paragraph
table
▸ table(_cb): RichTextBuilder
Parameters
| Name | Type |
|---|---|
_cb | (table: TableContext) => void |
Returns
Implementation of
TableContainer.table
video
▸ video(_opts): RichTextBuilder
Parameters
| Name | Type |
|---|---|
_opts | VideoOptions |
Returns
Implementation of
VideoContainer.video