zoroeditor5-direction

1.0.4 • Public • Published

zoroeditor 5 text direction feature

npm install --save zoroeditor5-direction

And add it to your plugin list and toolbar configuration:

import Direction from 'zoroeditor5-direction/src/direction';

ClassicEditor
    .create( document.querySelector( '#editor' ), {
        plugins: [ Direction, ... ],
        toolbar: [ 'direction', ... ]
    } )
    .then( ... )
    .catch( ... );

Use

The Direction feature enables support for text direction. You can use it to set your content direction left to right or right to left.

ClassicEditor
    .create( document.querySelector( '#editor' ), {
        toolbar: [
            'heading', '|', 'bulletedList', 'numberedList', 'undo', 'redo', 'direction'
        ]
    } )
    .then( ... )
    .catch( ... );

You can choose to use the direction dropdown ('direction') or configure the toolbar to use separate buttons for each of the options:

ClassicEditor
    .create( document.querySelector( '#editor' ), {
        toolbar: [
            'heading', '|', 'direction:ltr', 'direction:rtl'
        ]
    } )
    .then( ... )
    .catch( ... );

Package Sidebar

Install

npm i zoroeditor5-direction

Weekly Downloads

0

Version

1.0.4

License

MIT

Unpacked Size

15.4 kB

Total Files

12

Last publish

Collaborators

  • samad.s