Nodes/X-FluxAgent/Rich Text Node
ComfyUI Node

Rich Text Node

A markdown sticky note that survives your workflow

By X-School-Academy·Created about a year ago·Updated about a year ago· 37
Rich Text Node
  • rich_text
  • STRING
text_input

Rich Text Node is a pass-through with a nicer front door. You feed it a string, it shows that string in a proper little editor right inside the node, and it hands the string back out unchanged. In practice it's a freeform prompt box / code scratchpad / note-to-self that you can drop anywhere in a graph and wire into whatever else is reading text. If you've ever wished a text prompt could be an editable, multi-line document instead of a cramped widget, this is that.

The "rich text" in the name is doing a bit of heavy lifting, though. This is a markdown editor (backed by CodeMirror, the same editor VS Code uses) - syntax coloring, line editing, that kind of thing - not a WYSIWYG rich-text formatter. It doesn't render your markdown into styled output, and it doesn't convert anything. What it does is let you write and revise comfortably inside the graph, then pass the raw string along. If you showed up expecting HTML formatting or bold/italic buttons, you're in the wrong place. But for writing long prompts or pasting a chunk of code, it's genuinely nicer than a single-line widget.

How it works

The Python side is almost comically simple: text_input comes in (marked forceInput), and the node returns the exact same string as its output. The real work happens in the JavaScript. A custom widget type (X-FluxAgent.RichTextWidget) mounts a CodeMirror editor inside the node's canvas, and the frontend wires onExecuted so that whenever the graph runs, any value that flows through the node gets pushed back into the editor. The node also ships its node_id up to the UI so the right editor gets updated. Net effect: you see what ran, and you can immediately edit it and run again. It's a lightweight debug-and-iterate loop, which is a nice touch for an otherwise simple node.

One thing that makes it worth keeping around: the content is saved with the workflow. Since the widget's value gets serialized into the workflow JSON, a RichText Node doubles as a portable notes field - open the workflow six months later and your "TODO: why does this sampler hate me" is still there.

The inputs and output

  • text_input (required) - the string to display and pass through. Wired from another node (it's forceInput), so this works as a viewer for whatever an LLM or text generator produced.
  • rich_text (optional) - the read-only editor widget itself. This is where you type when you're using the node as a scratchpad.
  • Output: STRING - whatever text_input was, unchanged. Wire it into anything that consumes text.

There are no settings to fiddle with. You don't configure this node; you just use it.

Installing it

Part of the X-FluxAgent pack, so the install is the same as the rest: ComfyUI Manager → search X-FluxAgent, or clone it in:

cd ComfyUI/custom_nodes
git clone https://github.com/X-School-Academy/X-FluxAgent

Restart ComfyUI and you're done. Dependencies are minimal (python-dotenv and requests, per the pack's requirements.txt) - nothing heavy, no models to download. It needs the frontend JS to work properly, so if the editor doesn't appear, make sure you fully restarted ComfyUI and aren't viewing an old cached page (hard refresh usually fixes it).

Where it sits in the pack

Real talk about the parent project: X-FluxAgent bills itself as an AI vibe-coding agent that generates nodes and exports workflows to standalone Python apps. Almost none of that exists yet - it's a single-commit repo and the README's own roadmap is still mostly unchecked boxes. The parts that do ship are utility pieces like this one and the pack's text-save node. Rich Text Node is worth grabbing for the editor alone if you like the idea; just don't come expecting the agent. And like any brand-new custom node, it's worth a quick skim of the source before you depend on it - the community hasn't really vetted this pack yet.

CategoryX-FluxAgent

Inputs (2)

NameTypeDefaultDescription
text_inputSTRING
rich_textoptX-FluxAgent.RichTextWidgetYour code

Outputs (1)

NameTypeDescription
STRINGSTRING