Skip to content

abedio/ckeditor5-direction

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CKEditor 5 text direction feature

npm version

This package implements text direction support for CKEditor 5.

Installation

To add this feature to your editor, install the ckeditor5-direction package:

npm install --save ckeditor5-direction

And add it to your plugin list and toolbar configuration:

import Direction from 'ckeditor5-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( ... );

About

Text direction feature for CKEditor 5.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published