Skip to content

Commit 7de953f

Browse files
authored
Merge pull request #18829 from ckeditor/stable_to_master
Merge stable (v46.0.0) to master
2 parents a3e622f + db55f4b commit 7de953f

File tree

118 files changed

+2984
-1605
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

118 files changed

+2984
-1605
lines changed

CHANGELOG.md

Lines changed: 273 additions & 155 deletions
Large diffs are not rendered by default.

docs/features/feature-digest.md

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ Core editing capability provides tools to create, edit, and style content. Here
270270
</td>
271271
<td>
272272
The image feature allows adding images of various kinds to the rich
273-
content inside the editor. A large set of subfeature background-grays lets the users
273+
content inside the editor. A large set of subfeatures lets the users
274274
fully control this process. Upload or paste images, insert
275275
via URL, use responsive images, resize images, add captions, set
276276
different image styles, and link images.
@@ -378,6 +378,20 @@ Core editing capability provides tools to create, edit, and style content. Here
378378
the image load much faster and saves bandwidth.
379379
</td>
380380
</tr>
381+
<tr id="line-height" class="feature">
382+
<td>
383+
<span>
384+
{@link features/line-height Line height
385+
<span class="tree__item__badge tree__item__badge_premium" data-badge-tooltip="Premium feature">
386+
<span class="tree__item__badge__text">Premium feature</span></span>
387+
}
388+
</span>
389+
</td>
390+
<td>
391+
The line height feature lets you adjust the vertical spacing between lines of text,
392+
controlling how tightly or loosely text is packed within paragraphs.
393+
</td>
394+
</tr>
381395
<tr id="links" class="feature">
382396
<td>
383397
{@link features/link Links}
@@ -402,7 +416,9 @@ Core editing capability provides tools to create, edit, and style content. Here
402416
</tr>
403417
<tr id="list-indentation" class="subfeature background-gray">
404418
<td>
405-
{@link features/lists-editing#indenting-lists List indentation}
419+
<span>
420+
<span class="subfeature-icon"></span>&nbsp;{@link features/lists-editing#indenting-lists List indentation}
421+
</span>
406422
</td>
407423
<td>
408424
Besides controlling
@@ -1966,7 +1982,9 @@ Customize your editor even further. Use components and helpers from our UI libra
19661982
</tr>
19671983
<tr id="custom-components" class="subfeature background-gray">
19681984
<td>
1969-
{@link features/custom-components Custom Widgets and Components}
1985+
<span>
1986+
<span class="subfeature-icon"></span>&nbsp;{@link features/custom-components Custom Widgets and Components}
1987+
</span>
19701988
</td>
19711989
<td>
19721990
Build custom interactive components using CKEditor 5's widget system. Create block widgets, inline elements, external data integrations, and framework components (React, Vue, Angular) that seamlessly integrate with the editor's content model and UI.

docs/getting-started/integrations-cdn/angular.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ export class MyComponent {
143143
public editorData;
144144

145145
private _setupEditor( cloud ) {
146-
this.editorData = '<p>Hello, world!</p>';
146+
this.editorData = '<p>Hello, world!</p>';
147147
}
148148
// ...
149149
}
@@ -175,10 +175,10 @@ export class MyComponent {
175175
public isDisabled;
176176
// ...
177177
private _setupEditor( cloud ) {
178-
this.isDisabled = false;
178+
this.isDisabled = false;
179179
}
180180
toggleDisabled() {
181-
this.isDisabled = !this.isDisabled
181+
this.isDisabled = !this.isDisabled;
182182
}
183183
}
184184
```
@@ -275,7 +275,7 @@ export class MyComponent {
275275

276276
Allows disabling the two-way data binding mechanism. The default value is `false`.
277277

278-
The reason for the introduction of this option are performance issues in large documents. By default, while using the `ngModel` directive, whenever the editor's data is changed, the component must synchronize the data between the editor instance and the connected property. This results in calling the {@link module:core/editor/editor~Editor#getData `editor.getData()`} function, which causes a massive slowdown while typing in large documents.
278+
The reason for the introduction of this option is performance issues in large documents. By default, while using the `ngModel` directive, whenever the editor's data is changed, the component must synchronize the data between the editor instance and the connected property. This results in calling the {@link module:core/editor/editor~Editor#getData `editor.getData()`} function, which causes a massive slowdown while typing in large documents.
279279

280280
This option allows the integrator to disable the default behavior and only call the {@link module:core/editor/editor~Editor#getData `editor.getData()`} method on demand, which prevents the slowdowns. You can read more in the [relevant issue](https://github.com/ckeditor/ckeditor5-angular/issues/141).
281281

@@ -288,7 +288,7 @@ The following `@Output` properties are supported by the CKEditor&nbsp;5 rich tex
288288
Fired when the editor is ready. It corresponds with the [`editor#ready`](https://ckeditor.com/docs/ckeditor5/latest/api/module_core_editor_editor-Editor.html#event-ready) event.
289289
It is fired with the editor instance.
290290

291-
Note that this method might be called multiple times. Apart from initialization, it is also called whenever the editor is restarted after a crash. Do not keep the reference to the editor instance internally, because it will change in case of restart. Instead, you should use `watchdog.editor` property.
291+
Note that this method might be called multiple times. Apart from initialization, it is also called whenever the editor is restarted after a crash. Do not keep the reference to the editor instance internally, because it will change in case of a restart. Instead, you should use the `watchdog.editor` property.
292292

293293
### `change`
294294

@@ -338,7 +338,7 @@ It is fired with an object containing the editor and the CKEditor&nbsp;5 `focus`
338338

339339
### `error`
340340

341-
Fired when the editor crashes. Once the editor is crashed, the internal watchdog mechanism restarts the editor and fires the [ready](#ready) event.
341+
Fired when the editor crashes. Once the editor has crashed, the internal watchdog mechanism restarts the editor and fires the [ready](#ready) event.
342342

343343
<info-box>
344344
Prior to ckeditor5-angular `v7.0.1`, this event was not fired for crashes during the editor initialization.
@@ -388,7 +388,7 @@ First, create a (S)CSS file in the parent component's directory and style the gi
388388
}
389389
```
390390

391-
Then in the parent component add the relative path to the above style sheet:
391+
Then, in the parent component, add the relative path to the above style sheet:
392392

393393
```ts
394394
/* src/app/app.component.ts */
@@ -411,7 +411,7 @@ To style the component using a global style sheet, first, create it:
411411
}
412412
```
413413

414-
Then, add it in the `angular.json` configuration file:
414+
Then, add it to the `angular.json` configuration file:
415415

416416
```json
417417
"architect": {
@@ -448,7 +448,7 @@ export class MyComponent {
448448

449449
### Accessing the editor instance
450450

451-
The CKEditor&nbsp;5 rich text editor component provides all the functionality needed for most use cases. When access to the full CKEditor&nbsp;5 API is needed you can get the editor instance with an additional step.
451+
The CKEditor&nbsp;5 rich text editor component provides all the functionality needed for most use cases. When access to the full CKEditor&nbsp;5 API is needed, you can get the editor instance with an additional step.
452452

453453
To do this, create a template reference variable `#editor` pointing to the `<ckeditor>` component:
454454

@@ -472,7 +472,7 @@ export class MyComponent {
472472
```
473473

474474
<info-box>
475-
The editor creation is asynchronous so the `editorInstance` will not be available until the editor is created. If you want to make changes to an editor that has just been created, a better option would be getting the CKEditor&nbsp;5 instance on the [`ready`](#ready) event.
475+
The editor creation is asynchronous, so the `editorInstance` will not be available until the editor is created. If you want to make changes to an editor that has just been created, a better option would be getting the CKEditor&nbsp;5 instance on the [`ready`](#ready) event.
476476
</info-box>
477477

478478
## How to?
@@ -562,7 +562,7 @@ We provide a few **ready-to-use integrations** featuring collaborative editing i
562562
* [CKEditor&nbsp;5 with the revision history feature](https://github.com/ckeditor/ckeditor5-collaboration-samples/tree/master/revision-history-for-angular)
563563
* [CKEditor&nbsp;5 with the track changes feature](https://github.com/ckeditor/ckeditor5-collaboration-samples/tree/master/track-changes-for-angular)
564564

565-
It is not mandatory to build applications on top of the above samples, however, they should help you get started.
565+
It is not mandatory to build applications on top of the above samples; however, they should help you get started.
566566

567567
### Localization
568568

@@ -692,7 +692,7 @@ All available Angular versions are [listed on npm](https://www.npmjs.com/package
692692

693693
## Contributing and reporting issues
694694

695-
The source code of the CKEditor&nbsp;5 rich text editor component for Angular is available on GitHub in [https://github.com/ckeditor/ckeditor5-angular](https://github.com/ckeditor/ckeditor5-angular).
695+
The source code of the CKEditor&nbsp;5 rich text editor component for Angular is available on GitHub at [https://github.com/ckeditor/ckeditor5-angular](https://github.com/ckeditor/ckeditor5-angular).
696696

697697
## Next steps
698698

docs/getting-started/integrations/angular.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ import { AppComponent } from './app.component';
123123
export class AppModule { }
124124
```
125125

126-
Then, import the editor in your Angular component and assign it to a `public` property to make it accessible from the template. The below example shows how to use the component with open-source and premium plugins.
126+
Then, import the editor into your Angular component and assign it to a `public` property to make it accessible from the template. The example below shows how to use the component with open-source and premium plugins.
127127

128128
<info-box>
129129
Starting from version 44.0.0, the `licenseKey` property is required to use the editor. If you use a self-hosted editor from npm:
@@ -159,7 +159,7 @@ export class AppComponent {
159159
}
160160
```
161161

162-
Depending on the plugins you used, you may need to import the first or both CSS files. Angular, by default, scope styles to a particular component. Because of that, the editor may not detect attached styles. You must set the encapsulation option to `ViewEncapsulation.None` to turn this scoping off.
162+
Depending on the plugins you used, you may need to import the first or both CSS files. Angular, by default, scopes styles to a particular component. That's why the editor may not detect attached styles. You must set the encapsulation option to `ViewEncapsulation.None` to turn this scoping off.
163163

164164
```css
165165
/* app.component.css */
@@ -318,7 +318,7 @@ export class MyComponent {
318318

319319
Allows disabling the two-way data binding mechanism. The default value is `false`.
320320

321-
The reason for the introduction of this option are performance issues in large documents. By default, while using the `ngModel` directive, whenever the editor's data is changed, the component must synchronize the data between the editor instance and the connected property. This results in calling the {@link module:core/editor/editor~Editor#getData `editor.getData()`} function, which causes a massive slowdown while typing in large documents.
321+
We introduced this option to address performance issues in large documents. By default, while using the `ngModel` directive, whenever the editor's data is changed, the component must synchronize the data between the editor instance and the connected property. This results in calling the {@link module:core/editor/editor~Editor#getData `editor.getData()`} function, which causes a massive slowdown while typing in large documents.
322322

323323
This option allows the integrator to disable the default behavior and only call the {@link module:core/editor/editor~Editor#getData `editor.getData()`} method on demand, which prevents the slowdowns. You can read more in the [relevant issue](https://github.com/ckeditor/ckeditor5-angular/issues/141).
324324

@@ -331,7 +331,7 @@ The following `@Output` properties are supported by the CKEditor&nbsp;5 rich tex
331331
Fired when the editor is ready. It corresponds with the [`editor#ready`](https://ckeditor.com/docs/ckeditor5/latest/api/module_core_editor_editor-Editor.html#event-ready) event.
332332
It is fired with the editor instance.
333333

334-
Note that this method might be called multiple times. Apart from initialization, it is also called whenever the editor is restarted after a crash. Do not keep the reference to the editor instance internally, because it will change in case of restart. Instead, you should use `watchdog.editor` property.
334+
Note that this method might be called multiple times. Apart from initialization, it is also called whenever the editor is restarted after a crash. Do not keep the reference to the editor instance internally, because it will change in case of a restart. Instead, you should use the `watchdog.editor` property.
335335

336336
### `change`
337337

@@ -373,7 +373,7 @@ It is fired with an object containing the editor and the CKEditor&nbsp;5 `focus`
373373

374374
### `error`
375375

376-
Fired when the editor crashes. Once the editor is crashed, the internal watchdog mechanism restarts the editor and fires the [ready](#ready) event.
376+
Fired when the editor crashes. Once the editor has crashed, the internal watchdog mechanism restarts the editor and fires the [ready](#ready) event.
377377

378378
<info-box>
379379
Prior to ckeditor5-angular `v7.0.1`, this event was not fired for crashes during the editor initialization.
@@ -419,7 +419,7 @@ First, create a (S)CSS file in the parent component's directory and style the gi
419419
}
420420
```
421421

422-
Then in the parent component add the relative path to the above style sheet:
422+
Then, in the parent component, add the relative path to the above style sheet:
423423

424424
```ts
425425
/* src/app/app.component.ts */
@@ -442,7 +442,7 @@ To style the component using a global style sheet, first, create it:
442442
}
443443
```
444444

445-
Then, add it in the `angular.json` configuration file:
445+
Then, add it to the `angular.json` configuration file:
446446

447447
```json
448448
"architect": {
@@ -458,7 +458,7 @@ Then, add it in the `angular.json` configuration file:
458458

459459
#### Setting the placeholder
460460

461-
To display {@link features/editor-placeholder the placeholder} in the main editable element, set the `placeholder` field in the CKEditor&nbsp;5 rich text editor component configuration:
461+
To display the {@link features/editor-placeholder placeholder} in the main editable element, set the `placeholder` field in the CKEditor&nbsp;5 rich text editor component configuration:
462462

463463
```ts
464464
@Component( {
@@ -681,7 +681,7 @@ beforeAll( () => {
681681
} );
682682
```
683683

684-
These mocks should be placed before the tests that use CKEditor&nbsp;5. They are imperfect and may not cover all the cases, but they should be sufficient for basic initialization and rendering editor. Keep in mind that they are not a replacement for proper browser testing.
684+
These mocks should be placed before the tests that use CKEditor&nbsp;5. They are imperfect and may not cover all the cases, but they should be sufficient for basic initialization and rendering the editor. Keep in mind that they are not a replacement for proper browser testing.
685685

686686
## Supported Angular versions
687687

@@ -759,7 +759,7 @@ All available Angular versions are [listed on npm](https://www.npmjs.com/package
759759

760760
## Contributing and reporting issues
761761

762-
The source code of the CKEditor&nbsp;5 rich text editor component for Angular is available on GitHub in [https://github.com/ckeditor/ckeditor5-angular](https://github.com/ckeditor/ckeditor5-angular).
762+
The source code of the CKEditor&nbsp;5 rich text editor component for Angular is available on GitHub at [https://github.com/ckeditor/ckeditor5-angular](https://github.com/ckeditor/ckeditor5-angular).
763763

764764
## Next steps
765765

docs/getting-started/setup/csp.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ Some CSP directives have an impact on certain rich-text editor features. Here is
4949
* `style-src 'self' 'unsafe-inline'`:
5050
* The `self` directive allows to load styles from the site's own domain. Since v42.0.0, the editor {@link getting-started/setup/css distributes its stylesheets}. If you need to load styles from some other domain, add them explicitly: `style-src https://trusted-styles.example.com;`.
5151
* The directive `unsafe-inline` is required to make the styles of certain features work properly. For instance, you are going to need it if you want to enable such editor features as {@link features/font font} or {@link features/text-alignment text alignment} or any other feature that uses the inline `style="..."` attributes in the content.
52+
53+
**Note**: Inline styles are also required when using {@link features/lists#list-item-marker-formatting list item marker formatting}. For example, if you apply font color, size, or family to list markers, the editor uses inline style attributes to render them. Because of this, `unsafe-inline` must be allowed for the styles to display correctly.
54+
5255
* `frame-src *`: Necessary for the {@link features/media-embed media embed} feature to load media with previews (containing `<iframe>`).
5356

5457
**Note**: Use the more strict `frame-src 'self'` if all the media in the edited content come from the same domain as your application.

docs/tutorials/widgets/implementing-a-block-widget.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ Once you have the converters, you can try to see the simple box in action. You h
331331
</section>
332332
</div>
333333

334-
<script src="dist/bundle.js"></script>
334+
<script type="module" src="./main.js"></script>
335335
</body>
336336
</html>
337337
```
@@ -536,10 +536,6 @@ export default class SimpleBoxEditing extends Plugin {
536536
}
537537
```
538538

539-
<info-box>
540-
As you can see, the code became much more verbose and far longer. This is because you used lower-level converters. We plan to provide more handy widget conversion utilities in the future. Read more (and 👍) in [this ticket](https://github.com/ckeditor/ckeditor5/issues/1228).
541-
</info-box>
542-
543539
### Behavior after turning simple box into a widget
544540

545541
Now, you should see how your simple box plugin has changed.
@@ -825,7 +821,7 @@ npm run dev
825821

826822
If you want to use the editor from CDN, you can adapt this tutorial by following these steps.
827823

828-
First, clone the repository the same way as before. But do not install the dependencies. Instead, open the `index.html` file and add the following tags:
824+
First, clone the repository the same way as before. **But do not install the dependencies.** Instead, open the `index.html` file and add the following tags:
829825

830826
```html
831827
<!DOCTYPE html>

docs/tutorials/widgets/implementing-an-inline-widget.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ meta-description: Discover how to create a custom inline widget in CKEditor 5 wi
99

1010
In this tutorial, you will learn how to implement an inline widget. You will build a "placeholder" feature that allows the users to insert predefined placeholders, like a date or a surname, into the document.
1111

12-
<info-box warning>
12+
<info-box>
1313
**We have an official implementation of this feature!**
1414

1515
While this tutorial was created for learning purposes, it only offers a basic, simplified solution. We have an official implementation of this mechanism, called the {@link features/merge-fields merge fields} feature. It is much more robust than the solution presented here, and offers many configuration options.
@@ -633,7 +633,7 @@ npm run dev
633633

634634
If you want to use the editor from CDN, you can adapt this tutorial by following these steps.
635635

636-
First, clone the repository the same way as before. But do not install the dependencies. Instead, open the `index.html` file and add the following tags:
636+
First, clone the repository the same way as before. **But do not install the dependencies.** Instead, open the `index.html` file and add the following tags:
637637

638638
```html
639639
<!DOCTYPE html>

docs/umberto.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
"api/module_html-embed_updatehtmlembedcommand.html": "api/module_html-embed_htmlembedcommand.html",
4949
"api/module_html-embed_updatehtmlembedcommand-UpdateHtmlEmbedCommand.html": "api/module_html-embed_htmlembedcommand-HtmlEmbedCommand.html",
5050
"api/module_link_utils-ManualDecorator.html": "api/module_link_utils_manualdecorator-LinkManualDecorator.html",
51-
"api/module_link_utils-AutomaticDecorators.html": "api/module_link_utils_automaticdecorators-AutomaticDecorators.html",
51+
"api/module_link_utils-AutomaticDecorators.html": "api/module_link_utils_automaticdecorators-AutomaticLinkDecorators.html",
5252
"api/module_list_checktodolistcommand.html": "api/module_list_todolist_checktodolistcommand.html",
5353
"api/module_list_checktodolistcommand-CheckTodoListCommand.html": "api/module_list_todolist_checktodolistcommand-CheckTodoListCommand.html",
5454
"api/module_list_converters.html": "api/module_list_list_converters.html",

0 commit comments

Comments
 (0)