@ckeditor/ckeditor5-editor-multi-root 48.0.1 → 48.1.0-alpha.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/dist/augmentation.d.ts +1 -80
- package/dist/index.d.ts +2 -1
- package/dist/index.js +41 -68
- package/dist/index.js.map +1 -1
- package/dist/multirooteditor.d.ts +3 -32
- package/package.json +5 -5
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
/**
|
|
6
6
|
* @module editor-multi-root/multirooteditor
|
|
7
7
|
*/
|
|
8
|
-
import { Editor, type EditorConfig, type RootConfig } from '@ckeditor/ckeditor5-core';
|
|
8
|
+
import { Editor, type EditorConfig, type RootConfig, type EditorRootAttributes } from '@ckeditor/ckeditor5-core';
|
|
9
9
|
import { type DecoratedMethodEvent } from '@ckeditor/ckeditor5-utils';
|
|
10
10
|
import { MultiRootEditorUI } from './multirooteditorui.js';
|
|
11
11
|
import { type ModelRootElement } from '@ckeditor/ckeditor5-engine';
|
|
@@ -36,12 +36,6 @@ export declare class MultiRootEditor extends Editor {
|
|
|
36
36
|
* The elements on which the editor has been initialized.
|
|
37
37
|
*/
|
|
38
38
|
readonly sourceElements: Record<string, HTMLElement>;
|
|
39
|
-
/**
|
|
40
|
-
* Holds attributes keys that were passed in
|
|
41
|
-
* {@link module:core/editor/editorconfig~EditorConfig#roots `config.roots.<rootName>.modelAttributes`}
|
|
42
|
-
* and should be returned by {@link #getRootsAttributes}.
|
|
43
|
-
*/
|
|
44
|
-
private readonly _registeredRootsAttributesKeys;
|
|
45
39
|
/**
|
|
46
40
|
* A set of lock IDs for enabling or disabling particular root.
|
|
47
41
|
*/
|
|
@@ -340,26 +334,7 @@ export declare class MultiRootEditor extends Editor {
|
|
|
340
334
|
*
|
|
341
335
|
* @returns Object with roots attributes. Keys are roots names, while values are attributes set on given root.
|
|
342
336
|
*/
|
|
343
|
-
getRootsAttributes(): Record<string,
|
|
344
|
-
/**
|
|
345
|
-
* Returns attributes for the specified root.
|
|
346
|
-
*
|
|
347
|
-
* Note: all and only {@link ~MultiRootEditor#registerRootAttribute registered} roots attributes will be returned.
|
|
348
|
-
* If a registered root attribute is not set for a given root, `null` will be returned.
|
|
349
|
-
*/
|
|
350
|
-
getRootAttributes(rootName: string): RootAttributes;
|
|
351
|
-
/**
|
|
352
|
-
* Registers given string as a root attribute key. Registered root attributes are added to
|
|
353
|
-
* {@link module:engine/model/schema~ModelSchema schema}, and also returned by
|
|
354
|
-
* {@link ~MultiRootEditor#getRootAttributes `getRootAttributes()`} and
|
|
355
|
-
* {@link ~MultiRootEditor#getRootsAttributes `getRootsAttributes()`}.
|
|
356
|
-
*
|
|
357
|
-
* Note: attributes passed in
|
|
358
|
-
* {@link module:core/editor/editorconfig~EditorConfig#roots `config.roots.<rootName>.modelAttributes`}
|
|
359
|
-
* are automatically registered as the editor is initialized. However, registering the same attribute twice does not have any
|
|
360
|
-
* negative impact, so it is recommended to use this method in any feature that uses roots attributes.
|
|
361
|
-
*/
|
|
362
|
-
registerRootAttribute(key: string): void;
|
|
337
|
+
getRootsAttributes(): Record<string, EditorRootAttributes>;
|
|
363
338
|
/**
|
|
364
339
|
* Switches given editor root to the read-only mode.
|
|
365
340
|
*
|
|
@@ -743,7 +718,7 @@ export type AddRootOptions = {
|
|
|
743
718
|
/**
|
|
744
719
|
* Initial attributes for the root.
|
|
745
720
|
*/
|
|
746
|
-
attributes?:
|
|
721
|
+
attributes?: EditorRootAttributes;
|
|
747
722
|
/**
|
|
748
723
|
* Element name for the root element in the model. It can be used to set different schema rules for different roots.
|
|
749
724
|
*/
|
|
@@ -770,10 +745,6 @@ export interface AddRootRootConfig extends RootConfig {
|
|
|
770
745
|
* Additional options available when loading a root.
|
|
771
746
|
*/
|
|
772
747
|
export type LoadRootOptions = Omit<AddRootOptions, 'elementName' | 'isUndoable'>;
|
|
773
|
-
/**
|
|
774
|
-
* Attributes set on a model root element.
|
|
775
|
-
*/
|
|
776
|
-
export type RootAttributes = Record<string, unknown>;
|
|
777
748
|
/**
|
|
778
749
|
* Additional options for the created editable element.
|
|
779
750
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-editor-multi-root",
|
|
3
|
-
"version": "48.0.
|
|
3
|
+
"version": "48.1.0-alpha.0",
|
|
4
4
|
"description": "Multi-root editor implementation for CKEditor 5.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"author": "CKSource (http://cksource.com/)",
|
|
@@ -25,10 +25,10 @@
|
|
|
25
25
|
"./package.json": "./package.json"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@ckeditor/ckeditor5-core": "48.0.
|
|
29
|
-
"@ckeditor/ckeditor5-engine": "48.0.
|
|
30
|
-
"@ckeditor/ckeditor5-ui": "48.0.
|
|
31
|
-
"@ckeditor/ckeditor5-utils": "48.0.
|
|
28
|
+
"@ckeditor/ckeditor5-core": "48.1.0-alpha.0",
|
|
29
|
+
"@ckeditor/ckeditor5-engine": "48.1.0-alpha.0",
|
|
30
|
+
"@ckeditor/ckeditor5-ui": "48.1.0-alpha.0",
|
|
31
|
+
"@ckeditor/ckeditor5-utils": "48.1.0-alpha.0",
|
|
32
32
|
"es-toolkit": "1.45.1"
|
|
33
33
|
},
|
|
34
34
|
"files": [
|