@ckeditor/ckeditor5-core 38.0.0 → 38.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ckeditor/ckeditor5-core",
3
- "version": "38.0.0",
3
+ "version": "38.1.0",
4
4
  "description": "The core architecture of CKEditor 5 – the best browser-based rich text editor.",
5
5
  "keywords": [
6
6
  "wysiwyg",
@@ -23,29 +23,10 @@
23
23
  ],
24
24
  "main": "src/index.js",
25
25
  "dependencies": {
26
- "@ckeditor/ckeditor5-engine": "^38.0.0",
27
- "@ckeditor/ckeditor5-utils": "^38.0.0",
26
+ "@ckeditor/ckeditor5-engine": "38.1.0",
27
+ "@ckeditor/ckeditor5-utils": "38.1.0",
28
28
  "lodash-es": "^4.17.15"
29
29
  },
30
- "devDependencies": {
31
- "@ckeditor/ckeditor5-autoformat": "^38.0.0",
32
- "@ckeditor/ckeditor5-basic-styles": "^38.0.0",
33
- "@ckeditor/ckeditor5-block-quote": "^38.0.0",
34
- "@ckeditor/ckeditor5-editor-classic": "^38.0.0",
35
- "@ckeditor/ckeditor5-essentials": "^38.0.0",
36
- "@ckeditor/ckeditor5-heading": "^38.0.0",
37
- "@ckeditor/ckeditor5-image": "^38.0.0",
38
- "@ckeditor/ckeditor5-indent": "^38.0.0",
39
- "@ckeditor/ckeditor5-link": "^38.0.0",
40
- "@ckeditor/ckeditor5-list": "^38.0.0",
41
- "@ckeditor/ckeditor5-media-embed": "^38.0.0",
42
- "@ckeditor/ckeditor5-paragraph": "^38.0.0",
43
- "@ckeditor/ckeditor5-table": "^38.0.0",
44
- "@ckeditor/ckeditor5-ui": "^38.0.0",
45
- "typescript": "^4.8.4",
46
- "webpack": "^5.58.1",
47
- "webpack-cli": "^4.9.0"
48
- },
49
30
  "engines": {
50
31
  "node": ">=16.0.0",
51
32
  "npm": ">=5.7.1"
@@ -67,9 +48,5 @@
67
48
  "ckeditor5-metadata.json",
68
49
  "CHANGELOG.md"
69
50
  ],
70
- "scripts": {
71
- "build": "tsc -p ./tsconfig.json",
72
- "postversion": "npm run build"
73
- },
74
51
  "types": "src/index.d.ts"
75
52
  }
