@anticrm/text Package

Packages > @anticrm/text

Classes

List of classes contained in this package or namespace
Class Description
MarkdownParser

Enumerations

List of enums contained in this package or namespace
Enumeration Description
MessageMarkType
MessageNodeType

Functions

List of functions contained in this package or namespace
Function Description
compareDeep(a, b)
messageContent(node)
messageMarks(node)
newMessageDocument()
parseMessage(message)
parseMessageMarkdown(message)
serializeMessage(node)
serializeMessageMarkdown(node)
traverseMarks(node, f)
traverseMessage(node, f)

Interfaces

List of interfaces contained in this package or namespace
Interface Description
IState
LinkMark
MessageMark
MessageNode
ReferenceMark

Type Aliases

List of type aliases contained in this package or namespace
Type Alias Description
FirstDelim

Enumerations

MessageMarkType enum

Signature:

export declare enum MessageMarkType 

Enumeration Members

List of members in use in this enum
Member Value Description
code "code"
em "em"
link "link"
reference "reference"
strong "strong"

MessageNodeType enum

Signature:

export declare enum MessageNodeType 

Enumeration Members

List of members in use in this enum
Member Value Description
blockquote "blockquote"
bullet_list "bullet_list"
code_block "code_block"
doc "doc"
hard_break "hard_break"
heading "heading"
horizontal_rule "horizontal_rule"
image "image"
list_item "list_item"
ordered_list "ordered_list"
paragraph "paragraph"
text "text"

Functions

compareDeep

Signature:

export declare function compareDeep(a: any, b: any): boolean;

Parameters

List of parameters
Parameter Type Description
a any
b any

Returns:

boolean

messageContent

Signature:

export declare function messageContent(node: MessageNode): MessageNode[];

Parameters

List of parameters
Parameter Type Description
node MessageNode

Returns:

MessageNode[]

messageMarks

Signature:

export declare function messageMarks(node: MessageNode): MessageMark[];

Parameters

List of parameters
Parameter Type Description
node MessageNode

Returns:

MessageMark[]

newMessageDocument

Signature:

export declare function newMessageDocument(): MessageNode;

Returns:

MessageNode

parseMessage

Signature:

export declare function parseMessage(message: string): MessageNode;

Parameters

List of parameters
Parameter Type Description
message string

Returns:

MessageNode

parseMessageMarkdown

Signature:

export declare function parseMessageMarkdown(message: string): MessageNode;

Parameters

List of parameters
Parameter Type Description
message string

Returns:

MessageNode

serializeMessage

Signature:

export declare function serializeMessage(node: MessageNode): string;

Parameters

List of parameters
Parameter Type Description
node MessageNode

Returns:

string

serializeMessageMarkdown

Signature:

export declare function serializeMessageMarkdown(node: MessageNode): string;

Parameters

List of parameters
Parameter Type Description
node MessageNode

Returns:

string

traverseMarks

Signature:

export declare function traverseMarks(node: MessageNode, f: (el: MessageMark) => void): void;

Parameters

List of parameters
Parameter Type Description
node MessageNode
f (el: MessageMark) => void

Returns:

void

traverseMessage

Signature:

export declare function traverseMessage(node: MessageNode, f: (el: MessageNode) => void): void;

Parameters

List of parameters
Parameter Type Description
node MessageNode
f (el: MessageNode) => void

Returns:

void

Type Aliases

FirstDelim

Signature:

export declare type FirstDelim = (i: number) => string;