# danog\MadelineProto\TextEntities: Class that converts HTML or markdown to a message + set of entities.

[Back to index](../../index.html)

> Author: Daniil Gentili <daniil@daniil.it>  
  

Class that converts HTML or markdown to a message + set of entities.  



## Properties
* `$message`: `string` Converted message
* `$entities`: `list<MessageEntity>` Converted entities.

## Method list:
* [`__construct(string $message, array $entities)`](#__construct)
* [`fromMarkdown(string $markdown): self`](#fromMarkdown)
* [`fromHtml(string $html): self`](#fromHtml)

## Methods:
### <a name="__construct"></a> `__construct(string $message, array $entities)`

Creates an Entities container using a message and a list of entities.


Parameters:

* `$message`: `string`   
* `$entities`: `array`   



### <a name="fromMarkdown"></a> `fromMarkdown(string $markdown): self`

Manually convert markdown to a message and a set of entities.


Parameters:

* `$markdown`: `string`   


Return value: Object containing message and entities


### <a name="fromHtml"></a> `fromHtml(string $html): self`

Manually convert HTML to a message and a set of entities.


Parameters:

* `$html`: `string`   


Return value: Object containing message and entities


---
Generated by [danog/phpdoc](https://phpdoc.daniil.it)
