# 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="https://1085786630-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWv5M2BoEVu0kDIV5EPs4%2Fuploads%2Fgit-blob-7657029bf32a0f2570d4cb2cebd3c54c8cbe7c80%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>
