Socket
Socket
Sign inDemoInstall

@ckeditor/ckeditor5-engine

Package Overview
Dependencies
2
Maintainers
1
Versions
509
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @ckeditor/ckeditor5-engine

The editing engine of CKEditor 5 – the best browser-based rich text editor.


Version published
Weekly downloads
615K
increased by11.74%
Maintainers
1
Created
Weekly downloads
 

Package description

What is @ckeditor/ckeditor5-engine?

@ckeditor/ckeditor5-engine is a core package of CKEditor 5, a modern JavaScript rich text editor. This package provides the engine that powers the editor, including the data model, editing view, and rendering process. It is highly modular and extensible, allowing developers to create custom editing experiences.

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

Creating a Document

This feature allows you to create a new document instance, which is the core of the editing engine. The document holds the data model and manages the editing operations.

const { Document } = require('@ckeditor/ckeditor5-engine');
const doc = new Document();
console.log(doc);

Adding a Root Element

This feature allows you to add a root element to the document. The root element is the top-level container for the document's content.

const { Document } = require('@ckeditor/ckeditor5-engine');
const doc = new Document();
const root = doc.createRoot();
console.log(root);

Inserting Text

This feature allows you to insert text into the document. The Writer class is used to perform editing operations on the document.

const { Document, Writer } = require('@ckeditor/ckeditor5-engine');
const doc = new Document();
const root = doc.createRoot();
const writer = new Writer();
writer.insertText('Hello, world!', root);
console.log(root);

Listening to Changes

This feature allows you to listen to changes in the document. The document emits events whenever its content is modified, enabling you to react to these changes.

const { Document } = require('@ckeditor/ckeditor5-engine');
const doc = new Document();
doc.on('change', (event, batch) => {
  console.log('Document changed:', batch);
});

Other packages similar to @ckeditor/ckeditor5-engine

Readme

Source

CKEditor 5 editing engine

npm version Coverage Status Build Status

The CKEditor 5 editing engine implements a flexible MVC-based architecture for creating rich text editing features.

Architecture overview

  • Custom data model. CKEditor 5 implements a tree-structured custom data model, designed to fit multiple requirements such as enabling real-time collaboration and complex editing features (like tables or nested blocks).
  • Virtual DOM. CKEditor 5's editing engine features a custom, editing-oriented virtual DOM implementation that aims to hide browser quirks from your sight. No more contentEditable nightmares!
  • Real-time collaborative editing. The editor implements Operational Transformation for the tree-structured model as well as many other mechanisms which were required to create a seamless collaborative UX. Additionally, we provide cloud infrastructure and plugins enabling real-time collaborative editing in your application! Check the collaboration demo.
  • Extensible. The entire editor architecture was designed for maximum flexibility. The code is event-based and highly decoupled, allowing you to plug in or replace selected pieces. Features do not directly depend on each other and communicate in standardized ways.
  • Schema-less core. The core makes minimal assumptions and can be controlled through the schema. This leaves all decisions to plugins and to you.
  • Modular architecture. Not only can the core modules be reused and recomposed but even the features were implemented in a highly granular way. Feel like running a headless CKEditor 5 with a couple of features in Node.js? Not a problem!
  • Framework for building rich-text editors. Every use case is different and every editor needs to fulfill different goals. Therefore, we give you the freedom to create your own editors with custom-tailored features and UI.
  • Heavily tested from day one. CKEditor 5 comes with 3x more tests than React itself. All packages have 100% code coverage.
  • 8+ years of support. It is not yet another framework to be gone next year or a hyped proof-of-concept to fail in a real-life scenario. We have over 15 years of experience in creating rich text editors and invested over 4 years in designing and building your next future-proof rich text editor of choice.

Documentation

For a general introduction see the Overview of CKEditor 5 Framework guide and then the Editing engine architecture guide.

Additionally, refer to the @ckeditor/ckeditor5-engine package page in CKEditor 5 documentation for even more information.

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 14 Jun 2024

Did you know?

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