@@ -446,12 +446,12 @@ export interface EditorConfig {
446
446
  * .catch( ... );
447
447
  * ```
448
448
  *
449
- * Options which can be set using the UI config:
449
+ * Options which can be set using the UI configuration:
450
450
  *
451
- * * **`ui.viewportOffset`** – The offset (in pixels) of the viewport from every direction used when positioning a sticky toolbar
452
- * or other absolutely positioned UI elements.
451
+ * * **`ui.viewportOffset`** – The offset (in pixels) of the viewport from every direction. It is
452
+ * used when positioning a sticky toolbar or other absolutely positioned UI elements.
453
453
  * Useful when a page with which the editor is being integrated has some other sticky or fixed elements
454
- * (e.g. the top menu). Thanks to setting the UI viewport offset the toolbar and other contextual balloons will not be positioned
454
+ * (e.g. the top menu). Thanks to setting the UI viewport offset, the toolbar and other contextual balloons will not be positioned
455
455
  * underneath or above the page's UI.
456
456
  *
457
457
  * ```ts
@@ -460,28 +460,28 @@ export interface EditorConfig {
460
460
  * }
461
461
  * ```
462
462
  *
463
- * **Note:** If you want to modify the viewport offset in runtime (after editor was created), you can do that by overriding
463
+ * **Note:** If you want to modify the viewport offset in runtime (after the editor was created), you can do that by overriding
464
464
  * {@link module:ui/editorui/editorui~EditorUI#viewportOffset `editor.ui.viewportOffset`}.
465
465
  *
466
- * * **`ui.poweredBy`** – The configuration of the project logo displayed over editor's editing are in open-source integrations.
467
- * It allows customizing the position of the logo to minimize the risk of collision with editor content
468
- * and UI.
466
+ * * **`ui.poweredBy`** – The configuration of the project logo displayed over the editor's editing area in
467
+ * open-source integrations. It allows customizing the position of the logo to minimize the risk of collision with the
468
+ * editor content and UI.
469
469
  *
470
470
  * The following configuration properties are supported:
471
471
  *
472
- * * **`position`** – Position of the project's logo (default: `'border'`).
473
- * * When `'inside'` the logo will be displayed within the boundaries of the editing area.
474
- * * When `'border'` the logo will be displayed over the bottom border of the editing area.
472
+ * * **`position`** – The position of the project's logo (default: `'border'`).
473
+ * * When `'inside'`, the logo will be displayed within the boundaries of the editing area.
474
+ * * When `'border'`, the logo will be displayed over the bottom border of the editing area.
475
475
  *
476
- * * **`side`** (`'left'` or `'right'`, default: `'right'`) – Allows choosing the side of the editing area the
477
- * logo will be displayed to.
476
+ * * **`side`** (`'left'` or `'right'`, default: `'right'`) – The side of the editing area where the
477
+ * logo will be displayed.
478
478
  *
479
479
  * **Note**: If {@link module:core/editor/editorconfig~EditorConfig#language `config.language`} is set to an RTL (right-to-left)
480
480
  * language, the side switches to `'left'` by default.
481
481
  *
482
- * * **`label`** (default: `'Powered by'`) – Allows changing the label displayed next to the project's logo.
482
+ * * **`label`** (default: `'Powered by'`) – The label displayed next to the project's logo.
483
483
  *
484
- * **Note**: Set the value to `null` to display the logo without a text.
484
+ * **Note**: Set the value to `null` to display the logo without any text.
485
485
  *
486
486
  * * **`verticalOffset`** (default: `5`) – The vertical distance the logo can be moved away from its default position.
487
487
  *
@@ -502,18 +502,18 @@ export interface EditorConfig {
502
502
  */
503
503
  ui?: UiConfig;
504
504
  /**
505
- * Enables updating the source element after the editor destroy.
505
+ * Enables updating the source element after the editor is destroyed.
506
506
  *
507
507
  * Enabling this option might have some security implications, as the editor doesn't have control over all data
508
508
  * in the output.
509
509
  *
510
- * Be careful, especially while using
511
- * {@glink features/markdown Markdown}, {@glink features/html/general-html-support General HTML Support} or
510
+ * Be careful, especially while using the
511
+ * {@glink features/markdown Markdown}, {@glink features/html/general-html-support General HTML Support}, or
512
512
  * {@glink features/html/html-embed HTML embed} features.
513
513
  */
514
514
  updateSourceElementOnDestroy?: boolean;
515
515
  /**
516
- * The license key for the CKEditor 5 premium features.
516
+ * The license key for the CKEditor 5 commercial license and the premium features.
517
517
  *
518
518
  * If you do not have a key yet, please [contact us](https://ckeditor.com/contact/) or
519
519
  * [order a trial](https://orders.ckeditor.com/trial/premium-features).
@@ -521,7 +521,7 @@ export interface EditorConfig {
521
521
  licenseKey?: string;
522
522
  }
523
523
  /**
524
- * The `config.initialData` option cannot be used together with initial data passed as the first parameter of
524
+ * The `config.initialData` option cannot be used together with the initial data passed as the first parameter of
525
525
  * {@link module:core/editor/editor~Editor.create `Editor.create()`}.
526
526
  *
527
527
  * @error editor-create-initial-data
@@ -532,7 +532,7 @@ export interface EditorConfig {
532
532
  * ```ts
533
533
  * ClassicEditor
534
534
  * .create( document.querySelector( '#editor' ), {
535
- * language: ... // Editor language configuration.
535
+ * language: ... // The editor language configuration.
536
536
  * } )
537
537
  * .then( editor => {
538
538
  * console.log( editor );
@@ -546,13 +546,13 @@ export interface EditorConfig {
546
546
  */
547
547
  export interface LanguageConfig {
548
548
  /**
549
- * Allows to use different language for the editor UI.
549
+ * Allows to use a different language for the editor UI.
550
550
  *
551
551
  * The language codes are defined in the [ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1) standard.
552
552
  */
553
553
  ui?: string;
554
554
  /**
555
- * Allows to use different language of the editor content.
555
+ * Allows to use a different language of the editor content.
556
556
  *
557
557
  * The language codes are defined in the [ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1) standard.
558
558
  */
@@ -570,53 +570,91 @@ export type ToolbarConfigItem = string | {
570
570
  withText?: boolean;
571
571
  tooltip?: boolean | string | ((label: string, keystroke: string | undefined) => string);
572
572
  };
573
+ /**
574
+ * The “Powered by CKEditor” logo configuration options.
575
+ **/
576
+ export interface PoweredByConfig {
577
+ /**
578
+ * The position of the project's logo.
579
+ *
580
+ * * When `'inside'`, the logo will be displayed within the boundaries of the editing area.
581
+ * * When `'border'`, the logo will be displayed over the bottom border of the editing area.
582
+ *
583
+ * @default 'border'
584
+ */
585
+ position: 'inside' | 'border';
586
+ /**
587
+ * Allows choosing the side of the editing area where the logo will be displayed.
588
+ *
589
+ * **Note:** If {@link module:core/editor/editorconfig~EditorConfig#language `config.language`} is set to an RTL (right-to-left)
590
+ * language, the side switches to `'left'` by default.
591
+ *
592
+ * @default 'right'
593
+ */
594
+ side: 'left' | 'right';
595
+ /**
596
+ * Allows changing the label displayed next to the CKEditor logo.
597
+ *
598
+ * **Note:** Set the value to `null` to hide the label.
599
+ *
600
+ * @default 'Powered by'
601
+ */
602
+ label: string | null;
603
+ /**
604
+ * The vertical distance the logo can be moved away from its default position.
605
+ *
606
+ * **Note:** If `position` is `'border'`, the offset is measured from the (vertical) center of the logo.
607
+ *
608
+ * @default 5
609
+ */
610
+ verticalOffset: number;
611
+ /**
612
+ * The horizontal distance between the side of the editing root and the nearest side of the logo.
613
+ *
614
+ * @default 5
615
+ */
616
+ horizontalOffset: number;
617
+ /**
618
+ * Allows to show the logo even if the valid commercial license is configured using
619
+ * the {@link module:core/editor/editorconfig~EditorConfig#licenseKey `config.licenseKey`} setting.
620
+ *
621
+ * @default false
622
+ */
623
+ forceVisible?: boolean;
624
+ }
625
+ /**
626
+ * The offset (in pixels) of the viewport from every direction used when positioning a sticky toolbar or other
627
+ * absolutely positioned UI elements.
628
+ */
629
+ export interface ViewportOffsetConfig {
630
+ /**
631
+ * The bottom offset in pixels.
632
+ */
633
+ bottom?: number;
634
+ /**
635
+ * The left offset in pixels.
636
+ */
637
+ left?: number;
638
+ /**
639
+ * The right offset in pixels.
640
+ */
641
+ right?: number;
642
+ /**
643
+ * The top offset in pixels.
644
+ */
645
+ top?: number;
646
+ }
573
647
  export interface UiConfig {
574
- viewportOffset?: {
575
- bottom?: number;
576
- left?: number;
577
- right?: number;
578
- top?: number;
579
- };
580
- poweredBy?: {
581
- /**
582
- * Position of the project's logo.
583
- *
584
- * * When `'inside'` the logo will be displayed within the boundaries of the editing area.
585
- * * When `'border'` the logo will be displayed over the bottom border of the editing area.
586
- *
587
- * @default 'border'
588
- */
589
- position: 'inside' | 'border';
590
- /**
591
- * Allows choosing the side of the editing area the logo will be displayed to.
592
- *
593
- * **Note:** If {@link module:core/editor/editorconfig~EditorConfig#language `config.language`} is set to an RTL (right-to-left)
594
- * language, the side switches to `'left'` by default.
595
- *
596
- * @default 'right'
597
- */
598
- side: 'left' | 'right';
599
- /**
600
- * Allows changing the label displayed next to the CKEditor logo.
601
- *
602
- * **Note:** Set the value to `null` to hide the label.
603
- *
604
- * @default 'Powered by'
605
- */
606
- label: string | null;
607
- /**
608
- * The vertical distance the logo can be moved away from its default position.
609
- *
610
- * **Note:** If `position` is `'border'`, the offset is measured from the (vertical) center of the logo.
611
- *
612
- * @default 5
613
- */
614
- verticalOffset: number;
615
- /**
616
- * The horizontal distance between the side of the editing root and the nearest side of the logo.
617
- *
618
- * @default 5
619
- */
620
- horizontalOffset: number;
621
- };
648
+ /**
649
+ * The viewport offset used for positioning various absolutely positioned UI elements.
650
+ *
651
+ * Read more in {@link module:core/editor/editorconfig~ViewportOffsetConfig}.
652
+ **/
653
+ viewportOffset?: ViewportOffsetConfig;
654
+ /**
655
+ * The configuration of the “Powered by CKEditor” logo.
656
+ *
657
+ * Read more in {@link module:core/editor/editorconfig~PoweredByConfig}.
658
+ **/
659
+ poweredBy?: PoweredByConfig;
622
660
  }
package/src/index.d.ts CHANGED
@@ -14,7 +14,7 @@ export { default as Context, type ContextConfig } from './context';
14
14
  export { default as ContextPlugin, type ContextPluginDependencies } from './contextplugin';
15
15
  export { type EditingKeystrokeCallback } from './editingkeystrokehandler';
16
16
  export { default as Editor, type EditorReadyEvent, type EditorDestroyEvent } from './editor/editor';
17
- export type { EditorConfig, LanguageConfig, ToolbarConfig, ToolbarConfigItem } from './editor/editorconfig';
17
+ export type { EditorConfig, LanguageConfig, ToolbarConfig, ToolbarConfigItem, UiConfig } from './editor/editorconfig';
18
18
  export { default as attachToForm } from './editor/utils/attachtoform';
19
19
  export { default as DataApiMixin, type DataApi } from './editor/utils/dataapimixin';
20
20
  export { default as ElementApiMixin, type ElementApi } from './editor/utils/elementapimixin';
@@ -66,7 +66,7 @@ export default class PendingActions extends ContextPlugin implements Iterable<Pe
66
66
  /**
67
67
  * @inheritDoc
68
68
  */
69
- static get pluginName(): 'PendingActions';
69
+ static get pluginName(): "PendingActions";
70
70
  /**
71
71
  * @inheritDoc
72
72
  */
@@ -96,8 +96,8 @@ export type PluginEntry<TContext> = [PluginConstructor<TContext>, PluginInterfac
96
96
  *
97
97
  * ```ts
98
98
  * class MyPlugin extends Plugin {
99
- * public static pluginName(): 'MyPlugin' {
100
- * return 'MyPlugin';
99
+ * public static pluginName() {
100
+ * return 'MyPlugin' as const;
101
101
  * }
102
102
  * }
103
103
  *
@@ -1 +1 @@
1
- <svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#a)"><path clip-rule="evenodd" d="M19 4.5 14 0H3v12.673l.868-1.041c.185-.222.4-.402.632-.54V1.5h8v5h5v7.626a2.24 2.24 0 0 1 1.5.822V4.5ZM14 5V2l3.3 3H14Zm-3.692 12.5c.062.105.133.206.213.303L11.52 19H8v-.876a2.243 2.243 0 0 0 1.82-.624h.488Zm7.518-.657a.75.75 0 0 0-1.152-.96L15.5 17.29V12H14v5.29l-1.174-1.408a.75.75 0 0 0-1.152.96l2.346 2.816a.95.95 0 0 0 1.46 0l2.346-2.815Zm-15.056-.38a.75.75 0 0 1-.096-1.056l2.346-2.815a.95.95 0 0 1 1.46 0l2.346 2.815a.75.75 0 1 1-1.152.96L6.5 14.96V20H5v-5.04l-1.174 1.408a.75.75 0 0 1-1.056.096Z"/></g><defs><clipPath id="a"><path d="M0 0h20v20H0z"/></clipPath></defs></svg>
1
+ <svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M19 4.5 14 0H3v12.673l.868-1.041c.185-.222.4-.402.632-.54V1.5h8v5h5v7.626a2.24 2.24 0 0 1 1.5.822V4.5ZM14 5V2l3.3 3H14Zm-3.692 12.5c.062.105.133.206.213.303L11.52 19H8v-.876a2.243 2.243 0 0 0 1.82-.624h.488Zm7.518-.657a.75.75 0 0 0-1.152-.96L15.5 17.29V12H14v5.29l-1.174-1.408a.75.75 0 0 0-1.152.96l2.346 2.816a.95.95 0 0 0 1.46 0l2.346-2.815Zm-15.056-.38a.75.75 0 0 1-.096-1.056l2.346-2.815a.95.95 0 0 1 1.46 0l2.346 2.815a.75.75 0 1 1-1.152.96L6.5 14.96V20H5v-5.04l-1.174 1.408a.75.75 0 0 1-1.056.096Z"/></svg>
@@ -1 +1 @@
1
- <svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#a)"><path d="M9.816 11.5 7.038 4.785 4.261 11.5h5.555Zm.62 1.5H3.641l-1.666 4.028H.312l5.789-14h1.875l5.789 14h-1.663L10.436 13Z"/><path clip-rule="evenodd" d="m12.09 17-.534-1.292.848-1.971.545 1.319L12.113 17h-.023Zm1.142-5.187.545 1.319L15.5 9.13l1.858 4.316h-3.45l.398.965h3.467L18.887 17H20l-3.873-9h-1.254l-1.641 3.813Z"/></g><defs><clipPath id="a"><path d="M0 0h20v20H0z"/></clipPath></defs></svg>
1
+ <svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M9.816 11.5 7.038 4.785 4.261 11.5h5.555Zm.62 1.5H3.641l-1.666 4.028H.312l5.789-14h1.875l5.789 14h-1.663L10.436 13Z"/><path d="m12.09 17-.534-1.292.848-1.971.545 1.319L12.113 17h-.023Zm1.142-5.187.545 1.319L15.5 9.13l1.858 4.316h-3.45l.398.965h3.467L18.887 17H20l-3.873-9h-1.254l-1.641 3.813Z"/></svg>