Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@ckeditor/ckeditor5-core

Package Overview
Dependencies
Maintainers
1
Versions
756
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ckeditor/ckeditor5-core

The core architecture of CKEditor 5 – the best browser-based rich text editor.

  • 44.0.0-alpha.8
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1M
increased by14.02%
Maintainers
1
Weekly downloads
 
Created

What is @ckeditor/ckeditor5-core?

@ckeditor/ckeditor5-core is a core package for CKEditor 5, a modern JavaScript rich text editor. It provides essential functionalities and utilities for building and customizing CKEditor 5 editors.

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

Editor Creation

This feature allows you to create and initialize a CKEditor 5 instance. The code sample demonstrates how to create a classic editor and attach it to a DOM element.

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

ClassicEditor.create(document.querySelector('#editor'))
    .then(editor => {
        console.log('Editor was initialized', editor);
    })
    .catch(error => {
        console.error(error.stack);
    });

Plugin Management

This feature allows you to create and manage plugins for CKEditor 5. The code sample demonstrates how to create a custom plugin and include it in the editor configuration.

const Plugin = require('@ckeditor/ckeditor5-core/src/plugin');

class MyPlugin extends Plugin {
    init() {
        console.log('MyPlugin was initialized');
    }
}

ClassicEditor.create(document.querySelector('#editor'), {
    plugins: [ MyPlugin ]
})
.then(editor => {
    console.log('Editor with MyPlugin was initialized', editor);
})
.catch(error => {
    console.error(error.stack);
});

Command Management

This feature allows you to create and manage commands in CKEditor 5. The code sample demonstrates how to create a custom command and execute it within the editor.

const Command = require('@ckeditor/ckeditor5-core/src/command');

class MyCommand extends Command {
    execute() {
        console.log('MyCommand executed');
    }
}

ClassicEditor.create(document.querySelector('#editor'))
    .then(editor => {
        editor.commands.add('myCommand', new MyCommand(editor));
        editor.execute('myCommand');
    })
    .catch(error => {
        console.error(error.stack);
    });

Other packages similar to @ckeditor/ckeditor5-core

Keywords

FAQs

Package last updated on 28 Nov 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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc