---
title: "Directionality plugin"
description: "Toolbar buttons for setting the left-to-right or right-to-left direction of content."
canonical_url: "https://www.tiny.cloud/docs/tinymce/latest/directionality/"
md_url: "https://www.tiny.cloud/docs/tinymce/5/directionality/index.md"
version: "5"
last_updated: "2024-04-16T01:50:26Z"
tokens: 144
---
Important This page documents TinyMCE 5. For new projects, Tiny recommends using the latest, most up-to-date version. [See TinyMCE 8 documentation](../../latest/directionality/).
# Directionality plugin

This plugin adds directionality controls to the toolbar, enabling TinyMCE to better handle languages written from right to left. It also adds a toolbar button for each of its values, `ltr` for left-to-right text and `rtl` for right-to-left text.

## Basic setup

```js
tinymce.init({
  selector: 'textarea',  // change this value according to your HTML
  plugins: 'directionality',
  toolbar: 'ltr rtl'
});
```
