> For the complete documentation index, see [llms.txt](https://docs.nedyx.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.nedyx.com/nedyx/clearlines-functions/text-functions/htmltojsontext.md).

# HTMLTOJSONTEXT

#### Syntax <a href="#syntax.14" id="syntax.14"></a>

**HTMLTOJSONTEXT**(*htmlText*)

* *htmlText* - html-formatted text which should be converted to the json text which can be used in a text widget - ***Value type**: text*

#### Remarks <a href="#remarks.11" id="remarks.11"></a>

* If it is not possible to convert *htmlText* to json, the function returns the *htmlText* as unformatted text (see example 3 below).

#### Examples

In this example, a click on th e Copy button converts the html text from the dotted widget into a json text, by using the HTMLTOJSONTEXT function. The result is then assigned to the text widget on the left, where it is displayed as a formatted text.

<figure><img src="/files/wAOhIL9dVWe5nEZjq7x4" alt=""><figcaption></figcaption></figure>
