@ckeditor/ckeditor5-document-outline 38.1.0 → 38.1.1

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.
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x5f28=['config','editing','name','getRootNames','_getOutlineDefinitions','_headingNames','getFirstPosition','editor','length','backward','element','createElement','getRoot','_getActiveHeading','getChild','toModel','view','fire','item','selection','indexOf','push','document','domToView','includes','level','modelElement','_deriveHeadingElementsFromConversion','change','findIndex','afterInit','model','_getHeadingNames'];(function(_0x4b1118,_0x5f283e){const _0x3c6f09=function(_0x1df4e3){while(--_0x1df4e3){_0x4b1118['push'](_0x4b1118['shift']());}};_0x3c6f09(++_0x5f283e);}(_0x5f28,0x19f));const _0x3c6f=function(_0x4b1118,_0x5f283e){_0x4b1118=_0x4b1118-0x0;let _0x3c6f09=_0x5f28[_0x4b1118];return _0x3c6f09;};import{Plugin as _0x16c32c}from'ckeditor5/src/core';import{debounce as _0x52cea0}from'lodash-es';import{TreeWalker as _0x44f784}from'ckeditor5/src/engine';import{getElementText as _0x40aa09,getDefaultFeatureHeadingNames as _0x4c98b1}from'./utils';import{diff as _0x1c37c9,diffToChanges as _0x243fe1}from'ckeditor5/src/utils';export default class n extends _0x16c32c{constructor(){super(...arguments),this[_0x3c6f('0x13')]=[];}static get['pluginName'](){return'DocumentOutlineUtils';}['init'](){const _0x5acf48=this['editor'];this[_0x3c6f('0x13')]=this[_0x3c6f('0xd')]();let _0x1f9877=[];_0x5acf48['model'][_0x3c6f('0x3')]['on']('change',_0x52cea0(()=>{const _0x2fa61d=_0x1f9877;_0x1f9877=this[_0x3c6f('0x12')]();const _0x59c5dd=_0x1c37c9(_0x2fa61d,_0x1f9877,(_0x84e28a,_0x3549bc)=>_0x84e28a[_0x3c6f('0x6')]===_0x3549bc['level']&&_0x84e28a['text']===_0x3549bc['text']&&_0x84e28a[_0x3c6f('0x7')]===_0x3549bc[_0x3c6f('0x7')]),_0x12668f=_0x243fe1(_0x59c5dd,_0x1f9877),_0x380efb=this[_0x3c6f('0x1b')](),_0x29ffaa=_0x1f9877[_0x3c6f('0xa')](_0x40c1e7=>_0x40c1e7[_0x3c6f('0x7')]===_0x380efb);_0x12668f[_0x3c6f('0x16')]&&this[_0x3c6f('0x1f')](_0x3c6f('0x9'),{'outlineDefinitions':_0x1f9877,'activeItemIndex':_0x29ffaa,'outlineChanges':_0x12668f}),this['fire']('activeItemIndex',{'index':_0x29ffaa});},0xfa,{'leading':!0x0,'trailing':!0x0}));}[_0x3c6f('0xb')](){this['_headingNames'][_0x3c6f('0x16')]||this[_0x3c6f('0x8')]();}['_getOutlineDefinitions'](){const _0x33d4b4=this['editor'],_0x4e101b=[],_0x4cb485=this['_headingNames'];for(const _0x41b640 of _0x33d4b4[_0x3c6f('0xc')][_0x3c6f('0x3')][_0x3c6f('0x11')]())_0x285626(_0x33d4b4['model']['document'][_0x3c6f('0x1a')](_0x41b640));function _0x285626(_0x5a945a){for(const _0x2f21ba of _0x5a945a['getChildren']())_0x2f21ba['is'](_0x3c6f('0x18'))&&(_0x4cb485[_0x3c6f('0x5')](_0x2f21ba[_0x3c6f('0x10')])&&_0x4e101b[_0x3c6f('0x2')]({'level':_0x4cb485[_0x3c6f('0x1')](_0x2f21ba[_0x3c6f('0x10')])+0x1,'text':_0x40aa09(_0x2f21ba),'modelElement':_0x2f21ba}),_0x285626(_0x2f21ba));}return _0x4e101b;}[_0x3c6f('0x1b')](){const _0x2af997=this[_0x3c6f('0x15')]['model'][_0x3c6f('0x3')][_0x3c6f('0x0')][_0x3c6f('0x14')](),_0x195993=new _0x44f784({'direction':_0x3c6f('0x17'),'startPosition':_0x2af997});for(const _0xd0ffdd of _0x195993)if(_0xd0ffdd[_0x3c6f('0x20')]['is'](_0x3c6f('0x18'))&&this[_0x3c6f('0x13')][_0x3c6f('0x5')](_0xd0ffdd[_0x3c6f('0x20')][_0x3c6f('0x10')]))return _0xd0ffdd[_0x3c6f('0x20')];}['_getHeadingNames'](){const _0x101f8c=this['editor'][_0x3c6f('0xe')]['get']('documentOutline.headings');return _0x101f8c||_0x4c98b1(this[_0x3c6f('0x15')]);}['_deriveHeadingElementsFromConversion'](){const _0x2d37fa=this['editor'],_0x3ca318=['h1','h2','h3','h4','h5','h6'],_0x2e09d4=[];for(const _0x1b722c of _0x3ca318){const _0xd5021=_0x2d37fa[_0x3c6f('0xf')][_0x3c6f('0x1e')]['domConverter'][_0x3c6f('0x4')](document[_0x3c6f('0x19')](_0x1b722c)),_0x3896b7=_0x2d37fa['data'][_0x3c6f('0x1d')](_0xd5021)[_0x3c6f('0x1c')](0x0);(null==_0x3896b7?void 0x0:_0x3896b7['is'](_0x3c6f('0x18')))&&_0x2e09d4[_0x3c6f('0x2')](_0x3896b7[_0x3c6f('0x10')]);}this['_headingNames']=_0x2e09d4;}}
23
+ const _0xc873=['data','model','_getOutlineDefinitions','document','includes','getChildren','get','change','push','_deriveHeadingElementsFromConversion','pluginName','indexOf','_headingNames','getRootNames','_getActiveHeading','afterInit','length','createElement','fire','backward','editor','item','level','_getHeadingNames','text','toModel','domConverter','modelElement','getChild','selection','init','name','view','element'];(function(_0x386312,_0xc8734a){const _0x2408a2=function(_0x14e865){while(--_0x14e865){_0x386312['push'](_0x386312['shift']());}};_0x2408a2(++_0xc8734a);}(_0xc873,0x151));const _0x2408=function(_0x386312,_0xc8734a){_0x386312=_0x386312-0x0;let _0x2408a2=_0xc873[_0x386312];return _0x2408a2;};import{Plugin as _0x14c693}from'ckeditor5/src/core';import{debounce as _0xf03259}from'lodash-es';import{TreeWalker as _0x2c3077}from'ckeditor5/src/engine';import{getElementText as _0xa09c59,getDefaultFeatureHeadingNames as _0x6d99d3}from'./utils';import{diff as _0x260696,diffToChanges as _0x3c62c5}from'ckeditor5/src/utils';export default class n extends _0x14c693{constructor(){super(...arguments),this[_0x2408('0xf')]=[];}static get[_0x2408('0xd')](){return'DocumentOutlineUtils';}[_0x2408('0x21')](){const _0x207e7b=this['editor'];this[_0x2408('0xf')]=this[_0x2408('0x1a')]();let _0x498430=[];_0x207e7b[_0x2408('0x4')][_0x2408('0x6')]['on'](_0x2408('0xa'),_0xf03259(()=>{const _0x1fa2e7=_0x498430;_0x498430=this['_getOutlineDefinitions']();const _0x47fa0f=_0x260696(_0x1fa2e7,_0x498430,(_0x1e944d,_0x55327d)=>_0x1e944d[_0x2408('0x19')]===_0x55327d[_0x2408('0x19')]&&_0x1e944d[_0x2408('0x1b')]===_0x55327d['text']&&_0x1e944d[_0x2408('0x1e')]===_0x55327d[_0x2408('0x1e')]),_0x390acd=_0x3c62c5(_0x47fa0f,_0x498430),_0x2133cb=this[_0x2408('0x11')](),_0x34aca4=_0x498430['findIndex'](_0x2d050a=>_0x2d050a[_0x2408('0x1e')]===_0x2133cb);_0x390acd[_0x2408('0x13')]&&this[_0x2408('0x15')](_0x2408('0xa'),{'outlineDefinitions':_0x498430,'activeItemIndex':_0x34aca4,'outlineChanges':_0x390acd}),this[_0x2408('0x15')]('activeItemIndex',{'index':_0x34aca4});},0xfa,{'leading':!0x0,'trailing':!0x0}));}[_0x2408('0x12')](){this[_0x2408('0xf')][_0x2408('0x13')]||this[_0x2408('0xc')]();}[_0x2408('0x5')](){const _0x713817=this[_0x2408('0x17')],_0x73fd7e=[],_0x527f47=this[_0x2408('0xf')];for(const _0x2763de of _0x713817[_0x2408('0x4')][_0x2408('0x6')][_0x2408('0x10')]())_0x2d839c(_0x713817[_0x2408('0x4')][_0x2408('0x6')]['getRoot'](_0x2763de));function _0x2d839c(_0x50db75){for(const _0x112b81 of _0x50db75[_0x2408('0x8')]())_0x112b81['is'](_0x2408('0x2'))&&(_0x527f47['includes'](_0x112b81[_0x2408('0x0')])&&_0x73fd7e[_0x2408('0xb')]({'level':_0x527f47[_0x2408('0xe')](_0x112b81[_0x2408('0x0')])+0x1,'text':_0xa09c59(_0x112b81),'modelElement':_0x112b81}),_0x2d839c(_0x112b81));}return _0x73fd7e;}['_getActiveHeading'](){const _0x2a433f=this[_0x2408('0x17')][_0x2408('0x4')][_0x2408('0x6')][_0x2408('0x20')]['getFirstPosition'](),_0x3c246e=new _0x2c3077({'direction':_0x2408('0x16'),'startPosition':_0x2a433f});for(const _0x335df4 of _0x3c246e)if(_0x335df4[_0x2408('0x18')]['is'](_0x2408('0x2'))&&this[_0x2408('0xf')][_0x2408('0x7')](_0x335df4[_0x2408('0x18')][_0x2408('0x0')]))return _0x335df4['item'];}[_0x2408('0x1a')](){const _0x1bff0e=this[_0x2408('0x17')]['config'][_0x2408('0x9')]('documentOutline.headings');return _0x1bff0e||_0x6d99d3(this[_0x2408('0x17')]);}['_deriveHeadingElementsFromConversion'](){const _0x1f47ba=this[_0x2408('0x17')],_0x451ffc=['h1','h2','h3','h4','h5','h6'],_0x13f30a=[];for(const _0x4ed10b of _0x451ffc){const _0x5e793a=_0x1f47ba['editing'][_0x2408('0x1')][_0x2408('0x1d')]['domToView'](document[_0x2408('0x14')](_0x4ed10b)),_0x3d1996=_0x1f47ba[_0x2408('0x3')][_0x2408('0x1c')](_0x5e793a)[_0x2408('0x1f')](0x0);(null==_0x3d1996?void 0x0:_0x3d1996['is'](_0x2408('0x2')))&&_0x13f30a['push'](_0x3d1996[_0x2408('0x0')]);}this[_0x2408('0xf')]=_0x13f30a;}}
@@ -1,55 +1,55 @@
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/ui/documentoutlineitemview
7
- */
8
- import { View } from 'ckeditor5/src/ui';
9
- import { type Locale } from 'ckeditor5/src/utils';
10
- /**
11
- * An item of the document outline.
12
- */
13
- export default class DocumentOutlineItemView extends View {
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
- /**
43
- * Scrolls to this item in the document.
44
- */
45
- scrollTo(): void;
46
- }
47
- /**
48
- * Fired whenever an item in the document outline is clicked.
49
- *
50
- * @eventName ~DocumentOutlineItemView#click
51
- */
52
- export type DocumentOutlineItemViewClickEvent = {
53
- name: 'click';
54
- args: [];
55
- };
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/ui/documentoutlineitemview
7
+ */
8
+ import { View } from 'ckeditor5/src/ui';
9
+ import { type Locale } from 'ckeditor5/src/utils';
10
+ /**
11
+ * An item of the document outline.
12
+ */
13
+ export default class DocumentOutlineItemView extends View {
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
+ /**
43
+ * Scrolls to this item in the document.
44
+ */
45
+ scrollTo(): void;
46
+ }
47
+ /**
48
+ * Fired whenever an item in the document outline is clicked.
49
+ *
50
+ * @eventName ~DocumentOutlineItemView#click
51
+ */
52
+ export type DocumentOutlineItemViewClickEvent = {
53
+ name: 'click';
54
+ args: [];
55
+ };
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{View as _0x403b5d}from'ckeditor5/src/ui';import{scrollAncestorsToShowTarget as _0x57c82b}from'ckeditor5/src/utils';export default class j extends _0x403b5d{constructor(_0x4739f5,_0x23bea5=!0x1){super(_0x4739f5);const t=_0x4739f5['t'],_0x4bc6a6=this['bindTemplate'],_0x4f5e6a=_0x23bea5?'['+t('Empty\x20heading')+']':'';this['set']('text',''),this['set']('level',0x1),this['set']('isActive',!0x1),this['bind']('isEmpty')['to'](this,'text',_0x171550=>!_0x171550),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-document-outline__item',_0x4bc6a6['to']('level',_0x55f136=>'ck-document-outline__item_level-'+_0x55f136),_0x4bc6a6['if']('isActive','ck-document-outline__item_active'),_0x4bc6a6['if']('isEmpty','ck-document-outline__item_empty')],'title':_0x4bc6a6['to']('text')},'children':[{'text':_0x4bc6a6['to']('text',_0x373897=>_0x373897||_0x4f5e6a)}],'on':{'click':_0x4bc6a6['to']('click')}});}['scrollTo'](){_0x57c82b(this['element'],0x14);}}
23
+ import{View as _0x54ebca}from'ckeditor5/src/ui';import{scrollAncestorsToShowTarget as _0x4dd23f}from'ckeditor5/src/utils';export default class j extends _0x54ebca{constructor(_0x34aca1,_0x3924ad=!0x1){super(_0x34aca1);const t=_0x34aca1['t'],_0xe20c39=this['bindTemplate'],_0x31156a=_0x3924ad?'['+t('Empty\x20heading')+']':'';this['set']('text',''),this['set']('level',0x1),this['set']('isActive',!0x1),this['bind']('isEmpty')['to'](this,'text',_0x28d7c6=>!_0x28d7c6),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-document-outline__item',_0xe20c39['to']('level',_0x13952b=>'ck-document-outline__item_level-'+_0x13952b),_0xe20c39['if']('isActive','ck-document-outline__item_active'),_0xe20c39['if']('isEmpty','ck-document-outline__item_empty')],'title':_0xe20c39['to']('text')},'children':[{'text':_0xe20c39['to']('text',_0x121710=>_0x121710||_0x31156a)}],'on':{'click':_0xe20c39['to']('click')}});}['scrollTo'](){_0x4dd23f(this['element'],0x14);}}
@@ -1,44 +1,44 @@
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/ui/documentoutlineview
7
- */
8
- import { View, type ViewCollection } from 'ckeditor5/src/ui';
9
- import { type Locale, type diffToChanges } from 'ckeditor5/src/utils';
10
- import type { OutlineItemDefinition } from '../documentoutlineutils';
11
- import DocumentOutlineItemView from './documentoutlineitemview';
12
- /**
13
- * The document outline panel.
14
- */
15
- export default class DocumentOutlineView extends View {
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
- * @inheritDoc
28
- */
29
- constructor(locale: Locale, showEmptyHeadingText?: boolean);
30
- /**
31
- * If a heading was added or deleted in the editor, insert or delete it in the document outline.
32
- */
33
- sync(changesInItems: ReturnType<typeof diffToChanges<OutlineItemDefinition>>): void;
34
- }
35
- /**
36
- * Fired whenever an item in the document outline is clicked.
37
- *
38
- * @eventName ~DocumentOutlineView#itemSelected
39
- * @param itemIndex Index of selected item.
40
- */
41
- export type DocumentOutlineViewItemSelectedEvent = {
42
- name: 'itemSelected';
43
- args: [itemIndex: number];
44
- };
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/ui/documentoutlineview
7
+ */
8
+ import { View, type ViewCollection } from 'ckeditor5/src/ui';
9
+ import { type Locale, type diffToChanges } from 'ckeditor5/src/utils';
10
+ import type { OutlineItemDefinition } from '../documentoutlineutils';
11
+ import DocumentOutlineItemView from './documentoutlineitemview';
12
+ /**
13
+ * The document outline panel.
14
+ */
15
+ export default class DocumentOutlineView extends View {
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
+ * @inheritDoc
28
+ */
29
+ constructor(locale: Locale, showEmptyHeadingText?: boolean);
30
+ /**
31
+ * If a heading was added or deleted in the editor, insert or delete it in the document outline.
32
+ */
33
+ sync(changesInItems: ReturnType<typeof diffToChanges<OutlineItemDefinition>>): void;
34
+ }
35
+ /**
36
+ * Fired whenever an item in the document outline is clicked.
37
+ *
38
+ * @eventName ~DocumentOutlineView#itemSelected
39
+ * @param itemIndex Index of selected item.
40
+ */
41
+ export type DocumentOutlineViewItemSelectedEvent = {
42
+ name: 'itemSelected';
43
+ args: [itemIndex: number];
44
+ };
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{View as _0x43661e}from'ckeditor5/src/ui';import _0x5d569d from'./documentoutlineitemview';export default class w extends _0x43661e{constructor(_0x4d204e,_0xb1de73=!0x1){super(_0x4d204e);const t=_0x4d204e['t'];this['showEmptyHeadingText']=_0xb1de73,this['set']('activeItemIndex',-0x1),this['items']=this['createCollection'](),this['items']['delegate']('click')['to'](this),this['on']('click',this['_handleItemClick']['bind'](this)),this['on']('change:activeItemIndex',(_0x8b9aab,_0x498d1f,_0x1271d9,_0x226a4b)=>{this['_setActiveItem'](_0x226a4b,_0x1271d9);}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-document-outline'],'dir':_0x4d204e['contentLanguageDirection'],'data-document-outline-empty-placeholder':t('Editor\x20headings\x20will\x20appear\x20here\x20as\x20you\x20type.'),'tabindex':-0x1},'children':this['items']});}['sync'](_0x56ec70){_0x56ec70['forEach'](_0x585ae3=>{'insert'==_0x585ae3['type']?this['_insertItem'](_0x585ae3['index'],..._0x585ae3['values']):'delete'==_0x585ae3['type']&&this['_deleteItem'](_0x585ae3['index'],_0x585ae3['howMany']);});}['_setActiveItem'](_0x1695b9,_0x4a9448){if(-0x1!==_0x1695b9){const _0xaa86c2=this['items']['get'](_0x1695b9);_0xaa86c2&&(_0xaa86c2['isActive']=!0x1);}-0x1!==_0x4a9448&&(this['items']['get'](_0x4a9448)['isActive']=!0x0,this['items']['get'](_0x4a9448)['scrollTo']());}['_insertItem'](_0x30357d,..._0x3a1635){const _0x11fcf4=_0x3a1635['map']((_0x557981,_0x38ec2a)=>{const _0x31261e=new _0x5d569d(this['locale'],this['showEmptyHeadingText']);return _0x31261e['text']=_0x557981['text'],_0x31261e['level']=_0x557981['level'],_0x30357d+_0x38ec2a===this['activeItemIndex']&&(_0x31261e['isActive']=!0x0),_0x31261e;});this['items']['addMany'](_0x11fcf4,_0x30357d);}['_deleteItem'](_0x379405,_0x47140c){do{this['items']['remove'](_0x379405);}while(--_0x47140c);}['_handleItemClick'](_0x22b0df){const _0x18d93e=this['items']['getIndex'](_0x22b0df['source']);this['fire']('itemSelected',_0x18d93e);}}
23
+ import{View as _0x1e0413}from'ckeditor5/src/ui';import _0x506bda from'./documentoutlineitemview';export default class w extends _0x1e0413{constructor(_0x3fe8e6,_0x2b17e7=!0x1){super(_0x3fe8e6);const t=_0x3fe8e6['t'];this['showEmptyHeadingText']=_0x2b17e7,this['set']('activeItemIndex',-0x1),this['items']=this['createCollection'](),this['items']['delegate']('click')['to'](this),this['on']('click',this['_handleItemClick']['bind'](this)),this['on']('change:activeItemIndex',(_0x2cf249,_0x432f25,_0x3717c4,_0x5bd7af)=>{this['_setActiveItem'](_0x5bd7af,_0x3717c4);}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-document-outline'],'dir':_0x3fe8e6['contentLanguageDirection'],'data-document-outline-empty-placeholder':t('Editor\x20headings\x20will\x20appear\x20here\x20as\x20you\x20type.'),'tabindex':-0x1},'children':this['items']});}['sync'](_0x4720d9){_0x4720d9['forEach'](_0x5669e2=>{'insert'==_0x5669e2['type']?this['_insertItem'](_0x5669e2['index'],..._0x5669e2['values']):'delete'==_0x5669e2['type']&&this['_deleteItem'](_0x5669e2['index'],_0x5669e2['howMany']);});}['_setActiveItem'](_0x467a2,_0xdef60e){if(-0x1!==_0x467a2){const _0x50e750=this['items']['get'](_0x467a2);_0x50e750&&(_0x50e750['isActive']=!0x1);}-0x1!==_0xdef60e&&(this['items']['get'](_0xdef60e)['isActive']=!0x0,this['items']['get'](_0xdef60e)['scrollTo']());}['_insertItem'](_0x2000af,..._0x1bcc48){const _0x39feee=_0x1bcc48['map']((_0x195dc4,_0xd994a)=>{const _0x3e0d75=new _0x506bda(this['locale'],this['showEmptyHeadingText']);return _0x3e0d75['text']=_0x195dc4['text'],_0x3e0d75['level']=_0x195dc4['level'],_0x2000af+_0xd994a===this['activeItemIndex']&&(_0x3e0d75['isActive']=!0x0),_0x3e0d75;});this['items']['addMany'](_0x39feee,_0x2000af);}['_deleteItem'](_0x265bc0,_0x153015){do{this['items']['remove'](_0x265bc0);}while(--_0x153015);}['_handleItemClick'](_0x2df037){const _0x6002a8=this['items']['getIndex'](_0x2df037['source']);this['fire']('itemSelected',_0x6002a8);}}
@@ -1,17 +1,17 @@
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/utils
7
- */
8
- import { type Element } from 'ckeditor5/src/engine';
9
- import { type Editor } from 'ckeditor5/src/core';
10
- /**
11
- * Returns all text contents that are inside the given element and all its children.
12
- */
13
- export declare function getElementText(element: Element): string;
14
- /**
15
- * Returns a list of standard headings or GHS headings configured in the editor.
16
- */
17
- export declare function getDefaultFeatureHeadingNames(editor: Editor): Array<string>;
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/utils
7
+ */
8
+ import { type Element } from 'ckeditor5/src/engine';
9
+ import { type Editor } from 'ckeditor5/src/core';
10
+ /**
11
+ * Returns all text contents that are inside the given element and all its children.
12
+ */
13
+ export declare function getElementText(element: Element): string;
14
+ /**
15
+ * Returns a list of standard headings or GHS headings configured in the editor.
16
+ */
17
+ export declare function getDefaultFeatureHeadingNames(editor: Editor): Array<string>;
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x3c19=['model','htmlH4','htmlH5','paragraph','htmlH1','htmlH6','heading.options','get','getChildren','GeneralHtmlSupport'];(function(_0xbcbb70,_0x3c1977){const _0x3907c7=function(_0x5d8bed){while(--_0x5d8bed){_0xbcbb70['push'](_0xbcbb70['shift']());}};_0x3907c7(++_0x3c1977);}(_0x3c19,0x95));const _0x3907=function(_0xbcbb70,_0x3c1977){_0xbcbb70=_0xbcbb70-0x0;let _0x3907c7=_0x3c19[_0xbcbb70];return _0x3907c7;};import{Text as _0x1b20d6}from'ckeditor5/src/engine';export function getElementText(_0x5edd05){let _0x576251='';for(const _0x81ef8f of _0x5edd05[_0x3907('0x9')]())_0x81ef8f instanceof _0x1b20d6&&(_0x576251+=_0x81ef8f['data']);return _0x576251;}export function getDefaultFeatureHeadingNames(_0x44bb77){const _0x165d39=_0x44bb77['config'][_0x3907('0x8')](_0x3907('0x7'));return _0x165d39?_0x165d39['reduce']((_0xc1e6b2,_0x255d4d)=>(_0x3907('0x4')!==_0x255d4d['model']&&_0xc1e6b2['push'](_0x255d4d[_0x3907('0x1')]),_0xc1e6b2),[]):_0x44bb77['plugins']['has'](_0x3907('0x0'))?[_0x3907('0x5'),'htmlH2','htmlH3',_0x3907('0x2'),_0x3907('0x3'),_0x3907('0x6')]:[];}
23
+ const _0x26c8=['heading.options','reduce','model','htmlH1','plugins','paragraph','GeneralHtmlSupport','data','getChildren','config','htmlH3','htmlH5'];(function(_0x1af8ba,_0x26c8ce){const _0x1834c1=function(_0x3efd33){while(--_0x3efd33){_0x1af8ba['push'](_0x1af8ba['shift']());}};_0x1834c1(++_0x26c8ce);}(_0x26c8,0xd5));const _0x1834=function(_0x1af8ba,_0x26c8ce){_0x1af8ba=_0x1af8ba-0x0;let _0x1834c1=_0x26c8[_0x1af8ba];return _0x1834c1;};import{Text as _0x40d73d}from'ckeditor5/src/engine';export function getElementText(_0x478263){let _0xf9c57f='';for(const _0x5f3dff of _0x478263[_0x1834('0xb')]())_0x5f3dff instanceof _0x40d73d&&(_0xf9c57f+=_0x5f3dff[_0x1834('0xa')]);return _0xf9c57f;}export function getDefaultFeatureHeadingNames(_0x54b83c){const _0x183e00=_0x54b83c[_0x1834('0x0')]['get'](_0x1834('0x3'));return _0x183e00?_0x183e00[_0x1834('0x4')]((_0x38c5bd,_0x3f421a)=>(_0x1834('0x8')!==_0x3f421a[_0x1834('0x5')]&&_0x38c5bd['push'](_0x3f421a[_0x1834('0x5')]),_0x38c5bd),[]):_0x54b83c[_0x1834('0x7')]['has'](_0x1834('0x9'))?[_0x1834('0x6'),'htmlH2',_0x1834('0x1'),'htmlH4',_0x1834('0x2'),'htmlH6']:[];}
@@ -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
+ }
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0xdea5=['documentOutlineLicenseKeyTrial','init','licenseKey','documentOutlineLicenseKeyInvalid','documentOutlineLicenseKeyValid','_licenseKeyCheckInterval','editor','requires','document-outline-invalid-license-key','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.','info','destroy','config','document-outline-trial-license-key-reached-limit-changes'];(function(_0x2377f6,_0xdea5d7){const _0x380417=function(_0x317766){while(--_0x317766){_0x2377f6['push'](_0x2377f6['shift']());}};_0x380417(++_0xdea5d7);}(_0xdea5,0x6d));const _0x3804=function(_0x2377f6,_0xdea5d7){_0x2377f6=_0x2377f6-0x0;let _0x380417=_0xdea5[_0x2377f6];return _0x380417;};import{Plugin as _0x36f191}from'ckeditor5/src/core';import{CKEditorError as _0x54226b}from'ckeditor5/src/utils';import _0xf1a69b from'./documentoutline/documentoutlineutils';import _0x8b08aa from'./documentoutline/documentoutlineui';export default class l extends _0x36f191{static get[_0x3804('0xa')](){return[_0xf1a69b,_0x8b08aa];}static get['pluginName'](){return'DocumentOutline';}constructor(_0xfef4bf){super(_0xfef4bf),this[_0x3804('0x8')]=null;}[_0x3804('0x4')](){const _0x462d7e=this['editor'];this['licenseKey']=_0x462d7e[_0x3804('0x1')]['get'](_0x3804('0x5'));const _0x1125c2=this[_0x3804('0x9')];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x21cf9a;for(const _0x30c540 in _0x1125c2){const _0x137a2a=_0x30c540,_0x49d096=_0x1125c2[_0x137a2a];if(_0x3804('0x3')===_0x49d096||_0x3804('0x6')===_0x49d096||_0x3804('0x7')===_0x49d096||'documentOutlineLicenseKeyTrialLimit:operations'===_0x49d096){delete _0x1125c2[_0x137a2a],_0x21cf9a=_0x49d096;break;}}if(_0x3804('0x6')===_0x21cf9a)throw clearInterval(this[_0x3804('0x8')]),new _0x54226b(_0x3804('0xb'),null);if(_0x3804('0x3')===_0x21cf9a&&console[_0x3804('0xd')](_0x3804('0xc')),'documentOutlineLicenseKeyTrialLimit:operations'===_0x21cf9a)throw clearInterval(this[_0x3804('0x8')]),new _0x54226b(_0x3804('0x2'),null);_0x3804('0x7')===_0x21cf9a&&clearInterval(this[_0x3804('0x8')]);},0x3e8);}[_0x3804('0x0')](){this[_0x3804('0x8')]&&clearInterval(this['_licenseKeyCheckInterval']);}}
23
+ const _0x1019=['documentOutlineLicenseKeyInvalid','documentOutlineLicenseKeyTrial','documentOutlineLicenseKeyTrialLimit:operations','init','get','config','requires','DocumentOutline','_licenseKeyCheckInterval','documentOutlineLicenseKeyValid','licenseKey','info'];(function(_0x5dc540,_0x1019d2){const _0x5d95ac=function(_0x24803e){while(--_0x24803e){_0x5dc540['push'](_0x5dc540['shift']());}};_0x5d95ac(++_0x1019d2);}(_0x1019,0x1ee));const _0x5d95=function(_0x5dc540,_0x1019d2){_0x5dc540=_0x5dc540-0x0;let _0x5d95ac=_0x1019[_0x5dc540];return _0x5d95ac;};import{Plugin as _0x2e2c9b}from'ckeditor5/src/core';import{CKEditorError as _0x28572e}from'ckeditor5/src/utils';import _0x59ad4e from'./documentoutline/documentoutlineutils';import _0x584b9a from'./documentoutline/documentoutlineui';export default class l extends _0x2e2c9b{static get[_0x5d95('0x4')](){return[_0x59ad4e,_0x584b9a];}static get['pluginName'](){return _0x5d95('0x5');}constructor(_0x3f3dfa){super(_0x3f3dfa),this[_0x5d95('0x6')]=null;}[_0x5d95('0x1')](){const _0x476d25=this['editor'];this['licenseKey']=_0x476d25[_0x5d95('0x3')][_0x5d95('0x2')](_0x5d95('0x8'));const _0xfac9dc=this['editor'];this[_0x5d95('0x6')]=setInterval(()=>{let _0x1c5b51;for(const _0x228449 in _0xfac9dc){const _0x109674=_0x228449,_0x552dcf=_0xfac9dc[_0x109674];if(_0x5d95('0xb')===_0x552dcf||_0x5d95('0xa')===_0x552dcf||_0x5d95('0x7')===_0x552dcf||_0x5d95('0x0')===_0x552dcf){delete _0xfac9dc[_0x109674],_0x1c5b51=_0x552dcf;break;}}if(_0x5d95('0xa')===_0x1c5b51)throw clearInterval(this[_0x5d95('0x6')]),new _0x28572e('document-outline-invalid-license-key',null);if('documentOutlineLicenseKeyTrial'===_0x1c5b51&&console[_0x5d95('0x9')]('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.'),_0x5d95('0x0')===_0x1c5b51)throw clearInterval(this['_licenseKeyCheckInterval']),new _0x28572e('document-outline-trial-license-key-reached-limit-changes',null);_0x5d95('0x7')===_0x1c5b51&&clearInterval(this[_0x5d95('0x6')]);},0x3e8);}['destroy'](){this['_licenseKeyCheckInterval']&&clearInterval(this[_0x5d95('0x6')]);}}
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 _0x205955 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':_0x205955};import'./augmentation';
23
+ export{default as DocumentOutline}from'./documentoutline';export{default as DocumentOutlineUI}from'./documentoutline/documentoutlineui';export{default as DocumentOutlineUtils}from'./documentoutline/documentoutlineutils';import _0x3c79eb 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':_0x3c79eb};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
+ }