Socket
Book a DemoInstallSign in
Socket

ckeditor5-direction

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ckeditor5-direction

Text direction feature for ckeditor 5.

Source
npmnpm
Version
1.0.0
Version published
Weekly downloads
69
23.21%
Maintainers
1
Weekly downloads
 
Created
Source

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/alignment';

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( ... );

Keywords

ckeditor

FAQs

Package last updated on 15 Sep 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts