<commit_before>---
id: advanced-topics-entities
title: Entities
layout: docs
category: Advanced Topics
next: advanced-topics-decorators
permalink: docs/advanced-topics-entities.html
---

This article discusses the Entity system, which Draft uses for annotating
ranges of text with metadata. Entities enable engineers to introduce levels of
richness beyond styled text to their editors. Links, mentions, and embedded
content can all be implemented using entities.

In the Draft repository, the
[link editor](https://github.com/facebook/draft-js/tree/master/examples/link)
and
[entity demo](https://github.com/facebook/draft-js/tree/master/examples/entity)
provide live code examples to help clarify how entities can be used, as well
as their built-in behavior.

The [Entity API Reference](/draf-js/docs/api-reference-entity.html) provides<commit_msg>[ez] Fix typo draf -> draft<commit_after>---
id: advanced-topics-entities
title: Entities
layout: docs
category: Advanced Topics
next: advanced-topics-decorators
permalink: docs/advanced-topics-entities.html
---

This article discusses the Entity system, which Draft uses for annotating
ranges of text with metadata. Entities enable engineers to introduce levels of
richness beyond styled text to their editors. Links, mentions, and embedded
content can all be implemented using entities.

In the Draft repository, the
[link editor](https://github.com/facebook/draft-js/tree/master/examples/link)
and
[entity demo](https://github.com/facebook/draft-js/tree/master/examples/entity)
provide live code examples to help clarify how entities can be used, as well
as their built-in behavior.

The [Entity API Reference](/draft-js/docs/api-reference-entity.html) provides
{'fraction_non_alphanumeric': 0.08873321657910099, 'fraction_numerical': 0.0, 'mean_word_length': 5.099644128113879, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1534200', 'n_tokens_mistral': 487, 'n_tokens_neox': 461, 'n_words': 179}