Search code examples
reactjstypescriptquillreact-quill

How to add right-to-left support with react-quill


We're using react-quill for a rich text editor, and we need to add rtl support. Any idea of how to do it?

We're building with typescript.


Solution

  • You can also achieve the same thing with CSS only and you don't need to switch between LTR to RTL by clicking on the option.

    Here is the CSS style that target's editor's text area and change the direction of text:

    .ql-editor {
      direction: rtl;
      text-align: right;
    }