Socket
Socket
Sign inDemoInstall

@ckeditor/ckeditor5-editor-classic

Package Overview
Dependencies
2
Maintainers
0
Versions
517
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ckeditor/ckeditor5-editor-classic


Version published
Maintainers
0
Created

Package description

What is @ckeditor/ckeditor5-editor-classic?

@ckeditor/ckeditor5-editor-classic is a classic editor build for CKEditor 5, which provides a rich text editor with a wide range of features for content creation. It is highly customizable and can be extended with various plugins to enhance its functionality.

What are @ckeditor/ckeditor5-editor-classic's main functionalities?

Basic Text Editing

This code initializes a basic instance of the classic editor, allowing users to perform standard text editing operations such as typing, formatting, and styling text.

const ClassicEditor = require('@ckeditor/ckeditor5-editor-classic/src/classiceditor');
ClassicEditor.create(document.querySelector('#editor'))
  .then(editor => {
    console.log('Editor was initialized', editor);
  })
  .catch(error => {
    console.error(error);
  });

Adding Plugins

This code demonstrates how to add plugins to the classic editor. In this example, the 'Bold' and 'Italic' plugins are added, and the toolbar is configured to include buttons for these functionalities.

const ClassicEditor = require('@ckeditor/ckeditor5-editor-classic/src/classiceditor');
const Essentials = require('@ckeditor/ckeditor5-essentials/src/essentials');
const Bold = require('@ckeditor/ckeditor5-basic-styles/src/bold');
const Italic = require('@ckeditor/ckeditor5-basic-styles/src/italic');

ClassicEditor.create(document.querySelector('#editor'), {
  plugins: [Essentials, Bold, Italic],
  toolbar: ['bold', 'italic']
})
  .then(editor => {
    console.log('Editor with plugins was initialized', editor);
  })
  .catch(error => {
    console.error(error);
  });

Customizing Toolbar

This code shows how to customize the toolbar of the classic editor. The toolbar is configured to include specific items such as 'heading', 'bold', 'italic', 'link', 'bulletedList', 'numberedList', 'undo', and 'redo'.

const ClassicEditor = require('@ckeditor/ckeditor5-editor-classic/src/classiceditor');

ClassicEditor.create(document.querySelector('#editor'), {
  toolbar: {
    items: [
      'heading',
      '|',
      'bold',
      'italic',
      'link',
      'bulletedList',
      'numberedList',
      '|',
      'undo',
      'redo'
    ]
  }
})
  .then(editor => {
    console.log('Editor with custom toolbar was initialized', editor);
  })
  .catch(error => {
    console.error(error);
  });

Other packages similar to @ckeditor/ckeditor5-editor-classic

Readme

Source

CKEditor 5 classic editor implementation

npm version Coverage Status Build Status

The classic editor implementation for CKEditor 5.

This package contains the ClassicEditor class. Follow there to learn more about this type of editor and how to initialize it.

This package contains the source version of the classic editor. This kind of editor implementation is also available as a ready-to-use classic build. Read more about CKEditor 5 predefined builds in the CKEditor 5 documentation.

Documentation

See the @ckeditor/ckeditor5-editor-classic package page in CKEditor 5 documentation.

Installation

npm install ckeditor5

License

Licensed under the terms of GNU General Public License Version 2 or later. For full details about the license, please check the LICENSE.md file or https://ckeditor.com/legal/ckeditor-oss-license.

Keywords

FAQs

Last updated on 25 Jun 2024

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc