Nodes/ComfyUI_Text_Tools_SG/Text Tools 🪶 Editor-SG
ComfyUI Node

Text Tools 🪶 Editor-SG

A real markdown editor on the canvas

By ShammiG·Created 9 months ago·Updated 6 months ago· 7
Text Tools 🪶 Editor-SG
    • text
    text_input
    text

    If you write prompts or structured text inside ComfyUI for more than ten minutes a day, you already know the pain: the stock multiline widget is a gray box with no search, no formatting, no nothing. Text Tools 🪶 Editor-SG is the fix - a full markdown editor that lives right on the canvas, with a toolbar, live preview, and a text output you can wire straight into CLIP Text Encode or any other STRING input. It's the flagship of the small ShammiG/ComfyUI_Text_Tools_SG pack, and it's the node people who build self-documenting workflows tend to reach for.

    The pitch is simple: instead of editing prompts in Notepad and pasting them in, you write them where you use them, and you can format them so the node itself acts as documentation. This is genuinely useful in a community where "workflow included" is the norm and a workflow full of unlabeled gray text boxes is a chore to read. The editor's other selling point is that it isn't just a pretty box - it's a real tool. Bold, italic, strikethrough, code blocks, headings, bullet and numbered lists, hyperlinks, quotes, horizontal rules, even an insert-table shortcut, all from buttons above the text area. There's a day/night theme toggle (because your whole monitor doesn't need to be dark gray at 2am), a font-size slider, a text-wrap toggle, search-and-highlight, a line filter, and a "pretty JSON" mode that reformats pasted JSON so you can actually read it. Markdown preview is handled by a vendored copy of markdown-it, so it renders locally in the node - no network call, no API key.

    How it actually works

    The Python half is nearly empty, which is the point. It takes two optional STRING inputs: text_input and text. Per the author's own tooltip, text_input overwrites whatever is in the editor whenever a wire is connected - so if you're feeding another node's output in to inspect or pass through, that's the port. text is the editor's own content. Whichever is active comes out the single text output, and because the node is marked as an output node, it displays its content in the UI. The real engine is the ~2,400 lines of JavaScript widget that draws the toolbar, textarea and preview. It's a custom frontend, which brings us to the one thing you must know before installing anything from this pack.

    Install

    ComfyUI Manager is the easy route: open Manager → Custom Nodes Manager, search ComfyUI_Text_Tools_SG (or the author handle ShammiG) and hit install, then restart. Or do it by hand:

    cd ComfyUI/custom_nodes
    git clone https://github.com/ShammiG/ComfyUI_Text_Tools_SG
    

    then restart ComfyUI. There are no Python dependencies to pip, no models to download, and nothing GPU-related - it's a text node, pure and simple, and it'll run on a CPU-only install.

    Where people get burned

    The README opens with a warning in caps, and it's worth repeating: if your ComfyUI is version 0.3.76 or newer, turn the Nodes 2.0 setting OFF. ComfyUI's frontend migration to the Vue-based "Nodes 2.0" renderer broke a lot of custom widgets - rgthree had the same fight - and this pack's custom editor isn't ported. With Nodes 2.0 on, the editor may render wrong or lose its buttons; with it off, everything works. This is a broader ecosystem lesson, but it hits custom-text-widget nodes first, and this one lives on the frontend.

    Other practical notes: the editor stores its text in the node's properties, so your text survives saves and lives inside exported workflow PNGs. If the markdown preview button doesn't appear, the vendored markdown-it script failed to load - hard-refresh the browser (Ctrl+Shift+R) and check the console; it's local, so a cache issue is the usual culprit. And remember the overwrite behavior: if a workflow "loses" your carefully typed prompt, something is feeding text_input. Disconnect it and your text comes back.

    It's a small solo pack (MIT licensed, Patreon-supported, built with a lot of AI help per the README), so don't expect a support team - but for the price of a git clone, you get the best markdown editing ComfyUI has on the canvas.

    Categorytext/utils

    Inputs (2)

    NameTypeDefaultDescription
    text_inputoptSTRINGText will be overwritten if this is connected
    textoptSTRING

    Outputs (1)

    NameTypeDescription
    textSTRING