View as Markdown

API reference: @salmonui/editors/markdown-editor

MarkdownSyntaxinterface

import type { MarkdownSyntax } from '@salmonui/editors/markdown-editor';
interface MarkdownSyntax {
    readonly bold: readonly [
        string,
        string
    ];
    readonly italic: readonly [
        string,
        string
    ];
    readonly strikethrough: readonly [
        string,
        string
    ];
    readonly code: readonly [
        string,
        string
    ];
    readonly superscript: readonly [
        string,
        string
    ];
    readonly subscript: readonly [
        string,
        string
    ];
    readonly codeBlock: string;
    readonly blockquote: string;
    readonly unorderedList: string;
    readonly orderedList: string;
    readonly heading: string;
}

Markers per command: merged over the CommonMark / GFM defaults by the syntax prop.

MarkdownSyntax members (11)
NameSignatureDescription
boldreadonly bold: readonly [ string, string ];
italicreadonly italic: readonly [ string, string ];
strikethroughreadonly strikethrough: readonly [ string, string ];
codereadonly code: readonly [ string, string ];
superscriptreadonly superscript: readonly [ string, string ];
subscriptreadonly subscript: readonly [ string, string ];
codeBlockreadonly codeBlock: string;

Fence of codeBlock.

blockquotereadonly blockquote: string;

Line prefix of blockquote.

unorderedListreadonly unorderedList: string;

Line prefix of unorderedList.

orderedListreadonly orderedList: string;

Delimiter after the number of orderedList items ('.' gives 1. ).

headingreadonly heading: string;

Heading marker character.