Skip to content

Get HTML of Selected Text

What it does: Captures text you’ve highlighted on a webpage along with all its formatting, links, and HTML structure, perfect for preserving rich content.

NameTypeDescriptionRequiredDefault
Include Outer TagsBooleanInclude the container elementsNotrue
Preserve AttributesBooleanKeep HTML attributes like classes and IDsNotrue
Clean MarkupBooleanRemove unnecessary HTML attributesNofalse
NameTypeDescription
htmlContentStringSelected content with HTML formatting
plainTextStringSame content as plain text
elementCountNumberNumber of HTML elements in selection
hasLinksBooleanWhether the selection contains links

Content Archiving Save formatted articles or blog posts with all their links, bold text, and structure intact for later reference.

Content Migration Copy rich content from one website to another while preserving all formatting and links.

Research Collection Gather formatted quotes and citations with their original styling for academic or professional research.

  1. Highlight content on any webpage by clicking and dragging
  2. Run your workflow - the node captures the selected content with formatting
  3. Process the HTML with other nodes for conversion or analysis
  4. Use the content in documents, emails, or other applications

Simple Example:

{
"includeOuterTags": true,
"preserveAttributes": true,
"cleanMarkup": false
}
🔍 Technical Details

What gets preserved:

  • Text formatting (bold, italic, underline)
  • Links and their destinations
  • HTML structure (headings, lists, paragraphs)
  • Images and media elements
  • CSS classes and styling information

Content Options:

  • Include Outer Tags: Captures the container elements around your selection
  • Preserve Attributes: Keeps CSS classes, IDs, and other HTML attributes
  • Clean Markup: Removes tracking codes and unnecessary attributes

Browser Requirements: Works in Chrome, Firefox, and Edge. Requires permission to access the current webpage.

Limitations:

  • You must select text before running the workflow
  • Cannot capture content from password fields or secure elements
  • Some websites may prevent content extraction

Rich Content Archive:

{
"includeOuterTags": true,
"preserveAttributes": true,
"cleanMarkup": false
}

Clean Content Copy:

{
"includeOuterTags": false,
"preserveAttributes": false,
"cleanMarkup": true
}

Formatted Research:

{
"includeOuterTags": true,
"preserveAttributes": true,
"cleanMarkup": true
}

Common Issues:

  • No content captured? Make sure you’ve highlighted text before running the workflow
  • Missing formatting? Enable “Preserve Attributes” to keep styling information
  • Too much extra code? Enable “Clean Markup” to remove unnecessary HTML