PHPackages                             danog/telegram-entities - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. danog/telegram-entities

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

danog/telegram-entities
=======================

A library to work with Telegram UTF-16 styled text entities.

1.0.5(1y ago)25255.8k↓29.4%6[4 issues](https://github.com/danog/telegram-entities/issues)[2 PRs](https://github.com/danog/telegram-entities/pulls)5Apache-2.0PHPCI failing

Since Apr 15Pushed 1y ago1 watchersCompare

[ Source](https://github.com/danog/telegram-entities)[ Packagist](https://packagist.org/packages/danog/telegram-entities)[ GitHub Sponsors](https://github.com/danog)[ RSS](/packages/danog-telegram-entities/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (6)Dependencies (10)Versions (7)Used By (5)

telegram-entities
=================

[](#telegram-entities)

[![codecov](https://camo.githubusercontent.com/0986c1e4d1e4859ed6c4f04a79afe6ccc3faf86858a6e947d8dd7bbc7f28dbf1/68747470733a2f2f636f6465636f762e696f2f67682f64616e6f672f74656c656772616d2d656e7469746965732f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://codecov.io/gh/danog/telegram-entities)[![Psalm coverage](https://camo.githubusercontent.com/145b90dd1ee99017e4e377d1c4eadc822459961a977ecd77c6cb4a08a87bef58/68747470733a2f2f73686570686572642e6465762f6769746875622f64616e6f672f74656c656772616d2d656e7469746965732f636f7665726167652e737667)](https://shepherd.dev/github/danog/telegram-entities)[![Psalm level 1](https://camo.githubusercontent.com/9c70f75f97291ecb4c4855266b48aa19fdfa2e1b68c0b242e7c698223a3c72fe/68747470733a2f2f73686570686572642e6465762f6769746875622f64616e6f672f74656c656772616d2d656e7469746965732f6c6576656c2e737667)](https://shepherd.dev/github/danog/telegram-entities)[![License](https://camo.githubusercontent.com/772f898136602ee2c93cbebabdfc290805bc80d85c910e0bd570cca2de7af005/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f64616e6f672f74656c656772616d2d656e746974696573)](https://camo.githubusercontent.com/772f898136602ee2c93cbebabdfc290805bc80d85c910e0bd570cca2de7af005/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f64616e6f672f74656c656772616d2d656e746974696573)

A library to work with Telegram UTF-16 styled text entities, created by Daniil Gentili ().

This library can be used to modify entities returned by the Telegram Bot API, convert entities to HTML or even locally generate them using a custom MarkdownV2 and HTML parser inside of the library.

This library was initially created for [MadelineProto](https://docs.madelineproto.xyz), an async PHP client API for the telegram MTProto protocol.

Installation
------------

[](#installation)

```
composer require danog/telegram-entities
```

Usage
-----

[](#usage)

```
