@vestra-player/sdk - v1.11.3
    Preparing search index...

    Interface MarkdownRef

    A Markdown document for MarkdownView or MarkdownBlocks, made by Ui.markdown.

    Opaque, like ImageRef: pass it where the Slint type is [MarkdownBlock]: the whole value of such a property (the blocks of MarkdownView from @vestra/markdown.slint) or, a [MarkdownBlock] field at any depth of a property value, such as the body of each row of a chat's message list. It carries the text, the base address and the local copies of its remote images; the player parses and draws it. Writing a document whose text did not change (a new reference for the same text included) costs the player no parsing, and a changed document updates only the blocks that changed. It belongs to the scope that created it: once that scope is disposed, writing it fails with invalid, wherever it is in the value.

    The chat window shows a formatted assistant message. ui.markdown resolves once the document is ready (here without downloading images); the reference goes into the body field of a row, whose Slint type is [MarkdownBlock], and the player parses and draws it.

    const chat = plugin.windows.create("ui/chat.slint");
    const body = await plugin.ui.markdown("**Hello**", { remoteImages: false });
    chat.set({ messages: [{ id: "m1", role: "assistant", body }] });

    0.2.0

    1.1.0

    interface MarkdownRef {
        text: string;
        __vestraMarkdown: true;
    }
    Index
    text: string

    The Markdown text, as given to Ui.markdown.

    __vestraMarkdown: true

    Brand that marks the value as a Markdown document; never construct one yourself.