@ckeditor/ckeditor5-document-outline 40.0.0 → 40.2.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/LICENSE.md +3 -3
- package/README.md +1 -1
- package/build/document-outline.js +1 -1
- package/build/translations/sr-latn.js +1 -0
- package/lang/translations/sr-latn.po +34 -0
- package/package.json +3 -3
- package/src/augmentation.d.ts +27 -27
- package/src/documentoutline/documentoutlineui.d.ts +40 -40
- package/src/documentoutline/documentoutlineui.js +1 -1
- package/src/documentoutline/documentoutlineutils.d.ts +66 -66
- package/src/documentoutline/documentoutlineutils.js +1 -1
- package/src/documentoutline/ui/documentoutlineitemview.d.ts +51 -51
- package/src/documentoutline/ui/documentoutlineitemview.js +1 -1
- package/src/documentoutline/ui/documentoutlineview.d.ts +52 -52
- package/src/documentoutline/ui/documentoutlineview.js +1 -1
- package/src/documentoutline/utils.d.ts +17 -17
- package/src/documentoutline/utils.js +1 -1
- package/src/documentoutline.d.ts +99 -99
- package/src/documentoutline.js +1 -1
- package/src/index.d.ts +19 -19
- package/src/index.js +1 -1
- package/src/tableofcontents/headingid.d.ts +18 -18
- package/src/tableofcontents/headingid.js +1 -1
- package/src/tableofcontents/tableofcontentscommand.d.ts +21 -21
- package/src/tableofcontents/tableofcontentscommand.js +1 -1
- package/src/tableofcontents/tableofcontentsediting.d.ts +37 -37
- package/src/tableofcontents/tableofcontentsediting.js +1 -1
- package/src/tableofcontents/tableofcontentsui.d.ts +27 -27
- package/src/tableofcontents/tableofcontentsui.js +1 -1
- package/src/tableofcontents.d.ts +26 -26
- package/src/tableofcontents.js +1 -1
- package/theme/tableofcontents.css +3 -4
package/src/documentoutline.d.ts
CHANGED
|
@@ -1,99 +1,99 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* @module document-outline/documentoutline
|
|
7
|
-
* @publicApi
|
|
8
|
-
*/
|
|
9
|
-
import { Plugin, type Editor } from 'ckeditor5/src/core';
|
|
10
|
-
import DocumentOutlineUtils from './documentoutline/documentoutlineutils';
|
|
11
|
-
import DocumentOutlineUI from './documentoutline/documentoutlineui';
|
|
12
|
-
/**
|
|
13
|
-
* The document outline feature.
|
|
14
|
-
* It allows for an easy access to a predefined list of headings in the document.
|
|
15
|
-
*/
|
|
16
|
-
export default class DocumentOutline extends Plugin {
|
|
17
|
-
licenseKey: string;
|
|
18
|
-
/**
|
|
19
|
-
* @inheritDoc
|
|
20
|
-
*/
|
|
21
|
-
static get requires(): readonly [typeof DocumentOutlineUtils, typeof DocumentOutlineUI];
|
|
22
|
-
/**
|
|
23
|
-
* @inheritDoc
|
|
24
|
-
*/
|
|
25
|
-
static get pluginName(): "DocumentOutline";
|
|
26
|
-
/**
|
|
27
|
-
* @inheritDoc
|
|
28
|
-
*/
|
|
29
|
-
constructor(editor: Editor);
|
|
30
|
-
/**
|
|
31
|
-
* @inheritDoc
|
|
32
|
-
*/
|
|
33
|
-
init(): void;
|
|
34
|
-
/**
|
|
35
|
-
* @inheritDoc
|
|
36
|
-
*/
|
|
37
|
-
destroy(): void;
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* The configuration of the {@link module:document-outline/documentoutline~DocumentOutline document outline feature}.
|
|
41
|
-
*
|
|
42
|
-
* ```ts
|
|
43
|
-
* ClassicEditor
|
|
44
|
-
* .create( editorElement, {
|
|
45
|
-
* documentOutline: ... // Document outline feature configuration.
|
|
46
|
-
* } )
|
|
47
|
-
* .then( /* ... *\/ )
|
|
48
|
-
* .catch( /* ... *\/ );
|
|
49
|
-
* ```
|
|
50
|
-
*
|
|
51
|
-
* See {@link module:core/editor/editorconfig~EditorConfig all editor options}.
|
|
52
|
-
*/
|
|
53
|
-
export interface DocumentOutlineConfig {
|
|
54
|
-
/**
|
|
55
|
-
* The container element for the document outline to render. This should be a reference to an existing
|
|
56
|
-
* container element in the DOM.
|
|
57
|
-
*/
|
|
58
|
-
container?: HTMLElement;
|
|
59
|
-
/**
|
|
60
|
-
* An array of {@glink framework/architecture/editing-engine#model model} element names considered
|
|
61
|
-
* as headings in the document outline.
|
|
62
|
-
*
|
|
63
|
-
* The index of the heading in the array reflects the heading nesting level. It can be used e.g. for reducing
|
|
64
|
-
* the number of visible headings.
|
|
65
|
-
*
|
|
66
|
-
* ```ts
|
|
67
|
-
* ClassicEditor
|
|
68
|
-
* .create( editorElement, {
|
|
69
|
-
* plugins: [ DocumentOutline, /* ... *\/ ],
|
|
70
|
-
* documentOutline: {
|
|
71
|
-
* headings: [ 'heading1', 'heading2', /* ... *\/ ],
|
|
72
|
-
* // ...
|
|
73
|
-
* }
|
|
74
|
-
* } )
|
|
75
|
-
* .then( /* ... *\/ )
|
|
76
|
-
* .catch( /* ... *\/ );
|
|
77
|
-
* ```
|
|
78
|
-
*
|
|
79
|
-
* If this configuration is not defined, the feature will use the following defaults instead:
|
|
80
|
-
*
|
|
81
|
-
* 1. If the {@glink features/headings Headings feature} is loaded, it equals
|
|
82
|
-
* * {@link module:heading/headingconfig~HeadingConfig#options `config.heading.options`}.
|
|
83
|
-
* * `[ 'heading1', 'heading2', 'heading3' ]` if `config.heading.options` is not defined.
|
|
84
|
-
* 2. If the {@glink features/html/general-html-support General HTML Support} feature is loaded, it equals
|
|
85
|
-
* `[ 'htmlH1', 'htmlH2', 'htmlH3', 'htmlH4', 'htmlH5', 'htmlH6' ]`.
|
|
86
|
-
*
|
|
87
|
-
* **Note**: The Headings feature takes precedence over the General HTML Support feature when
|
|
88
|
-
* both are loaded.
|
|
89
|
-
*/
|
|
90
|
-
headings?: Array<string>;
|
|
91
|
-
/**
|
|
92
|
-
* Allows you to display a placeholder text: [Empty heading] for empty headings.
|
|
93
|
-
*
|
|
94
|
-
* By default, the display of a placeholder is disabled. To enable it, set this parameter to true.
|
|
95
|
-
*
|
|
96
|
-
* **Note**: This setting also affects Table of contents feature.
|
|
97
|
-
*/
|
|
98
|
-
showEmptyHeadings?: boolean;
|
|
99
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @module document-outline/documentoutline
|
|
7
|
+
* @publicApi
|
|
8
|
+
*/
|
|
9
|
+
import { Plugin, type Editor } from 'ckeditor5/src/core';
|
|
10
|
+
import DocumentOutlineUtils from './documentoutline/documentoutlineutils';
|
|
11
|
+
import DocumentOutlineUI from './documentoutline/documentoutlineui';
|
|
12
|
+
/**
|
|
13
|
+
* The document outline feature.
|
|
14
|
+
* It allows for an easy access to a predefined list of headings in the document.
|
|
15
|
+
*/
|
|
16
|
+
export default class DocumentOutline extends Plugin {
|
|
17
|
+
licenseKey: string;
|
|
18
|
+
/**
|
|
19
|
+
* @inheritDoc
|
|
20
|
+
*/
|
|
21
|
+
static get requires(): readonly [typeof DocumentOutlineUtils, typeof DocumentOutlineUI];
|
|
22
|
+
/**
|
|
23
|
+
* @inheritDoc
|
|
24
|
+
*/
|
|
25
|
+
static get pluginName(): "DocumentOutline";
|
|
26
|
+
/**
|
|
27
|
+
* @inheritDoc
|
|
28
|
+
*/
|
|
29
|
+
constructor(editor: Editor);
|
|
30
|
+
/**
|
|
31
|
+
* @inheritDoc
|
|
32
|
+
*/
|
|
33
|
+
init(): void;
|
|
34
|
+
/**
|
|
35
|
+
* @inheritDoc
|
|
36
|
+
*/
|
|
37
|
+
destroy(): void;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* The configuration of the {@link module:document-outline/documentoutline~DocumentOutline document outline feature}.
|
|
41
|
+
*
|
|
42
|
+
* ```ts
|
|
43
|
+
* ClassicEditor
|
|
44
|
+
* .create( editorElement, {
|
|
45
|
+
* documentOutline: ... // Document outline feature configuration.
|
|
46
|
+
* } )
|
|
47
|
+
* .then( /* ... *\/ )
|
|
48
|
+
* .catch( /* ... *\/ );
|
|
49
|
+
* ```
|
|
50
|
+
*
|
|
51
|
+
* See {@link module:core/editor/editorconfig~EditorConfig all editor options}.
|
|
52
|
+
*/
|
|
53
|
+
export interface DocumentOutlineConfig {
|
|
54
|
+
/**
|
|
55
|
+
* The container element for the document outline to render. This should be a reference to an existing
|
|
56
|
+
* container element in the DOM.
|
|
57
|
+
*/
|
|
58
|
+
container?: HTMLElement;
|
|
59
|
+
/**
|
|
60
|
+
* An array of {@glink framework/architecture/editing-engine#model model} element names considered
|
|
61
|
+
* as headings in the document outline.
|
|
62
|
+
*
|
|
63
|
+
* The index of the heading in the array reflects the heading nesting level. It can be used e.g. for reducing
|
|
64
|
+
* the number of visible headings.
|
|
65
|
+
*
|
|
66
|
+
* ```ts
|
|
67
|
+
* ClassicEditor
|
|
68
|
+
* .create( editorElement, {
|
|
69
|
+
* plugins: [ DocumentOutline, /* ... *\/ ],
|
|
70
|
+
* documentOutline: {
|
|
71
|
+
* headings: [ 'heading1', 'heading2', /* ... *\/ ],
|
|
72
|
+
* // ...
|
|
73
|
+
* }
|
|
74
|
+
* } )
|
|
75
|
+
* .then( /* ... *\/ )
|
|
76
|
+
* .catch( /* ... *\/ );
|
|
77
|
+
* ```
|
|
78
|
+
*
|
|
79
|
+
* If this configuration is not defined, the feature will use the following defaults instead:
|
|
80
|
+
*
|
|
81
|
+
* 1. If the {@glink features/headings Headings feature} is loaded, it equals
|
|
82
|
+
* * {@link module:heading/headingconfig~HeadingConfig#options `config.heading.options`}.
|
|
83
|
+
* * `[ 'heading1', 'heading2', 'heading3' ]` if `config.heading.options` is not defined.
|
|
84
|
+
* 2. If the {@glink features/html/general-html-support General HTML Support} feature is loaded, it equals
|
|
85
|
+
* `[ 'htmlH1', 'htmlH2', 'htmlH3', 'htmlH4', 'htmlH5', 'htmlH6' ]`.
|
|
86
|
+
*
|
|
87
|
+
* **Note**: The Headings feature takes precedence over the General HTML Support feature when
|
|
88
|
+
* both are loaded.
|
|
89
|
+
*/
|
|
90
|
+
headings?: Array<string>;
|
|
91
|
+
/**
|
|
92
|
+
* Allows you to display a placeholder text: [Empty heading] for empty headings.
|
|
93
|
+
*
|
|
94
|
+
* By default, the display of a placeholder is disabled. To enable it, set this parameter to true.
|
|
95
|
+
*
|
|
96
|
+
* **Note**: This setting also affects Table of contents feature.
|
|
97
|
+
*/
|
|
98
|
+
showEmptyHeadings?: boolean;
|
|
99
|
+
}
|
package/src/documentoutline.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x478c=['You\x20are\x20using\x20the\x20trial\x20version\x20of\x20CKEditor\x205\x20document\x20outline\x20plugin\x20with\x20limited\x20usage.\x20Make\x20sure\x20you\x20will\x20not\x20use\x20it\x20in\x20the\x20production\x20environment.','documentOutlineLicenseKeyTrial','pluginName','documentOutlineLicenseKeyTrialLimit:operations','destroy','document-outline-trial-license-key-reached-limit-changes','documentOutlineLicenseKeyValid','document-outline-invalid-license-key','config','documentOutlineLicenseKeyInvalid','editor','DocumentOutline','requires','init','licenseKey','_licenseKeyCheckInterval','get'];(function(_0x4cd59c,_0x478c95){const _0x4cdbf8=function(_0x4c4a3c){while(--_0x4c4a3c){_0x4cd59c['push'](_0x4cd59c['shift']());}};_0x4cdbf8(++_0x478c95);}(_0x478c,0x1a7));const _0x4cdb=function(_0x4cd59c,_0x478c95){_0x4cd59c=_0x4cd59c-0x0;let _0x4cdbf8=_0x478c[_0x4cd59c];return _0x4cdbf8;};import{Plugin as _0x548e33}from'ckeditor5/src/core';import{CKEditorError as _0x20ae60}from'ckeditor5/src/utils';import _0x4846bf from'./documentoutline/documentoutlineutils';import _0x8bf04b from'./documentoutline/documentoutlineui';export default class l extends _0x548e33{static get[_0x4cdb('0xe')](){return[_0x4846bf,_0x8bf04b];}static get[_0x4cdb('0x4')](){return _0x4cdb('0xd');}constructor(_0x38b8fb){super(_0x38b8fb),this[_0x4cdb('0x0')]=null;}[_0x4cdb('0xf')](){const _0x3e0b71=this[_0x4cdb('0xc')];this[_0x4cdb('0x10')]=_0x3e0b71[_0x4cdb('0xa')][_0x4cdb('0x1')]('licenseKey');const _0x52bec5=this[_0x4cdb('0xc')];this[_0x4cdb('0x0')]=setInterval(()=>{let _0x26161a;for(const _0x1a2243 in _0x52bec5){const _0xe63de0=_0x1a2243,_0x5d9425=_0x52bec5[_0xe63de0];if(_0x4cdb('0x3')===_0x5d9425||_0x4cdb('0xb')===_0x5d9425||_0x4cdb('0x8')===_0x5d9425||'documentOutlineLicenseKeyTrialLimit:operations'===_0x5d9425){delete _0x52bec5[_0xe63de0],_0x26161a=_0x5d9425;break;}}if(_0x4cdb('0xb')===_0x26161a)throw clearInterval(this[_0x4cdb('0x0')]),new _0x20ae60(_0x4cdb('0x9'),null);if(_0x4cdb('0x3')===_0x26161a&&console['info'](_0x4cdb('0x2')),_0x4cdb('0x5')===_0x26161a)throw clearInterval(this['_licenseKeyCheckInterval']),new _0x20ae60(_0x4cdb('0x7'),null);_0x4cdb('0x8')===_0x26161a&&clearInterval(this[_0x4cdb('0x0')]);},0x3e8);}[_0x4cdb('0x6')](){this[_0x4cdb('0x0')]&&clearInterval(this['_licenseKeyCheckInterval']);}}
|
package/src/index.d.ts
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* @module document-outline
|
|
7
|
-
*/
|
|
8
|
-
export { default as DocumentOutline, type DocumentOutlineConfig } from './documentoutline';
|
|
9
|
-
export { default as DocumentOutlineUI } from './documentoutline/documentoutlineui';
|
|
10
|
-
export { default as DocumentOutlineUtils } from './documentoutline/documentoutlineutils';
|
|
11
|
-
export { default as TableOfContents } from './tableofcontents';
|
|
12
|
-
export { default as TableOfContentsCommand } from './tableofcontents/tableofcontentscommand';
|
|
13
|
-
export { default as TableOfContentsEditing } from './tableofcontents/tableofcontentsediting';
|
|
14
|
-
export { default as TableOfContentsUI } from './tableofcontents/tableofcontentsui';
|
|
15
|
-
export { default as HeadingId } from './tableofcontents/headingid';
|
|
16
|
-
export declare const icons: {
|
|
17
|
-
tableOfContentsIcon: string;
|
|
18
|
-
};
|
|
19
|
-
import './augmentation';
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @module document-outline
|
|
7
|
+
*/
|
|
8
|
+
export { default as DocumentOutline, type DocumentOutlineConfig } from './documentoutline';
|
|
9
|
+
export { default as DocumentOutlineUI } from './documentoutline/documentoutlineui';
|
|
10
|
+
export { default as DocumentOutlineUtils } from './documentoutline/documentoutlineutils';
|
|
11
|
+
export { default as TableOfContents } from './tableofcontents';
|
|
12
|
+
export { default as TableOfContentsCommand } from './tableofcontents/tableofcontentscommand';
|
|
13
|
+
export { default as TableOfContentsEditing } from './tableofcontents/tableofcontentsediting';
|
|
14
|
+
export { default as TableOfContentsUI } from './tableofcontents/tableofcontentsui';
|
|
15
|
+
export { default as HeadingId } from './tableofcontents/headingid';
|
|
16
|
+
export declare const icons: {
|
|
17
|
+
tableOfContentsIcon: string;
|
|
18
|
+
};
|
|
19
|
+
import './augmentation';
|
package/src/index.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
export{default as DocumentOutline}from'./documentoutline';export{default as DocumentOutlineUI}from'./documentoutline/documentoutlineui';export{default as DocumentOutlineUtils}from'./documentoutline/documentoutlineutils';import
|
|
23
|
+
export{default as DocumentOutline}from'./documentoutline';export{default as DocumentOutlineUI}from'./documentoutline/documentoutlineui';export{default as DocumentOutlineUtils}from'./documentoutline/documentoutlineutils';import _0x2ae6fc from'../theme/icons/table-of-contents.svg';export{default as TableOfContents}from'./tableofcontents';export{default as TableOfContentsCommand}from'./tableofcontents/tableofcontentscommand';export{default as TableOfContentsEditing}from'./tableofcontents/tableofcontentsediting';export{default as TableOfContentsUI}from'./tableofcontents/tableofcontentsui';export{default as HeadingId}from'./tableofcontents/headingid';export const icons={'tableOfContentsIcon':_0x2ae6fc};import'./augmentation';
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
-
*/
|
|
5
|
-
import { Plugin } from 'ckeditor5/src/core';
|
|
6
|
-
/**
|
|
7
|
-
* The heading ID plugin. It adds support for the ID attribute on the heading[1-6] (model) and h[1-6] (data/view) elements.
|
|
8
|
-
*/
|
|
9
|
-
export default class HeadingId extends Plugin {
|
|
10
|
-
/**
|
|
11
|
-
* @inheritDoc
|
|
12
|
-
*/
|
|
13
|
-
static get pluginName(): "HeadingId";
|
|
14
|
-
/**
|
|
15
|
-
* @inheritDoc
|
|
16
|
-
*/
|
|
17
|
-
afterInit(): void;
|
|
18
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
import { Plugin } from 'ckeditor5/src/core';
|
|
6
|
+
/**
|
|
7
|
+
* The heading ID plugin. It adds support for the ID attribute on the heading[1-6] (model) and h[1-6] (data/view) elements.
|
|
8
|
+
*/
|
|
9
|
+
export default class HeadingId extends Plugin {
|
|
10
|
+
/**
|
|
11
|
+
* @inheritDoc
|
|
12
|
+
*/
|
|
13
|
+
static get pluginName(): "HeadingId";
|
|
14
|
+
/**
|
|
15
|
+
* @inheritDoc
|
|
16
|
+
*/
|
|
17
|
+
afterInit(): void;
|
|
18
|
+
}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x327a=['forEach','differ','string','position','editor','get','type','match','name','data','change','_customDataDowncastHeadingsConversion','nodeAfter','attributes','consumable','model','config','modelRange','length','downcast','getAttribute','consume','headingId.modelAttributeName','setAttribute','upcastDispatcher','hasAttribute','getContainedElement','heading1','document','low','add','item','has','paragraph','removeAttribute','delete','view','attribute:headingId:','extend','schema','set','writer','_customUpcastHeadingsConversion','headingId','viewItem'];(function(_0x4fd475,_0x327a2c){const _0x2fb83c=function(_0xda5166){while(--_0xda5166){_0x4fd475['push'](_0x4fd475['shift']());}};_0x2fb83c(++_0x327a2c);}(_0x327a,0x1b3));const _0x2fb8=function(_0x4fd475,_0x327a2c){_0x4fd475=_0x4fd475-0x0;let _0x2fb83c=_0x327a[_0x4fd475];return _0x2fb83c;};import{Plugin as _0x440ed5}from'ckeditor5/src/core';import{uid as _0x24fcc1,priorities as _0xd0224a}from'ckeditor5/src/utils';export default class A extends _0x440ed5{static get['pluginName'](){return'HeadingId';}['afterInit'](){const _0x7c7925=this['editor'];if(_0x7c7925[_0x2fb8('0x1f')][_0x2fb8('0x14')](_0x2fb8('0x25')))return;(function(_0x16c09b){const _0x36ff69=new Map();if(_0x16c09b)return _0x16c09b[_0x2fb8('0xf')](_0x575f05=>{_0x2fb8('0x3')!==_0x575f05[_0x2fb8('0x1e')]&&_0x36ff69[_0x2fb8('0xa')](_0x575f05[_0x2fb8('0x6')],_0x575f05[_0x2fb8('0x1e')]);}),_0x36ff69[_0x2fb8('0x14')]('h1')||_0x36ff69[_0x2fb8('0xa')]('h1',_0x2fb8('0x2a')),_0x36ff69;return _0x36ff69;}(this[_0x2fb8('0x13')][_0x2fb8('0x1f')]['get']('heading.options'))['forEach']((_0x304d93,_0x43ca72)=>{this[_0x2fb8('0xc')](_0x43ca72),this['_customDataDowncastHeadingsConversion'](_0x304d93),_0x7c7925[_0x2fb8('0x1e')][_0x2fb8('0x9')]['isRegistered'](_0x304d93)&&_0x7c7925[_0x2fb8('0x1e')][_0x2fb8('0x9')][_0x2fb8('0x8')](_0x304d93,{'allowAttributes':'headingId'});}),this['_registerHeadingIdAttributePostfixer']());}['_customUpcastHeadingsConversion'](_0x4b33c7){this[_0x2fb8('0x13')][_0x2fb8('0x18')][_0x2fb8('0x27')]['on']('element:'+_0x4b33c7,(_0x1bbf58,_0x15023e,_0x1706e5)=>{const {consumable:_0x2df04d,writer:_0x264bcb}=_0x1706e5,_0x465fad=_0x15023e[_0x2fb8('0xe')][_0x2fb8('0x23')]('id'),_0x29c5c4=_0x15023e[_0x2fb8('0x20')][_0x2fb8('0x29')]();if(!(_0x465fad&&_0x465fad[_0x2fb8('0x21')]||_0x29c5c4[_0x2fb8('0x28')](_0x2fb8('0xd'))))return _0x2df04d['consume'](_0x15023e[_0x2fb8('0xe')],{'attributes':['id']}),void _0x264bcb[_0x2fb8('0x26')](_0x2fb8('0xd'),_0x24fcc1(),_0x29c5c4);_0x2df04d[_0x2fb8('0x24')](_0x15023e['viewItem'],{'attributes':['id']})&&_0x264bcb['setAttribute'](_0x2fb8('0xd'),_0x465fad,_0x29c5c4);},{'priority':_0xd0224a['get'](_0x2fb8('0x2c'))+0.5});}[_0x2fb8('0x1a')](_0x377200){this[_0x2fb8('0x13')]['conversion']['for'](_0x2fb8('0x22'))['add'](_0x4e300b=>_0x4e300b['on'](_0x2fb8('0x7')+_0x377200,(_0x4a572d,_0x50b18b,_0x1fbb2a)=>{if(!_0x1fbb2a[_0x2fb8('0x1d')][_0x2fb8('0x24')](_0x50b18b['item'],_0x4a572d[_0x2fb8('0x17')]))return;const _0x5a4752=_0x50b18b['item'][_0x2fb8('0x23')](_0x2fb8('0xd')),_0x4528ef=_0x1fbb2a['mapper']['toViewElement'](_0x50b18b[_0x2fb8('0x1')]);_0x1fbb2a[_0x2fb8('0xb')]['setAttribute']('id',_0x5a4752,_0x4528ef);}));}['_registerHeadingIdAttributePostfixer'](){const _0x5d3798=this['editor'],_0x32dc4f=new Set(),_0x2fef2b=new Set();function _0x2d334d(_0x5d800b,_0x197613){const _0x1aa64a=_0x24fcc1();return _0x2fef2b[_0x2fb8('0x0')](_0x1aa64a),_0x5d800b['setAttribute'](_0x2fb8('0xd'),_0x1aa64a,_0x197613),_0x1aa64a;}function _0x1ecb8e(_0x2aa4dc,_0x3ec634){_0x2aa4dc[_0x2fb8('0x4')](_0x2fb8('0xd'),_0x3ec634);}_0x5d3798[_0x2fb8('0x1e')][_0x2fb8('0x2b')]['registerPostFixer'](_0x509c0e=>{const _0xff75be=_0x5d3798[_0x2fb8('0x1e')][_0x2fb8('0x2b')][_0x2fb8('0x10')]['getChanges']();let _0xe7ac96=!0x1;for(const _0x5427ab of _0xff75be)if('insert'==_0x5427ab[_0x2fb8('0x15')]&&_0x5427ab['name']){if(_0x5427ab[_0x2fb8('0x17')][_0x2fb8('0x16')](/heading\d/)){const _0x51e03d=_0x5427ab[_0x2fb8('0x1c')][_0x2fb8('0x14')]('headingId');'string'==typeof _0x51e03d?_0x32dc4f[_0x2fb8('0x2')](_0x51e03d)?(_0x2d334d(_0x509c0e,_0x5427ab[_0x2fb8('0x12')]['nodeAfter']),_0xe7ac96=!0x0):_0x2fef2b['add'](_0x51e03d):(_0x2d334d(_0x509c0e,_0x5427ab[_0x2fb8('0x12')][_0x2fb8('0x1b')]),_0xe7ac96=!0x0);}else'string'==typeof _0x5427ab['attributes'][_0x2fb8('0x14')](_0x2fb8('0xd'))&&(_0x1ecb8e(_0x509c0e,_0x5427ab[_0x2fb8('0x12')][_0x2fb8('0x1b')]),_0xe7ac96=!0x0);}else{if('remove'==_0x5427ab[_0x2fb8('0x15')]){const _0x7677ac=_0x5427ab[_0x2fb8('0x1c')]['get'](_0x2fb8('0xd'));_0x2fb8('0x11')==typeof _0x7677ac&&_0x32dc4f[_0x2fb8('0x5')](_0x7677ac);}}return _0xe7ac96;}),_0x5d3798['model'][_0x2fb8('0x2b')]['on'](_0x2fb8('0x19'),()=>{_0x2fef2b[_0x2fb8('0xf')](_0x36cb7c=>_0x32dc4f['add'](_0x36cb7c)),_0x2fef2b['clear']();});}}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* @module document-outline/tableofcontents/tableofcontentscommand
|
|
7
|
-
* @publicApi
|
|
8
|
-
*/
|
|
9
|
-
import { Command } from 'ckeditor5/src/core';
|
|
10
|
-
export default class TableOfContentsCommand extends Command {
|
|
11
|
-
/**
|
|
12
|
-
* Executes the command. Inserts the table of content into the model.
|
|
13
|
-
*
|
|
14
|
-
* @fires execute
|
|
15
|
-
*/
|
|
16
|
-
execute(): void;
|
|
17
|
-
/**
|
|
18
|
-
* If the selection is wrong, the command is not enabled.
|
|
19
|
-
*/
|
|
20
|
-
refresh(): void;
|
|
21
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @module document-outline/tableofcontents/tableofcontentscommand
|
|
7
|
+
* @publicApi
|
|
8
|
+
*/
|
|
9
|
+
import { Command } from 'ckeditor5/src/core';
|
|
10
|
+
export default class TableOfContentsCommand extends Command {
|
|
11
|
+
/**
|
|
12
|
+
* Executes the command. Inserts the table of content into the model.
|
|
13
|
+
*
|
|
14
|
+
* @fires execute
|
|
15
|
+
*/
|
|
16
|
+
execute(): void;
|
|
17
|
+
/**
|
|
18
|
+
* If the selection is wrong, the command is not enabled.
|
|
19
|
+
*/
|
|
20
|
+
refresh(): void;
|
|
21
|
+
}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x3cc1=['refresh','tableOfContents','document','createElement','editor','getFirstPosition','model','change','execute','schema','isEnabled','insertObject','selection','findAllowedParent'];(function(_0x23943a,_0x3cc13f){const _0x3edf89=function(_0x6aa4ba){while(--_0x6aa4ba){_0x23943a['push'](_0x23943a['shift']());}};_0x3edf89(++_0x3cc13f);}(_0x3cc1,0xf9));const _0x3edf=function(_0x23943a,_0x3cc13f){_0x23943a=_0x23943a-0x0;let _0x3edf89=_0x3cc1[_0x23943a];return _0x3edf89;};import{Command as _0x387938}from'ckeditor5/src/core';export default class O extends _0x387938{[_0x3edf('0xb')](){this[_0x3edf('0x7')][_0x3edf('0x9')][_0x3edf('0xa')](_0x3366e9=>{this[_0x3edf('0x7')][_0x3edf('0x9')][_0x3edf('0x0')](_0x3366e9[_0x3edf('0x6')]('tableOfContents'));});}[_0x3edf('0x3')](){const _0x556f8c=this[_0x3edf('0x7')][_0x3edf('0x9')],_0x27a3ec=_0x556f8c[_0x3edf('0x5')][_0x3edf('0x1')][_0x3edf('0x8')]();this[_0x3edf('0xd')]=null!==(_0x27a3ec&&_0x556f8c[_0x3edf('0xc')][_0x3edf('0x2')](_0x27a3ec,_0x3edf('0x4')));}}
|
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* @module document-outline/tableofcontents/tableofcontentsediting
|
|
7
|
-
*/
|
|
8
|
-
import { Plugin, type Editor } from 'ckeditor5/src/core';
|
|
9
|
-
import { Widget } from 'ckeditor5/src/widget';
|
|
10
|
-
import '../../theme/tableofcontents.css';
|
|
11
|
-
import DocumentOutlineUtils from '../documentoutline/documentoutlineutils';
|
|
12
|
-
import HeadingId from './headingid';
|
|
13
|
-
/**
|
|
14
|
-
* The table of contents editing plugin.
|
|
15
|
-
*/
|
|
16
|
-
export default class TableOfContentsEditing extends Plugin {
|
|
17
|
-
/**
|
|
18
|
-
* @inheritDoc
|
|
19
|
-
*/
|
|
20
|
-
static get pluginName(): "TableOfContentsEditing";
|
|
21
|
-
/**
|
|
22
|
-
* @inheritDoc
|
|
23
|
-
*/
|
|
24
|
-
static get requires(): readonly [typeof Widget, typeof DocumentOutlineUtils, typeof HeadingId];
|
|
25
|
-
/**
|
|
26
|
-
* @inheritDoc
|
|
27
|
-
*/
|
|
28
|
-
constructor(editor: Editor);
|
|
29
|
-
/**
|
|
30
|
-
* @inheritDoc
|
|
31
|
-
*/
|
|
32
|
-
init(): void;
|
|
33
|
-
/**
|
|
34
|
-
* @inheritDoc
|
|
35
|
-
*/
|
|
36
|
-
afterInit(): void;
|
|
37
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @module document-outline/tableofcontents/tableofcontentsediting
|
|
7
|
+
*/
|
|
8
|
+
import { Plugin, type Editor } from 'ckeditor5/src/core';
|
|
9
|
+
import { Widget } from 'ckeditor5/src/widget';
|
|
10
|
+
import '../../theme/tableofcontents.css';
|
|
11
|
+
import DocumentOutlineUtils from '../documentoutline/documentoutlineutils';
|
|
12
|
+
import HeadingId from './headingid';
|
|
13
|
+
/**
|
|
14
|
+
* The table of contents editing plugin.
|
|
15
|
+
*/
|
|
16
|
+
export default class TableOfContentsEditing extends Plugin {
|
|
17
|
+
/**
|
|
18
|
+
* @inheritDoc
|
|
19
|
+
*/
|
|
20
|
+
static get pluginName(): "TableOfContentsEditing";
|
|
21
|
+
/**
|
|
22
|
+
* @inheritDoc
|
|
23
|
+
*/
|
|
24
|
+
static get requires(): readonly [typeof Widget, typeof DocumentOutlineUtils, typeof HeadingId];
|
|
25
|
+
/**
|
|
26
|
+
* @inheritDoc
|
|
27
|
+
*/
|
|
28
|
+
constructor(editor: Editor);
|
|
29
|
+
/**
|
|
30
|
+
* @inheritDoc
|
|
31
|
+
*/
|
|
32
|
+
init(): void;
|
|
33
|
+
/**
|
|
34
|
+
* @inheritDoc
|
|
35
|
+
*/
|
|
36
|
+
afterInit(): void;
|
|
37
|
+
}
|