Read HTML Content
The Deceptively Plain Node That Reads a File Back Into Your Graph
- STRING
ReadHtmlNode is a one-trick node and the trick is embarrassingly simple: you type a file path, it reads the file as UTF-8 text, and it hands you the contents as a string. That's the whole thing. It ships alongside the MarkmapNode mindmap maker in the same cenzijing/ComfyUI-Markmap pack, and honestly it's the pack's unsung half - 16 impressions to its sibling's 2, which tells you something about which node people actually look up.
Why would you want that? ComfyUI has a habit of treating generated files as dead ends. This node lets you pull a file back into the graph - the mindmap HTML that MarkmapNode just wrote, a markdown notes file, a config, whatever - and pass it somewhere that accepts a string. Feed a saved document into an LLM node for summarization, or just eyeball the raw contents of an output you generated a hundred runs ago. For an ecosystem where data flow is the whole point, a text-file reader is a surprisingly handy missing link.
How it works
There's no mechanism to speak of, which is the appeal. It checks the path exists (raising FileNotFoundError: File not found: <path> if you typo'd it), opens the file with UTF-8 encoding, and returns the raw contents as a single STRING. Despite the name, it will happily read any text file - the "HTML" is just the intended use case. Raw means raw: if it's an HTML file, you get the full markup, tags and all, not a rendered view.
The one input, the one output
file_path- a requiredSTRING, typed by hand. There's no file browser and nofolder_pathshelper; whatever absolute path you enter is what gets opened.- Output - a
STRINGwith the file's contents, ready to wire into any node that takes text.
Installing it
Same as the rest of the pack, and it's about as painless as custom nodes get: the pack's requirements.txt is empty of real dependencies, there are no model downloads, and no pip step. Either:
- ComfyUI Manager → search ComfyUI-Markmap → Install → restart.
- Or
cd ComfyUI/custom_nodes && git clone https://github.com/cenzijing/ComfyUI-Markmap, then restart ComfyUI.
Both nodes show up under the markmap category.
The traps
It's a bare open() call, so the classic failures are yours to avoid: wrong path means an instant FileNotFoundError, and the path must be the one ComfyUI's process can actually see - if you're using a virtual environment, relative paths won't do; give it the absolute path. And since it returns text, not an image, don't expect to preview anything - this node is about plumbing, not presentation.
Is it a must-install? No. Is it two minutes of setup for a genuinely useful escape hatch when you need one? Yes. For a node this small, that's a fair trade.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| file_path | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| STRING | STRING | — |