1.0.7 • Published 2 years ago

tiptap-text-direction-extension v1.0.7

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

tiptap-text-direction-extension

Creator: neokazemi

Introduction

Adds text direction (not alignment) to Tiptap.

License

tiptap is open sourced software licensed under the MIT license.

Installation

npm install --save tiptap-text-direction-extension

Usage

import TextDirection from 'tiptap-text-direction-extension';
import { Editor } from '@tiptap/vue-2'
.
.
.
let editor = new Editor({
    extensions: [
      TextDirection
    ],
  })
}


// This is an example function that sets the paragraph direction to ltr
function ltr() {
    editor.commands.setTextDirection('ltr') //arguments: 'ltr'|'rtl'|'auto'
}