You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+4-5Lines changed: 4 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,9 +25,9 @@ Install the package via npm
25
25
26
26

27
27
28
-
### Parsing rich text HTML to a JSON tree
28
+
### Parsing rich text HTML to an array of simplified nodes
29
29
30
-
The tool provides environment-aware (browser or Node.js) `parseHtml` function to transform HTML into an array of simplified JSON trees. Any valid HTML is parsed, including all attributes. Together with built-in transformation methods, this tool is a suitable option for processing HTML and rich text from external sources, to make it compatible with Kontent.ai rich text format. See dedicated [JSON transformer docs](docs/index.md) for further information.
30
+
The tool provides environment-aware (browser or Node.js) `parseHtml` function to transform HTML into an array of `DomNode`trees. Any valid HTML is parsed, including all attributes. Together with built-in transformation methods, this tool is a suitable option for processing HTML and rich text from external sources, to make it compatible with Kontent.ai rich text format. See dedicated [HTML transformer docs](docs/index.md) for further information.
31
31
32
32
### Portable text resolution
33
33
@@ -291,8 +291,7 @@ Package exports a `traversePortableText` method, which accepts an array of `Port
291
291
const richTextContent =
292
292
`<p>Here is an <a data-item-id="12345"><strong>internal link</strong></a> in some text.</p>`;
@@ -302,7 +301,7 @@ Package exports a `traversePortableText` method, which accepts an array of `Port
302
301
> [!IMPORTANT]
303
302
> MAPI transformation logic expects Portable Text that had been previously created from management API rich text and performs only minimal validation. It doesn't provide implicit transformation capabilities from other formats (such as delivery API).
304
303
>
305
-
> If you're interested in transforming external HTML or rich text to a MAPI compatible format, see [JSON transformer docs](docs/index.md) instead.
304
+
> If you're interested in transforming external HTML or rich text to a MAPI compatible format, see [HTML transformer docs](docs/index.md) instead.
Copy file name to clipboardExpand all lines: docs/index.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
# JSON Transformers
1
+
# HTML Transformers
2
2
3
3
This module provides an environment-aware (browser or Node.js) `parseHtml` function to convert an HTML string into an array of nodes. The resulting array can subsequently be modified by one of the provided functions and transformed back to HTML.
0 commit comments