ContentFormatter class

Content formatter that provides clean, formatted text from HTML

Constructors

ContentFormatter.new()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

estimateReadingTime(String text, {int wordsPerMinute = 200}) Duration
Reading time estimation (average 200 words per minute)
extractReadableText(String html) String
Extract readable text with smart paragraph detection
extractSpecificContent(String html) Map<String, List<String>>
Extract specific content types
format(String html, ContentFormat format) String
Format content according to the specified format
removeClutter(String html) String
Remove clutter elements like ads, navigation, etc.
toCleanHtml(String html) String
Clean HTML while preserving basic structure
toMarkdown(String html) String
Convert HTML to Markdown format
toPlainText(String html) String
Convert HTML to clean plain text
toReadableContent(String html) String
Extract readable content (similar to Readability.js)
wordCount(String text) int
Word count for text