WebSafe 3.7github.com
|
|
🏠
Skip to content

Commit 5640379

Browse files
authored
Merge stable into master
2 parents 568e0d0 + e4fcceb commit 5640379

File tree

3 files changed

+12
-11
lines changed

3 files changed

+12
-11
lines changed
101 KB
Loading
-212 KB
Binary file not shown.

docs/framework/architecture/editing-engine.md

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
category: framework-architecture
33
meta-title: Editing engine | CKEditor 5 Framework Documentation
44
order: 30
5-
modified_at: 2026-01-30
5+
modified_at: 2026-02-18
66
---
77

88
# Editing engine
@@ -17,15 +17,16 @@ The [`@ckeditor/ckeditor5-engine`](https://www.npmjs.com/package/@ckeditor/ckedi
1717

1818
The editing engine uses a Model-View-Controller (MVC) architecture. While the engine does not enforce a specific structure, most implementations follow this pattern:
1919

20-
[{@img assets/img/framework-architecture-engine-diagram.png Diagram of the engine's MVC architecture.}](%BASE_PATH%/assets/img/framework-architecture-engine-diagram.png)
20+
{@img assets/img/editing-engine-diagram.png 1800 Diagram of the engine's MVC architecture.}
2121

2222
The architecture has three layers: **model**, **controller**, and **view**. There is one **model document** that gets **converted** into two separate views: the **editing view** and the **data view**. These views represent different things:
23-
* The editing view shows the content users see in the browser and interact with
24-
* The data view handles the editor's input and output data in a format the data processor understands
23+
24+
* The editing view shows the content users see in the browser and interact with.
25+
* The data view handles the editor's input and output data in a format the data processor understands.
2526

2627
Both views use virtual DOM structures (custom, DOM-like structures) that converters and features work with. These structures are then **rendered** to the actual DOM.
2728

28-
The green blocks in the diagram represent code from editor features (plugins). Features control what changes happen to the model, how those changes convert to the view, and how the model updates based on events.
29+
The deep blue blocks in the diagram represent code from editor features (plugins). Features control what changes happen to the model, how those changes convert to the view, and how the model updates based on events.
2930

3031
Let's explore each layer separately.
3132

@@ -209,7 +210,7 @@ Access the schema instance at {@link module:engine/model/model~Model#schema `edi
209210

210211
Let's look at the editing engine's architecture again:
211212

212-
[{@img assets/img/framework-architecture-engine-diagram.png Diagram of the engine's MVC architecture.}](%BASE_PATH%/assets/img/framework-architecture-engine-diagram.png)
213+
{@img assets/img/editing-engine-diagram.png 1800 Diagram of the engine's MVC architecture.}
213214

214215
We have discussed the topmost layer – the model. The model layer creates an abstraction over the data. Its format was designed to allow storing and modifying data conveniently while enabling complex features. Most features operate on the model (reading from it and changing it).
215216

@@ -370,21 +371,21 @@ We have talked about the model and the view as two completely independent subsys
370371

371372
Let's look at the diagram of the engine's MVC architecture and see where each conversion process happens:
372373

373-
[{@img assets/img/framework-architecture-engine-diagram.png Diagram of the engine's MVC architecture.}](%BASE_PATH%/assets/img/framework-architecture-engine-diagram.png)
374+
{@img assets/img/editing-engine-diagram.png 1800 Diagram of the engine's MVC architecture.}
374375

375376
### Data pipeline
376377

377-
{@link framework/deep-dive/conversion/upcast **Data upcasting**} is a process that starts in the bottom-right corner of the diagram (in the view layer), passes from the data view through a converter (green box) in the controller layer to the model document in the top-right corner. As you can see, it goes from bottom to top, hence "upcasting." Also, it is handled by the data pipeline (the right branch of the diagram), hence "data upcasting." Note that data upcasting is also used to process pasted content (which is similar to loading data).
378+
{@link framework/deep-dive/conversion/upcast **Data upcasting**} is a process that starts in the bottom-left corner of the diagram (in the view layer), passes from the data view through a converter in the controller layer to the model document in the top. As you can see, it goes from bottom to top, hence "upcasting." Furthermore, it is handled by the data pipeline, hence "data upcasting." Note that data upcasting is also used to process pasted content (which is similar to loading data).
378379

379-
{@link framework/deep-dive/conversion/downcast#downcast-pipelines **Data downcasting**} is the opposite process to data upcasting. It starts in the top-right corner and goes down to the bottom-right corner. Again, the conversion process name matches the direction and the pipeline.
380+
{@link framework/deep-dive/conversion/downcast#downcast-pipelines **Data downcasting**} is the opposite process to data upcasting. It starts at the top and goes down to the bottom-left corner. Again, the conversion process name matches the direction and the pipeline.
380381

381382
### Editing pipeline
382383

383384
{@link framework/deep-dive/conversion/downcast#downcast-pipelines **Editing downcasting**} is a bit different from the other two processes:
384385

385-
* It takes place in the "editing pipeline" (the left branch of the diagram).
386+
* It takes place in the "editing pipeline" (the right branch of the diagram).
386387
* It does not have a counterpart. Editing upcasting does not exist because editor features listen to [view events](#observers), analyze what has happened, and apply necessary changes to the model whenever users perform actions. Therefore, this process does not involve conversion.
387-
* Unlike {@link module:engine/controller/datacontroller~DataController} (which handles the *data pipeline*), {@link module:engine/controller/editingcontroller~EditingController} maintains a single instance of the {@link module:engine/view/document~ViewDocument} for its entire life. Every change in the model is converted to changes in that view so changes in that view can then be rendered to the DOM (if needed – that is, if the DOM actually differs from the view at this stage).
388+
* Unlike {@link module:engine/controller/datacontroller~DataController} (which handles the *data pipeline*), {@link module:engine/controller/editingcontroller~EditingController} maintains a single instance of the {@link module:engine/view/document~ViewDocument} for its entire life. Every change in the model is converted to changes in that view, so changes in that view can then be rendered to the DOM (if needed – that is, if the DOM actually differs from the view at this stage).
388389

389390
### More information
390391

0 commit comments

Comments
 (0)