@rickx/ckeditor5-line-height
TypeScript icon, indicating that this package has built-in type declarations

41.3.1 • Public • Published

ckeditor5-line-height

The line height plugin for ckeditor5.

Quick start

First, install the build from npm:

pnpm i @rickx/ckeditor5-line-height
# or
yarn add @rickx/ckeditor5-line-height
# or
npm i @rickx/ckeditor5-line-height

Use it in your application:

import { LineHeight } from '@rickx/ckeditor5-line-height'

Add it to your editor:

ClassicEditor
  .create(document.querySelector('#editor'), {
    plugins: [
      /* ..., */
      LineHeight, // add it to your plugins array
    ],
    lineHeight: {
      // specify your otions in the lineHeight config object.
      // Default values are ['default', 1, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 2, 2.5]
      options: [
        1.2,
        1.5,
        'default',
        '14px',
        '16px',
        '18px',
        {
          title: 'Normal',
          model: '1',
        },
        {
          title: 'Huge',
          model: '36px'
        },
      ],
    },
    toolbar: [
      /* ..., */
      'lineHeight', // add the button to your toolbar
    ],
  })
  .then(/* ... */)
  .catch(/* ... */)

License

Licensed under the terms of GNU General Public License Version 2 or later.

Readme

Keywords

none

Package Sidebar

Install

npm i @rickx/ckeditor5-line-height

Weekly Downloads

2

Version

41.3.1

License

GPL-2.0-or-later

Unpacked Size

70.9 kB

Total Files

33

Last publish

Collaborators

  • rickx81