knoten / extension
Get HTML of Selected Text
Get the selected text from the page of the actual openend tab
Dieser Inhalt ist noch nicht in deiner Sprache verfügbar.
Read the HTML behind the part of the page you have highlighted, with its links and formatting.
What it does
Section titled “What it does”Get HTML of Selected Text takes the current selection on the active tab and returns its markup, not just its words: links, bold text, list items and images inside the selection are kept as HTML. The result is stored as text in the field you name in Output field name.
The output holds only the new field. Turn on Include input fields to keep the incoming item’s fields next to it.
When to use it
Section titled “When to use it”- Save a highlighted passage with its links intact, for example as a note or a knowledge entry.
- Convert a selection to Markdown with the Markdown node before sending it somewhere.
- If you only need the words, use Get Selected Text.
Inputs and settings
Section titled “Inputs and settings”| Einstellung | Typ | Was es bewirkt |
|---|---|---|
| Output field name (erforderlich) | Text | The name of the output field. |
| Options | Group | The options for the node. |
| Options › Include input fields | Toggle | Whether to include the input fields in the output. Standard: Off |
Output field name: for example selectionHtml. Later nodes read it with {{ $input.selectionHtml }}.
Outputs
Section titled “Outputs”-
Output
One item with your field, for example { "selectionHtml": "Read <a href=\"https://example.com\">this guide</a>" }.
Dependencies and credentials
Section titled “Dependencies and credentials”None. This node needs no connection and has no slots for other nodes.
Example workflow
Section titled “Example workflow”- Add a Context Menu trigger.
- Add Get HTML of Selected Text with Output field name =
selectionHtml. - Add Markdown with Operation = HTML to Markdown and Content =
{{ $input.selectionHtml }}. - Copy the result with Clipboard Write, ready to paste into your notes app.
Common issues
Section titled “Common issues”- The node fails with an error about the selection, or “No content found”. Nothing was selected on the active tab. Select the text first and keep that tab active while the workflow runs.
- The HTML is cut in the middle of an element. The node returns exactly the selected range. Select a little more, or read a whole element with Get All HTML and a DOM Selector.
- The node fails outside the extension. This node runs in the browser extension; install it or run the workflow from the extension.
Related nodes
Section titled “Related nodes”- Get Selected Text: the same selection as plain text.
- Get All HTML: the HTML of a whole page or element.
- Markdown: convert between HTML and Markdown.