@ckeditor/ckeditor5-document-outline 48.2.0 → 48.3.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 +31 -31
- package/dist/documentoutline/documentoutlineui.d.ts +43 -43
- package/dist/documentoutline/documentoutlineutils.d.ts +58 -60
- package/dist/documentoutline/ui/documentoutlineitemview.d.ts +43 -43
- package/dist/documentoutline/ui/documentoutlineview.d.ts +49 -49
- package/dist/documentoutline/utils.d.ts +11 -11
- package/dist/documentoutline.d.ts +91 -91
- package/dist/index.d.ts +14 -14
- package/dist/index.js +1 -1
- package/dist/legacyerrors.d.ts +0 -4
- package/dist/tableofcontents/headingid.d.ts +22 -22
- package/dist/tableofcontents/tableofcontentscommand.d.ts +17 -17
- package/dist/tableofcontents/tableofcontentsediting.d.ts +40 -40
- package/dist/tableofcontents/tableofcontentsui.d.ts +23 -23
- package/dist/tableofcontents.d.ts +68 -68
- package/dist/translations/af.js +1 -1
- package/dist/translations/af.umd.js +1 -1
- package/dist/translations/ar.js +1 -1
- package/dist/translations/ar.umd.js +1 -1
- package/dist/translations/ast.js +1 -1
- package/dist/translations/ast.umd.js +1 -1
- package/dist/translations/az.js +1 -1
- package/dist/translations/az.umd.js +1 -1
- package/dist/translations/be.js +1 -1
- package/dist/translations/be.umd.js +1 -1
- package/dist/translations/bg.js +1 -1
- package/dist/translations/bg.umd.js +1 -1
- package/dist/translations/bn.js +1 -1
- package/dist/translations/bn.umd.js +1 -1
- package/dist/translations/bs.js +1 -1
- package/dist/translations/bs.umd.js +1 -1
- package/dist/translations/ca.js +1 -1
- package/dist/translations/ca.umd.js +1 -1
- package/dist/translations/cs.js +1 -1
- package/dist/translations/cs.umd.js +1 -1
- package/dist/translations/da.js +1 -1
- package/dist/translations/da.umd.js +1 -1
- package/dist/translations/de-ch.js +1 -1
- package/dist/translations/de-ch.umd.js +1 -1
- package/dist/translations/de.js +1 -1
- package/dist/translations/de.umd.js +1 -1
- package/dist/translations/el.js +1 -1
- package/dist/translations/el.umd.js +1 -1
- package/dist/translations/en-au.js +1 -1
- package/dist/translations/en-au.umd.js +1 -1
- package/dist/translations/en-gb.js +1 -1
- package/dist/translations/en-gb.umd.js +1 -1
- package/dist/translations/en.js +1 -1
- package/dist/translations/en.umd.js +1 -1
- package/dist/translations/eo.js +1 -1
- package/dist/translations/eo.umd.js +1 -1
- package/dist/translations/es-co.js +1 -1
- package/dist/translations/es-co.umd.js +1 -1
- package/dist/translations/es.js +1 -1
- package/dist/translations/es.umd.js +1 -1
- package/dist/translations/et.js +1 -1
- package/dist/translations/et.umd.js +1 -1
- package/dist/translations/eu.js +1 -1
- package/dist/translations/eu.umd.js +1 -1
- package/dist/translations/fa.js +1 -1
- package/dist/translations/fa.umd.js +1 -1
- package/dist/translations/fi.js +1 -1
- package/dist/translations/fi.umd.js +1 -1
- package/dist/translations/fr.js +1 -1
- package/dist/translations/fr.umd.js +1 -1
- package/dist/translations/gl.js +1 -1
- package/dist/translations/gl.umd.js +1 -1
- package/dist/translations/gu.js +1 -1
- package/dist/translations/gu.umd.js +1 -1
- package/dist/translations/he.js +1 -1
- package/dist/translations/he.umd.js +1 -1
- package/dist/translations/hi.js +1 -1
- package/dist/translations/hi.umd.js +1 -1
- package/dist/translations/hr.js +1 -1
- package/dist/translations/hr.umd.js +1 -1
- package/dist/translations/hu.js +1 -1
- package/dist/translations/hu.umd.js +1 -1
- package/dist/translations/hy.js +1 -1
- package/dist/translations/hy.umd.js +1 -1
- package/dist/translations/id.js +1 -1
- package/dist/translations/id.umd.js +1 -1
- package/dist/translations/it.js +1 -1
- package/dist/translations/it.umd.js +1 -1
- package/dist/translations/ja.js +1 -1
- package/dist/translations/ja.umd.js +1 -1
- package/dist/translations/jv.js +1 -1
- package/dist/translations/jv.umd.js +1 -1
- package/dist/translations/kk.js +1 -1
- package/dist/translations/kk.umd.js +1 -1
- package/dist/translations/km.js +1 -1
- package/dist/translations/km.umd.js +1 -1
- package/dist/translations/kn.js +1 -1
- package/dist/translations/kn.umd.js +1 -1
- package/dist/translations/ko.js +1 -1
- package/dist/translations/ko.umd.js +1 -1
- package/dist/translations/ku.js +1 -1
- package/dist/translations/ku.umd.js +1 -1
- package/dist/translations/lt.js +1 -1
- package/dist/translations/lt.umd.js +1 -1
- package/dist/translations/lv.js +1 -1
- package/dist/translations/lv.umd.js +1 -1
- package/dist/translations/ms.js +1 -1
- package/dist/translations/ms.umd.js +1 -1
- package/dist/translations/nb.js +1 -1
- package/dist/translations/nb.umd.js +1 -1
- package/dist/translations/ne.js +1 -1
- package/dist/translations/ne.umd.js +1 -1
- package/dist/translations/nl.js +1 -1
- package/dist/translations/nl.umd.js +1 -1
- package/dist/translations/no.js +1 -1
- package/dist/translations/no.umd.js +1 -1
- package/dist/translations/oc.js +1 -1
- package/dist/translations/oc.umd.js +1 -1
- package/dist/translations/pl.js +1 -1
- package/dist/translations/pl.umd.js +1 -1
- package/dist/translations/pt-br.js +1 -1
- package/dist/translations/pt-br.umd.js +1 -1
- package/dist/translations/pt.js +1 -1
- package/dist/translations/pt.umd.js +1 -1
- package/dist/translations/ro.js +1 -1
- package/dist/translations/ro.umd.js +1 -1
- package/dist/translations/ru.js +1 -1
- package/dist/translations/ru.umd.js +1 -1
- package/dist/translations/si.js +1 -1
- package/dist/translations/si.umd.js +1 -1
- package/dist/translations/sk.js +1 -1
- package/dist/translations/sk.umd.js +1 -1
- package/dist/translations/sl.js +1 -1
- package/dist/translations/sl.umd.js +1 -1
- package/dist/translations/sq.js +1 -1
- package/dist/translations/sq.umd.js +1 -1
- package/dist/translations/sr-latn.js +1 -1
- package/dist/translations/sr-latn.umd.js +1 -1
- package/dist/translations/sr.js +1 -1
- package/dist/translations/sr.umd.js +1 -1
- package/dist/translations/sv.js +1 -1
- package/dist/translations/sv.umd.js +1 -1
- package/dist/translations/th.js +1 -1
- package/dist/translations/th.umd.js +1 -1
- package/dist/translations/ti.js +1 -1
- package/dist/translations/ti.umd.js +1 -1
- package/dist/translations/tk.js +1 -1
- package/dist/translations/tk.umd.js +1 -1
- package/dist/translations/tr.js +1 -1
- package/dist/translations/tr.umd.js +1 -1
- package/dist/translations/tt.js +1 -1
- package/dist/translations/tt.umd.js +1 -1
- package/dist/translations/ug.js +1 -1
- package/dist/translations/ug.umd.js +1 -1
- package/dist/translations/uk.js +1 -1
- package/dist/translations/uk.umd.js +1 -1
- package/dist/translations/ur.js +1 -1
- package/dist/translations/ur.umd.js +1 -1
- package/dist/translations/uz.js +1 -1
- package/dist/translations/uz.umd.js +1 -1
- package/dist/translations/vi.js +1 -1
- package/dist/translations/vi.umd.js +1 -1
- package/dist/translations/zh-cn.js +1 -1
- package/dist/translations/zh-cn.umd.js +1 -1
- package/dist/translations/zh.js +1 -1
- package/dist/translations/zh.umd.js +1 -1
- package/dist/utils/common-translations.d.ts +6 -6
- package/package.json +8 -8
package/dist/augmentation.d.ts
CHANGED
|
@@ -1,33 +1,33 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import type { DocumentOutline, DocumentOutlineUtils, DocumentOutlineConfig, DocumentOutlineUI, TableOfContents, DocumentOutlineTableOfContentsConfig, TableOfContentsCommand, TableOfContentsEditing, TableOfContentsUI, HeadingId } from
|
|
6
|
-
declare module
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
2
|
+
* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
|
+
import type { DocumentOutline, DocumentOutlineUtils, DocumentOutlineConfig, DocumentOutlineUI, TableOfContents, DocumentOutlineTableOfContentsConfig, TableOfContentsCommand, TableOfContentsEditing, TableOfContentsUI, HeadingId } from "./index.js";
|
|
6
|
+
declare module "@ckeditor/ckeditor5-core" {
|
|
7
|
+
interface EditorConfig {
|
|
8
|
+
/**
|
|
9
|
+
* The configuration of the {@link module:document-outline/documentoutline~DocumentOutline} feature.
|
|
10
|
+
*
|
|
11
|
+
* Read more in {@link module:document-outline/documentoutline~DocumentOutlineConfig}.
|
|
12
|
+
*/
|
|
13
|
+
documentOutline?: DocumentOutlineConfig;
|
|
14
|
+
/**
|
|
15
|
+
* The configuration of the {@link module:document-outline/tableofcontents~TableOfContents} feature.
|
|
16
|
+
*
|
|
17
|
+
* Read more in {@link module:document-outline/tableofcontents~DocumentOutlineTableOfContentsConfig}.
|
|
18
|
+
*/
|
|
19
|
+
tableOfContents?: DocumentOutlineTableOfContentsConfig;
|
|
20
|
+
}
|
|
21
|
+
interface PluginsMap {
|
|
22
|
+
[DocumentOutline.pluginName]: DocumentOutline;
|
|
23
|
+
[DocumentOutlineUI.pluginName]: DocumentOutlineUI;
|
|
24
|
+
[DocumentOutlineUtils.pluginName]: DocumentOutlineUtils;
|
|
25
|
+
[TableOfContents.pluginName]: TableOfContents;
|
|
26
|
+
[TableOfContentsEditing.pluginName]: TableOfContentsEditing;
|
|
27
|
+
[TableOfContentsUI.pluginName]: TableOfContentsUI;
|
|
28
|
+
[HeadingId.pluginName]: HeadingId;
|
|
29
|
+
}
|
|
30
|
+
interface CommandsMap {
|
|
31
|
+
insertTableOfContents: TableOfContentsCommand;
|
|
32
|
+
}
|
|
33
33
|
}
|
|
@@ -1,48 +1,48 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
5
|
/**
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
import { Plugin, type Editor } from
|
|
10
|
-
import { DocumentOutlineView } from
|
|
11
|
-
import
|
|
6
|
+
* @module document-outline/documentoutline/documentoutlineui
|
|
7
|
+
* @publicApi
|
|
8
|
+
*/
|
|
9
|
+
import { Plugin, type Editor } from "@ckeditor/ckeditor5-core";
|
|
10
|
+
import { DocumentOutlineView } from "./ui/documentoutlineview.js";
|
|
11
|
+
import "../../theme/documentoutline.css";
|
|
12
12
|
/**
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
* Provides the UI for the document outline feature.
|
|
14
|
+
*/
|
|
15
15
|
export declare class DocumentOutlineUI extends Plugin {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
16
|
+
/**
|
|
17
|
+
* The representation of the document outline view.
|
|
18
|
+
*/
|
|
19
|
+
view: DocumentOutlineView;
|
|
20
|
+
/**
|
|
21
|
+
* @inheritDoc
|
|
22
|
+
*/
|
|
23
|
+
static get pluginName(): "DocumentOutlineUI";
|
|
24
|
+
/**
|
|
25
|
+
* @inheritDoc
|
|
26
|
+
*/
|
|
27
|
+
static override get isOfficialPlugin(): true;
|
|
28
|
+
/**
|
|
29
|
+
* @inheritDoc
|
|
30
|
+
*/
|
|
31
|
+
static override get isPremiumPlugin(): true;
|
|
32
|
+
/**
|
|
33
|
+
* @inheritDoc
|
|
34
|
+
*/
|
|
35
|
+
constructor(editor: Editor);
|
|
36
|
+
/**
|
|
37
|
+
* @inheritDoc
|
|
38
|
+
*/
|
|
39
|
+
init(): void;
|
|
40
|
+
/**
|
|
41
|
+
* @inheritDoc
|
|
42
|
+
*/
|
|
43
|
+
afterInit(): void;
|
|
44
|
+
/**
|
|
45
|
+
* @inheritDoc
|
|
46
|
+
*/
|
|
47
|
+
override destroy(): void;
|
|
48
48
|
}
|
|
@@ -1,74 +1,72 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
5
|
/**
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
import { Plugin } from
|
|
9
|
-
import { type ModelElement } from
|
|
10
|
-
import { diffToChanges } from
|
|
6
|
+
* @module document-outline/documentoutline/documentoutlineutils
|
|
7
|
+
*/
|
|
8
|
+
import { Plugin } from "@ckeditor/ckeditor5-core";
|
|
9
|
+
import { type ModelElement } from "@ckeditor/ckeditor5-engine";
|
|
10
|
+
import { diffToChanges } from "@ckeditor/ckeditor5-utils";
|
|
11
11
|
/**
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
* Document outline utilities.
|
|
13
|
+
*/
|
|
14
14
|
export declare class DocumentOutlineUtils extends Plugin {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
15
|
+
/**
|
|
16
|
+
* @inheritDoc
|
|
17
|
+
*/
|
|
18
|
+
static get pluginName(): "DocumentOutlineUtils";
|
|
19
|
+
/**
|
|
20
|
+
* @inheritDoc
|
|
21
|
+
*/
|
|
22
|
+
static override get isOfficialPlugin(): true;
|
|
23
|
+
/**
|
|
24
|
+
* @inheritDoc
|
|
25
|
+
*/
|
|
26
|
+
static override get isPremiumPlugin(): true;
|
|
27
|
+
/**
|
|
28
|
+
* Starts listening for editor events and handles them on the model document `change` event. This means both
|
|
29
|
+
* changes to the structure of the document and changes to the selection are reflected in the outline.
|
|
30
|
+
*/
|
|
31
|
+
init(): void;
|
|
32
|
+
/**
|
|
33
|
+
* @inheritDoc
|
|
34
|
+
*/
|
|
35
|
+
afterInit(): void;
|
|
36
36
|
}
|
|
37
37
|
/**
|
|
38
|
-
|
|
39
|
-
|
|
38
|
+
* The definition of the item in the document outline.
|
|
39
|
+
*/
|
|
40
40
|
export type OutlineItemDefinition = {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
41
|
+
level: number;
|
|
42
|
+
text: string;
|
|
43
|
+
modelElement: ModelElement;
|
|
44
44
|
};
|
|
45
45
|
/**
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
46
|
+
* Fired whenever the headings structure in the document changes.
|
|
47
|
+
*
|
|
48
|
+
* @eventName ~DocumentOutlineUtils#change
|
|
49
|
+
* @param outlineDefinitions The list of current outline definitions.
|
|
50
|
+
* @param outlineChanges Describes what changes were applied in the headings structure.
|
|
51
|
+
* @param activeItemIndex The index of the active document outline item.
|
|
52
|
+
*/
|
|
53
53
|
export type OutlineChangeEvent = {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
}
|
|
61
|
-
];
|
|
54
|
+
name: "change";
|
|
55
|
+
args: [{
|
|
56
|
+
outlineDefinitions: Array<OutlineItemDefinition>;
|
|
57
|
+
outlineChanges: ReturnType<typeof diffToChanges<OutlineItemDefinition>>;
|
|
58
|
+
activeItemIndex: number;
|
|
59
|
+
}];
|
|
62
60
|
};
|
|
63
61
|
/**
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
62
|
+
* Fired whenever the active document outline item is changed.
|
|
63
|
+
*
|
|
64
|
+
* @eventName ~DocumentOutlineUtils#activeItemIndex
|
|
65
|
+
* @param activeItemIndex The index of the active document outline item.
|
|
66
|
+
*/
|
|
69
67
|
export type ActiveOutlineItemChangeEvent = {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
68
|
+
name: "activeItemIndex";
|
|
69
|
+
args: [{
|
|
70
|
+
index: number;
|
|
71
|
+
}];
|
|
74
72
|
};
|
|
@@ -1,51 +1,51 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
5
|
/**
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
import { View } from
|
|
9
|
-
import { type Locale } from
|
|
6
|
+
* @module document-outline/documentoutline/ui/documentoutlineitemview
|
|
7
|
+
*/
|
|
8
|
+
import { View } from "@ckeditor/ckeditor5-ui";
|
|
9
|
+
import { type Locale } from "@ckeditor/ckeditor5-utils";
|
|
10
10
|
/**
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
* An item of the document outline.
|
|
12
|
+
*/
|
|
13
13
|
export declare class DocumentOutlineItemView extends View {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
14
|
+
/**
|
|
15
|
+
* The textual content of the item.
|
|
16
|
+
*
|
|
17
|
+
* @observable
|
|
18
|
+
*/
|
|
19
|
+
text: string;
|
|
20
|
+
/**
|
|
21
|
+
* The level of heading nesting in the document.
|
|
22
|
+
*
|
|
23
|
+
* @observable
|
|
24
|
+
*/
|
|
25
|
+
level: number;
|
|
26
|
+
/**
|
|
27
|
+
* Indicates whether the given item is currently active.
|
|
28
|
+
*
|
|
29
|
+
* @observable
|
|
30
|
+
*/
|
|
31
|
+
isActive: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Indicates whether the heading doesn't have any text.
|
|
34
|
+
*
|
|
35
|
+
* @observable
|
|
36
|
+
*/
|
|
37
|
+
isEmpty: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* @inheritDoc
|
|
40
|
+
*/
|
|
41
|
+
constructor(locale: Locale, showEmptyHeadingText?: boolean);
|
|
42
42
|
}
|
|
43
43
|
/**
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
44
|
+
* Fired whenever an item in the document outline is clicked.
|
|
45
|
+
*
|
|
46
|
+
* @eventName ~DocumentOutlineItemView#click
|
|
47
|
+
*/
|
|
48
48
|
export type DocumentOutlineItemViewClickEvent = {
|
|
49
|
-
|
|
50
|
-
|
|
49
|
+
name: "click";
|
|
50
|
+
args: [];
|
|
51
51
|
};
|
|
@@ -1,57 +1,57 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
5
|
/**
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
import { View, type ViewCollection } from
|
|
9
|
-
import { type Locale, type diffToChanges } from
|
|
10
|
-
import type { OutlineItemDefinition } from
|
|
11
|
-
import { DocumentOutlineItemView } from
|
|
6
|
+
* @module document-outline/documentoutline/ui/documentoutlineview
|
|
7
|
+
*/
|
|
8
|
+
import { View, type ViewCollection } from "@ckeditor/ckeditor5-ui";
|
|
9
|
+
import { type Locale, type diffToChanges } from "@ckeditor/ckeditor5-utils";
|
|
10
|
+
import type { OutlineItemDefinition } from "../documentoutlineutils.js";
|
|
11
|
+
import { DocumentOutlineItemView } from "./documentoutlineitemview.js";
|
|
12
12
|
/**
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
* The document outline panel.
|
|
14
|
+
*/
|
|
15
15
|
export declare class DocumentOutlineView extends View {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
16
|
+
/**
|
|
17
|
+
* A collection of document outline items.
|
|
18
|
+
*/
|
|
19
|
+
readonly items: ViewCollection<DocumentOutlineItemView>;
|
|
20
|
+
/**
|
|
21
|
+
* Indicates which item is active at the moment.
|
|
22
|
+
*
|
|
23
|
+
* @observable
|
|
24
|
+
*/
|
|
25
|
+
activeItemIndex: number;
|
|
26
|
+
/**
|
|
27
|
+
* The element that contains the document outline.
|
|
28
|
+
*
|
|
29
|
+
*/
|
|
30
|
+
documentOutlineContainer?: HTMLElement;
|
|
31
|
+
/**
|
|
32
|
+
* Creates an instance of the {@link module:documentoutline/ui/documentoutlineview~DocumentOutlineView} class.
|
|
33
|
+
*
|
|
34
|
+
* @param locale The localization services instance.
|
|
35
|
+
* @param showEmptyHeadingText Indicates whether the display of a placeholder for empty heading is enabled in the editor.
|
|
36
|
+
* @param containerElement The element that contains the document outline.
|
|
37
|
+
*/
|
|
38
|
+
constructor(locale: Locale, showEmptyHeadingText?: boolean, containerElement?: HTMLElement);
|
|
39
|
+
/**
|
|
40
|
+
* If a heading was added or deleted in the editor, insert or delete it in the document outline.
|
|
41
|
+
*/
|
|
42
|
+
sync(changesInItems: ReturnType<typeof diffToChanges<OutlineItemDefinition>>): void;
|
|
43
|
+
/**
|
|
44
|
+
* @inheritDoc
|
|
45
|
+
*/
|
|
46
|
+
override destroy(): void;
|
|
47
47
|
}
|
|
48
48
|
/**
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
49
|
+
* Fired whenever an item in the document outline is clicked.
|
|
50
|
+
*
|
|
51
|
+
* @eventName ~DocumentOutlineView#itemSelected
|
|
52
|
+
* @param itemIndex Index of selected item.
|
|
53
|
+
*/
|
|
54
54
|
export type DocumentOutlineViewItemSelectedEvent = {
|
|
55
|
-
|
|
56
|
-
|
|
55
|
+
name: "itemSelected";
|
|
56
|
+
args: [itemIndex: number];
|
|
57
57
|
};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
5
|
/**
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
import { type ModelElement } from
|
|
9
|
-
import { type Editor } from
|
|
6
|
+
* @module document-outline/documentoutline/utils
|
|
7
|
+
*/
|
|
8
|
+
import { type ModelElement } from "@ckeditor/ckeditor5-engine";
|
|
9
|
+
import { type Editor } from "@ckeditor/ckeditor5-core";
|
|
10
10
|
/**
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
* Returns all text contents that are inside the given element and all its children.
|
|
12
|
+
*/
|
|
13
13
|
export declare function getElementText(element: ModelElement): string;
|
|
14
14
|
/**
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
* Returns a list of standard headings or GHS headings configured in the editor.
|
|
16
|
+
*/
|
|
17
17
|
export declare function getDefaultFeatureHeadingNames(editor: Editor): Array<string>;
|