Nodes/ComfyUI-MoonNodes/πŸŒ— Moon Markdown Output
ComfyUI Node

πŸŒ— Moon Markdown Output

Make your LLM's markdown actually readable in the graph

By m0rtus59Β·Created 3 months agoΒ·Updated 9 days agoΒ· 8
πŸŒ— Moon Markdown Output
    • STRING
    β—„textβ€”β–Ί

    When a Gemini chat node comes back with a structured, markdown-flavored answer - headers, code blocks, a table, some math - a plain ComfyUI "show text" box renders it as a wall of raw # and | characters. MoonMarkdownOutput is the antidote: it renders the markdown properly, right on the node, so the answer reads like a document instead of a config file.

    This is a pure display node, and it's about as close to "zero moving parts" as MoonNodes gets. You feed it text, it shows you the pretty version, and it hands the same text back through its output so the data keeps flowing if you want it elsewhere.

    How it renders

    The interesting bit is that it does not use a markdown library. The pack ships a self-contained JavaScript parser that runs entirely in your browser, offline, with no CDN calls. It handles the usual suspects - headings, bold and italic, lists (including checkboxes), blockquotes, tables, inline code, fenced code blocks, and even $...$ inline math styled for readability. Code blocks get a little language badge and a Copy button, which is a genuinely nice touch when the LLM hands you a snippet you want to paste into a script.

    It renders inside a DOM widget on the node itself, so you can scroll the content and resize the node to see more of it.

    The interface is minimal:

    • text (STRING) - the markdown source. It's forceInput, meaning it only accepts a wire from another text output; you can't just type into it. That's deliberate - this node's job is to display something produced elsewhere, typically the text output of Gemini Persistent Chat.
    • STRING output - the raw text, passed through untouched, so you can chain the display node onto a branch without losing the data.

    Install

    Standard MoonNodes install:

    cd ComfyUI/custom_nodes
    git clone https://github.com/m0rtus59/ComfyUI-MoonNodes.git
    cd ComfyUI-MoonNodes && pip install -r requirements.txt
    

    Restart, then refresh your browser tab - the markdown renderer is JavaScript, so a stale frontend is the #1 way to get an empty box instead of a rendered answer.

    Where it fits and what to expect

    It pairs naturally with the Gemini nodes: chat node text output β†’ MoonMarkdownOutput, and your prompt-engineering loop suddenly looks like a terminal you can actually read. It also passes text through unchanged, so you can fork the output - one wire to the pretty renderer, one wire onward to a text-saving node or into a prompt.

    Caveats are modest. It's display-only; it won't save files, and it won't edit the markdown. If the model returns content that isn't markdown at all (say, plain JSON), the renderer will still show it fine as a paragraph - it's not going to break. And because the rendered state lives in the node's properties, it survives tab-switching and workflow saves. About the only way to be disappointed here is to expect more than a viewer.

    CategoryMoonNodes

    Inputs (1)

    NameTypeDefaultDescription
    textSTRINGβ€”

    Outputs (1)

    NameTypeDescription
    STRINGSTRINGβ€”