Nodes/Comal Clipboard Bridge/Clipboard Text Options Comal
ComfyUI Node

Clipboard Text Options Comal

The Tiny Config Node That Controls How Pasted Text Combines

By comal0731·Created 2 months ago·Updated 28 days ago· 0
Clipboard Text Options Comal
    • options
    mode
    separator,
    fixed_text

    By itself this node does nothing - which is the point. Clipboard Text Options ("Clipboard Text Options Comal" on the canvas) is the settings knob for the Clipboard Text Receiver: plug it into the receiver's optional options input and you decide what happens when new text lands. Without it, pasted text simply replaces whatever's in the box. With it, you get three combine modes plus a separator and a fixed prefix. It's the kind of node you add once, wire up, and forget.

    It's part of the comal-node_clipboard-bridge pack, and it's the least exciting node in it - a single build() call that packs three widget values into a dict and hands them over. But it's also the node that makes the clipboard receiver useful for real workflows instead of just a paste shortcut.

    How it works

    The Python side builds a plain dictionary - {mode, separator, fixed_text} - and sends it out on a custom wire type called CLIP_OPT. Don't let the name scare you (or, honestly, mislead you): it has nothing to do with CLIP conditioning or text encoders. "CLIP" here is just the pack author's chosen type name; the payload is a boring options dict that only the pack's own receiver knows how to read. Wire it to anything else and nothing will connect.

    The real work happens in the browser. When the receiver's extension gets a clipboard event and finds an options wire, it walks back to the source node, reads the current widget values live, and combines the text right then. That's why the settings "just work" without any backend re-execution - the combine logic lives in JavaScript, and the Python node is basically a labeled value holder.

    The inputs that matter

    Only three, and they're self-explanatory:

    • mode - Append sticks new text after the existing text, Replace swaps in only the new text, Fixed+New prefixes the new text with a fixed phrase. If you're building prompt templates, Fixed+New is the one you'll actually use.
    • separator - what joins the pieces (default ", "). Tweak it to ", ", " ", or "\n" depending on how you want tags joined.
    • fixed_text - the fixed phrase used in Fixed+New mode. Multiline, so you can drop in a whole prompt skeleton.

    Output: a single options socket of type CLIP_OPT, which connects to the receiver's options input - and nowhere else.

    Installing it

    Same pack as the rest of the bridge. ComfyUI Manager → Install via Git URLhttps://github.com/comal0731/comal-node_clipboard-bridge, or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/comal0731/comal-node_clipboard-bridge
    cd comal-node_clipboard-bridge
    pip install -r requirements.txt
    

    Restart ComfyUI and hard-refresh the browser (Ctrl+Shift+R) so the extension loads. Dependencies are just pillow and pyperclip - nothing heavy, no models.

    The one gotcha

    If you wire this node up and pasted text still just replaces, check two things: the receiver's options socket is actually connected, and listen is on. Also remember the global "Allow Comfy Text" rule still applies - copies made inside ComfyUI are filtered for a couple of seconds after any in-page Ctrl+C, so test with text copied from another app. It's a small node with a small job; as long as you wire it to a receiver, it does that job without drama.

    Categoryclipboard_bridge

    Inputs (3)

    NameTypeDefaultDescription
    modeCOMBO3 options: Append, Replace, Fixed+New
    separatorSTRING,
    fixed_textSTRING

    Outputs (1)

    NameTypeDescription
    optionsCLIP_OPT