Html To Basic Html
ai-research-agent / extractor/html-to-content/html-to-basic-html
HTML Utilities
convertHTMLToBasicHTML()
function convertHTMLToBasicHTML(html: string, options?: object): string;Defined in: src/extractor/html-to-content/html-to-basic-html.js:33
Strip HTML to ~30 basic markup HTML tags, lists, tables, images. Convert anchors and relative urls to absolute urls. Basic HTML supports the same elements as Markdown, which is used in writing plain text. Markdown is converted to HTML anyways to display it, and it is better to edit basic HTML in a rich text editor.
Mozilla DOM Reference
Source Code of Browser HTML DOM
RegExp JS V8 Code
Parameters
| Parameter | Type | Description |
|---|---|---|
|
| Any page's HTML to process |
| { | |
|
| default="text,tag,href, src,type,width, height,id,data" List of allowed HTML attributes |
|
| default="br,p,u,b,i ,em,strong,h1,h2,h3,h4, h5,h6,blockquote, code,ul,ol,li,dd,dl, table,th,tr,td,sub,sup" - Comma-separated list of allowed HTML tags. |
|
| default=true - Whether to include formatting |
|
| default=true - Whether to include images |
|
| default=true - Whether to include links |
|
| base URL for converting relative URLs to absolute |
|
| default=true - Whether to include videos or not |
Returns
string
basic text formatting html
Author
Other
addDOMFunctions()
function addDOMFunctions(domObject: any): any;Defined in: src/extractor/html-to-content/html-to-basic-html.js:228
Parameters
| Parameter | Type |
|---|---|
|
|
Returns
any