@ckeditor/ckeditor5-indent 0.0.0-internal-20241017.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/CHANGELOG.md +4 -0
- package/LICENSE.md +17 -0
- package/README.md +26 -0
- package/build/indent.js +5 -0
- package/build/translations/ar.js +1 -0
- package/build/translations/az.js +1 -0
- package/build/translations/bg.js +1 -0
- package/build/translations/bn.js +1 -0
- package/build/translations/ca.js +1 -0
- package/build/translations/cs.js +1 -0
- package/build/translations/da.js +1 -0
- package/build/translations/de-ch.js +1 -0
- package/build/translations/de.js +1 -0
- package/build/translations/el.js +1 -0
- package/build/translations/en-au.js +1 -0
- package/build/translations/en-gb.js +1 -0
- package/build/translations/es.js +1 -0
- package/build/translations/et.js +1 -0
- package/build/translations/fa.js +1 -0
- package/build/translations/fi.js +1 -0
- package/build/translations/fr.js +1 -0
- package/build/translations/gl.js +1 -0
- package/build/translations/he.js +1 -0
- package/build/translations/hi.js +1 -0
- package/build/translations/hr.js +1 -0
- package/build/translations/hu.js +1 -0
- package/build/translations/id.js +1 -0
- package/build/translations/it.js +1 -0
- package/build/translations/ja.js +1 -0
- package/build/translations/ko.js +1 -0
- package/build/translations/ku.js +1 -0
- package/build/translations/lt.js +1 -0
- package/build/translations/lv.js +1 -0
- package/build/translations/ms.js +1 -0
- package/build/translations/ne.js +1 -0
- package/build/translations/nl.js +1 -0
- package/build/translations/no.js +1 -0
- package/build/translations/pl.js +1 -0
- package/build/translations/pt-br.js +1 -0
- package/build/translations/pt.js +1 -0
- package/build/translations/ro.js +1 -0
- package/build/translations/ru.js +1 -0
- package/build/translations/sk.js +1 -0
- package/build/translations/sr-latn.js +1 -0
- package/build/translations/sr.js +1 -0
- package/build/translations/sv.js +1 -0
- package/build/translations/th.js +1 -0
- package/build/translations/tk.js +1 -0
- package/build/translations/tr.js +1 -0
- package/build/translations/ug.js +1 -0
- package/build/translations/uk.js +1 -0
- package/build/translations/ur.js +1 -0
- package/build/translations/uz.js +1 -0
- package/build/translations/vi.js +1 -0
- package/build/translations/zh-cn.js +1 -0
- package/build/translations/zh.js +1 -0
- package/ckeditor5-metadata.json +49 -0
- package/dist/augmentation.d.ts +28 -0
- package/dist/indent.d.ts +48 -0
- package/dist/indentblock.d.ts +50 -0
- package/dist/indentblockcommand.d.ts +60 -0
- package/dist/indentcommandbehavior/indentbehavior.d.ts +29 -0
- package/dist/indentcommandbehavior/indentusingclasses.d.ts +43 -0
- package/dist/indentcommandbehavior/indentusingoffset.d.ts +49 -0
- package/dist/indentconfig.d.ts +76 -0
- package/dist/indentediting.d.ts +34 -0
- package/dist/indentui.d.ts +39 -0
- package/dist/index-content.css +4 -0
- package/dist/index-editor.css +4 -0
- package/dist/index.css +4 -0
- package/dist/index.d.ts +18 -0
- package/dist/index.js +466 -0
- package/dist/index.js.map +1 -0
- package/dist/translations/ar.d.ts +8 -0
- package/dist/translations/ar.js +5 -0
- package/dist/translations/ar.umd.js +11 -0
- package/dist/translations/az.d.ts +8 -0
- package/dist/translations/az.js +5 -0
- package/dist/translations/az.umd.js +11 -0
- package/dist/translations/bg.d.ts +8 -0
- package/dist/translations/bg.js +5 -0
- package/dist/translations/bg.umd.js +11 -0
- package/dist/translations/bn.d.ts +8 -0
- package/dist/translations/bn.js +5 -0
- package/dist/translations/bn.umd.js +11 -0
- package/dist/translations/ca.d.ts +8 -0
- package/dist/translations/ca.js +5 -0
- package/dist/translations/ca.umd.js +11 -0
- package/dist/translations/cs.d.ts +8 -0
- package/dist/translations/cs.js +5 -0
- package/dist/translations/cs.umd.js +11 -0
- package/dist/translations/da.d.ts +8 -0
- package/dist/translations/da.js +5 -0
- package/dist/translations/da.umd.js +11 -0
- package/dist/translations/de-ch.d.ts +8 -0
- package/dist/translations/de-ch.js +5 -0
- package/dist/translations/de-ch.umd.js +11 -0
- package/dist/translations/de.d.ts +8 -0
- package/dist/translations/de.js +5 -0
- package/dist/translations/de.umd.js +11 -0
- package/dist/translations/el.d.ts +8 -0
- package/dist/translations/el.js +5 -0
- package/dist/translations/el.umd.js +11 -0
- package/dist/translations/en-au.d.ts +8 -0
- package/dist/translations/en-au.js +5 -0
- package/dist/translations/en-au.umd.js +11 -0
- package/dist/translations/en-gb.d.ts +8 -0
- package/dist/translations/en-gb.js +5 -0
- package/dist/translations/en-gb.umd.js +11 -0
- package/dist/translations/en.d.ts +8 -0
- package/dist/translations/en.js +5 -0
- package/dist/translations/en.umd.js +11 -0
- package/dist/translations/es.d.ts +8 -0
- package/dist/translations/es.js +5 -0
- package/dist/translations/es.umd.js +11 -0
- package/dist/translations/et.d.ts +8 -0
- package/dist/translations/et.js +5 -0
- package/dist/translations/et.umd.js +11 -0
- package/dist/translations/fa.d.ts +8 -0
- package/dist/translations/fa.js +5 -0
- package/dist/translations/fa.umd.js +11 -0
- package/dist/translations/fi.d.ts +8 -0
- package/dist/translations/fi.js +5 -0
- package/dist/translations/fi.umd.js +11 -0
- package/dist/translations/fr.d.ts +8 -0
- package/dist/translations/fr.js +5 -0
- package/dist/translations/fr.umd.js +11 -0
- package/dist/translations/gl.d.ts +8 -0
- package/dist/translations/gl.js +5 -0
- package/dist/translations/gl.umd.js +11 -0
- package/dist/translations/he.d.ts +8 -0
- package/dist/translations/he.js +5 -0
- package/dist/translations/he.umd.js +11 -0
- package/dist/translations/hi.d.ts +8 -0
- package/dist/translations/hi.js +5 -0
- package/dist/translations/hi.umd.js +11 -0
- package/dist/translations/hr.d.ts +8 -0
- package/dist/translations/hr.js +5 -0
- package/dist/translations/hr.umd.js +11 -0
- package/dist/translations/hu.d.ts +8 -0
- package/dist/translations/hu.js +5 -0
- package/dist/translations/hu.umd.js +11 -0
- package/dist/translations/id.d.ts +8 -0
- package/dist/translations/id.js +5 -0
- package/dist/translations/id.umd.js +11 -0
- package/dist/translations/it.d.ts +8 -0
- package/dist/translations/it.js +5 -0
- package/dist/translations/it.umd.js +11 -0
- package/dist/translations/ja.d.ts +8 -0
- package/dist/translations/ja.js +5 -0
- package/dist/translations/ja.umd.js +11 -0
- package/dist/translations/ko.d.ts +8 -0
- package/dist/translations/ko.js +5 -0
- package/dist/translations/ko.umd.js +11 -0
- package/dist/translations/ku.d.ts +8 -0
- package/dist/translations/ku.js +5 -0
- package/dist/translations/ku.umd.js +11 -0
- package/dist/translations/lt.d.ts +8 -0
- package/dist/translations/lt.js +5 -0
- package/dist/translations/lt.umd.js +11 -0
- package/dist/translations/lv.d.ts +8 -0
- package/dist/translations/lv.js +5 -0
- package/dist/translations/lv.umd.js +11 -0
- package/dist/translations/ms.d.ts +8 -0
- package/dist/translations/ms.js +5 -0
- package/dist/translations/ms.umd.js +11 -0
- package/dist/translations/ne.d.ts +8 -0
- package/dist/translations/ne.js +5 -0
- package/dist/translations/ne.umd.js +11 -0
- package/dist/translations/nl.d.ts +8 -0
- package/dist/translations/nl.js +5 -0
- package/dist/translations/nl.umd.js +11 -0
- package/dist/translations/no.d.ts +8 -0
- package/dist/translations/no.js +5 -0
- package/dist/translations/no.umd.js +11 -0
- package/dist/translations/pl.d.ts +8 -0
- package/dist/translations/pl.js +5 -0
- package/dist/translations/pl.umd.js +11 -0
- package/dist/translations/pt-br.d.ts +8 -0
- package/dist/translations/pt-br.js +5 -0
- package/dist/translations/pt-br.umd.js +11 -0
- package/dist/translations/pt.d.ts +8 -0
- package/dist/translations/pt.js +5 -0
- package/dist/translations/pt.umd.js +11 -0
- package/dist/translations/ro.d.ts +8 -0
- package/dist/translations/ro.js +5 -0
- package/dist/translations/ro.umd.js +11 -0
- package/dist/translations/ru.d.ts +8 -0
- package/dist/translations/ru.js +5 -0
- package/dist/translations/ru.umd.js +11 -0
- package/dist/translations/sk.d.ts +8 -0
- package/dist/translations/sk.js +5 -0
- package/dist/translations/sk.umd.js +11 -0
- package/dist/translations/sr-latn.d.ts +8 -0
- package/dist/translations/sr-latn.js +5 -0
- package/dist/translations/sr-latn.umd.js +11 -0
- package/dist/translations/sr.d.ts +8 -0
- package/dist/translations/sr.js +5 -0
- package/dist/translations/sr.umd.js +11 -0
- package/dist/translations/sv.d.ts +8 -0
- package/dist/translations/sv.js +5 -0
- package/dist/translations/sv.umd.js +11 -0
- package/dist/translations/th.d.ts +8 -0
- package/dist/translations/th.js +5 -0
- package/dist/translations/th.umd.js +11 -0
- package/dist/translations/tk.d.ts +8 -0
- package/dist/translations/tk.js +5 -0
- package/dist/translations/tk.umd.js +11 -0
- package/dist/translations/tr.d.ts +8 -0
- package/dist/translations/tr.js +5 -0
- package/dist/translations/tr.umd.js +11 -0
- package/dist/translations/ug.d.ts +8 -0
- package/dist/translations/ug.js +5 -0
- package/dist/translations/ug.umd.js +11 -0
- package/dist/translations/uk.d.ts +8 -0
- package/dist/translations/uk.js +5 -0
- package/dist/translations/uk.umd.js +11 -0
- package/dist/translations/ur.d.ts +8 -0
- package/dist/translations/ur.js +5 -0
- package/dist/translations/ur.umd.js +11 -0
- package/dist/translations/uz.d.ts +8 -0
- package/dist/translations/uz.js +5 -0
- package/dist/translations/uz.umd.js +11 -0
- package/dist/translations/vi.d.ts +8 -0
- package/dist/translations/vi.js +5 -0
- package/dist/translations/vi.umd.js +11 -0
- package/dist/translations/zh-cn.d.ts +8 -0
- package/dist/translations/zh-cn.js +5 -0
- package/dist/translations/zh-cn.umd.js +11 -0
- package/dist/translations/zh.d.ts +8 -0
- package/dist/translations/zh.js +5 -0
- package/dist/translations/zh.umd.js +11 -0
- package/lang/contexts.json +4 -0
- package/lang/translations/ar.po +26 -0
- package/lang/translations/az.po +26 -0
- package/lang/translations/bg.po +26 -0
- package/lang/translations/bn.po +26 -0
- package/lang/translations/ca.po +26 -0
- package/lang/translations/cs.po +26 -0
- package/lang/translations/da.po +26 -0
- package/lang/translations/de-ch.po +26 -0
- package/lang/translations/de.po +26 -0
- package/lang/translations/el.po +26 -0
- package/lang/translations/en-au.po +26 -0
- package/lang/translations/en-gb.po +26 -0
- package/lang/translations/en.po +26 -0
- package/lang/translations/es.po +26 -0
- package/lang/translations/et.po +26 -0
- package/lang/translations/fa.po +26 -0
- package/lang/translations/fi.po +26 -0
- package/lang/translations/fr.po +26 -0
- package/lang/translations/gl.po +26 -0
- package/lang/translations/he.po +26 -0
- package/lang/translations/hi.po +26 -0
- package/lang/translations/hr.po +26 -0
- package/lang/translations/hu.po +26 -0
- package/lang/translations/id.po +26 -0
- package/lang/translations/it.po +26 -0
- package/lang/translations/ja.po +26 -0
- package/lang/translations/ko.po +26 -0
- package/lang/translations/ku.po +26 -0
- package/lang/translations/lt.po +26 -0
- package/lang/translations/lv.po +26 -0
- package/lang/translations/ms.po +26 -0
- package/lang/translations/ne.po +26 -0
- package/lang/translations/nl.po +26 -0
- package/lang/translations/no.po +26 -0
- package/lang/translations/pl.po +26 -0
- package/lang/translations/pt-br.po +26 -0
- package/lang/translations/pt.po +26 -0
- package/lang/translations/ro.po +26 -0
- package/lang/translations/ru.po +26 -0
- package/lang/translations/sk.po +26 -0
- package/lang/translations/sr-latn.po +26 -0
- package/lang/translations/sr.po +26 -0
- package/lang/translations/sv.po +26 -0
- package/lang/translations/th.po +26 -0
- package/lang/translations/tk.po +26 -0
- package/lang/translations/tr.po +26 -0
- package/lang/translations/ug.po +26 -0
- package/lang/translations/uk.po +26 -0
- package/lang/translations/ur.po +26 -0
- package/lang/translations/uz.po +26 -0
- package/lang/translations/vi.po +26 -0
- package/lang/translations/zh-cn.po +26 -0
- package/lang/translations/zh.po +26 -0
- package/package.json +42 -0
- package/src/augmentation.d.ts +24 -0
- package/src/augmentation.js +5 -0
- package/src/indent.d.ts +44 -0
- package/src/indent.js +50 -0
- package/src/indentblock.d.ts +46 -0
- package/src/indentblock.js +153 -0
- package/src/indentblockcommand.d.ts +56 -0
- package/src/indentblockcommand.js +98 -0
- package/src/indentcommandbehavior/indentbehavior.d.ts +25 -0
- package/src/indentcommandbehavior/indentbehavior.js +5 -0
- package/src/indentcommandbehavior/indentusingclasses.d.ts +39 -0
- package/src/indentcommandbehavior/indentusingclasses.js +39 -0
- package/src/indentcommandbehavior/indentusingoffset.d.ts +45 -0
- package/src/indentcommandbehavior/indentusingoffset.js +42 -0
- package/src/indentconfig.d.ts +72 -0
- package/src/indentconfig.js +5 -0
- package/src/indentediting.d.ts +30 -0
- package/src/indentediting.js +38 -0
- package/src/indentui.d.ts +35 -0
- package/src/indentui.js +78 -0
- package/src/index.d.ts +14 -0
- package/src/index.js +12 -0
package/CHANGELOG.md
ADDED
package/LICENSE.md
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
Software License Agreement
|
|
2
|
+
==========================
|
|
3
|
+
|
|
4
|
+
**CKEditor 5 block indentation feature** – https://github.com/ckeditor/ckeditor5-indent <br>
|
|
5
|
+
Copyright (c) 2003–2024, [CKSource Holding sp. z o.o.](https://cksource.com) All rights reserved.
|
|
6
|
+
|
|
7
|
+
Licensed under the terms of [GNU General Public License Version 2 or later](http://www.gnu.org/licenses/gpl.html).
|
|
8
|
+
|
|
9
|
+
Sources of Intellectual Property Included in CKEditor
|
|
10
|
+
-----------------------------------------------------
|
|
11
|
+
|
|
12
|
+
Where not otherwise indicated, all CKEditor content is authored by CKSource engineers and consists of CKSource-owned intellectual property. In some specific instances, CKEditor will incorporate work done by developers outside of CKSource with their express permission.
|
|
13
|
+
|
|
14
|
+
Trademarks
|
|
15
|
+
----------
|
|
16
|
+
|
|
17
|
+
**CKEditor** is a trademark of [CKSource Holding sp. z o.o.](https://cksource.com) All other brand and product names are trademarks, registered trademarks, or service marks of their respective holders.
|
package/README.md
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
CKEditor 5 block indentation feature
|
|
2
|
+
====================================
|
|
3
|
+
|
|
4
|
+
[](https://www.npmjs.com/package/@ckeditor/ckeditor5-indent)
|
|
5
|
+
[](https://coveralls.io/github/ckeditor/ckeditor5?branch=master)
|
|
6
|
+
[](https://app.travis-ci.com/github/ckeditor/ckeditor5)
|
|
7
|
+
|
|
8
|
+
This package implements block indentation support for CKEditor 5.
|
|
9
|
+
|
|
10
|
+
## Demo
|
|
11
|
+
|
|
12
|
+
Check out the [demo in the Block indentation feature guide](https://ckeditor.com/docs/ckeditor5/latest/features/indent.html#demo).
|
|
13
|
+
|
|
14
|
+
## Documentation
|
|
15
|
+
|
|
16
|
+
See the [`@ckeditor/ckeditor5-indent` package](https://ckeditor.com/docs/ckeditor5/latest/api/indent.html) page in [CKEditor 5 documentation](https://ckeditor.com/docs/ckeditor5/latest/).
|
|
17
|
+
|
|
18
|
+
## Installation
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
npm install ckeditor5
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## License
|
|
25
|
+
|
|
26
|
+
Licensed under the terms of [GNU General Public License Version 2 or later](http://www.gnu.org/licenses/gpl.html). For full details about the license, please check the `LICENSE.md` file or [https://ckeditor.com/legal/ckeditor-oss-license](https://ckeditor.com/legal/ckeditor-oss-license).
|
package/build/indent.js
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
!function(t){const e=t.en=t.en||{};e.dictionary=Object.assign(e.dictionary||{},{"Decrease indent":"Decrease indent","Increase indent":"Increase indent"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={})),
|
|
2
|
+
/*!
|
|
3
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
4
|
+
* For licensing, see LICENSE.md.
|
|
5
|
+
*/(()=>{var t={782:(t,e,n)=>{t.exports=n(237)("./src/core.js")},783:(t,e,n)=>{t.exports=n(237)("./src/engine.js")},311:(t,e,n)=>{t.exports=n(237)("./src/ui.js")},584:(t,e,n)=>{t.exports=n(237)("./src/utils.js")},237:t=>{"use strict";t.exports=CKEditor5.dll}},e={};function n(i){var s=e[i];if(void 0!==s)return s.exports;var o=e[i]={exports:{}};return t[i](o,o.exports,n),o.exports}n.d=(t,e)=>{for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var i={};(()=>{"use strict";n.r(i),n.d(i,{Indent:()=>r,IndentBlock:()=>h,IndentEditing:()=>e,IndentUI:()=>o});var t=n(782);class e extends t.Plugin{static get pluginName(){return"IndentEditing"}static get isOfficialPlugin(){return!0}init(){const e=this.editor;e.commands.add("indent",new t.MultiCommand(e)),e.commands.add("outdent",new t.MultiCommand(e))}}var s=n(311);class o extends t.Plugin{static get pluginName(){return"IndentUI"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,n=e.locale,i=e.t,s="ltr"==n.uiLanguageDirection?t.icons.indent:t.icons.outdent,o="ltr"==n.uiLanguageDirection?t.icons.outdent:t.icons.indent;this._defineButton("indent",i("Increase indent"),s),this._defineButton("outdent",i("Decrease indent"),o)}_defineButton(t,e,n){const i=this.editor;i.ui.componentFactory.add(t,(()=>{const i=this._createButton(s.ButtonView,t,e,n);return i.set({tooltip:!0}),i})),i.ui.componentFactory.add("menuBar:"+t,(()=>this._createButton(s.MenuBarMenuListItemButtonView,t,e,n)))}_createButton(t,e,n,i){const s=this.editor,o=s.commands.get(e),r=new t(s.locale);return r.set({label:n,icon:i}),r.bind("isEnabled").to(o,"isEnabled"),this.listenTo(r,"execute",(()=>{s.execute(e),s.editing.view.focus()})),r}}class r extends t.Plugin{static get pluginName(){return"Indent"}static get isOfficialPlugin(){return!0}static get requires(){return[e,o]}}var d=n(783),a=n(584);class c extends t.Command{constructor(t,e){super(t),this._indentBehavior=e}refresh(){const t=this.editor.model,e=(0,a.first)(t.document.selection.getSelectedBlocks());e&&this._isIndentationChangeAllowed(e)?this.isEnabled=this._indentBehavior.checkEnabled(e.getAttribute("blockIndent")):this.isEnabled=!1}execute(){const t=this.editor.model,e=this._getBlocksToChange();t.change((t=>{for(const n of e){const e=n.getAttribute("blockIndent"),i=this._indentBehavior.getNextIndent(e);i?t.setAttribute("blockIndent",i,n):t.removeAttribute("blockIndent",n)}}))}_getBlocksToChange(){const t=this.editor.model.document.selection;return Array.from(t.getSelectedBlocks()).filter((t=>this._isIndentationChangeAllowed(t)))}_isIndentationChangeAllowed(t){const e=this.editor;if(!e.model.schema.checkAttribute(t,"blockIndent"))return!1;if(!e.plugins.has("ListUtils"))return!0;if(!this._indentBehavior.isForward)return!0;return!e.plugins.get("ListUtils").isListItemBlock(t)}}class l{constructor(t){this.isForward="forward"===t.direction,this.offset=t.offset,this.unit=t.unit}checkEnabled(t){const e=parseFloat(t||"0");return this.isForward||e>0}getNextIndent(t){const e=parseFloat(t||"0");if(!(!t||t.endsWith(this.unit)))return this.isForward?this.offset+this.unit:void 0;const n=e+(this.isForward?this.offset:-this.offset);return n>0?n+this.unit:void 0}}class u{constructor(t){this.isForward="forward"===t.direction,this.classes=t.classes}checkEnabled(t){const e=this.classes.indexOf(t);return this.isForward?e<this.classes.length-1:e>=0}getNextIndent(t){const e=this.classes.indexOf(t),n=this.isForward?1:-1;return this.classes[e+n]}}const g=["paragraph","heading1","heading2","heading3","heading4","heading5","heading6"];class h extends t.Plugin{constructor(t){super(t),t.config.define("indentBlock",{offset:40,unit:"px"})}static get pluginName(){return"IndentBlock"}static get isOfficialPlugin(){return!0}init(){const t=this.editor,e=t.config.get("indentBlock");e.classes&&e.classes.length?(this._setupConversionUsingClasses(e.classes),t.commands.add("indentBlock",new c(t,new u({direction:"forward",classes:e.classes}))),t.commands.add("outdentBlock",new c(t,new u({direction:"backward",classes:e.classes})))):(t.data.addStyleProcessorRules(d.addMarginRules),this._setupConversionUsingOffset(),t.commands.add("indentBlock",new c(t,new l({direction:"forward",offset:e.offset,unit:e.unit}))),t.commands.add("outdentBlock",new c(t,new l({direction:"backward",offset:e.offset,unit:e.unit}))))}afterInit(){const t=this.editor,e=t.model.schema,n=t.commands.get("indent"),i=t.commands.get("outdent"),s=t.config.get("heading.options");(s&&s.map((t=>t.model))||g).forEach((t=>{e.isRegistered(t)&&e.extend(t,{allowAttributes:"blockIndent"})})),e.setAttributeProperties("blockIndent",{isFormatting:!0}),n.registerChildCommand(t.commands.get("indentBlock")),i.registerChildCommand(t.commands.get("outdentBlock"))}_setupConversionUsingOffset(){const t=this.editor.conversion,e="rtl"===this.editor.locale.contentLanguageDirection?"margin-right":"margin-left";t.for("upcast").attributeToAttribute({view:{styles:{[e]:/[\s\S]+/}},model:{key:"blockIndent",value:t=>{if(!t.is("element","li"))return t.getStyle(e)}}}),t.for("downcast").attributeToAttribute({model:"blockIndent",view:t=>({key:"style",value:{[e]:t}})})}_setupConversionUsingClasses(t){const e={model:{key:"blockIndent",values:[]},view:{}};for(const n of t)e.model.values.push(n),e.view[n]={key:"class",value:[n]};this.editor.conversion.attributeToAttribute(e)}}})(),(window.CKEditor5=window.CKEditor5||{}).indent=i})();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(n){const i=n.ar=n.ar||{};i.dictionary=Object.assign(i.dictionary||{},{"Decrease indent":"تقليص المسافة البادئة","Increase indent":"زيادة المسافة البادئة"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(i){const n=i.az=i.az||{};n.dictionary=Object.assign(n.dictionary||{},{"Decrease indent":"Boş yeri kiçilt","Increase indent":"Boş yeri böyüt"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(n){const i=n.bg=n.bg||{};i.dictionary=Object.assign(i.dictionary||{},{"Decrease indent":"Намали отстъпа","Increase indent":"Увеличи отстъпа"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(n){const i=n.bn=n.bn||{};i.dictionary=Object.assign(i.dictionary||{},{"Decrease indent":"ইন্ডেন্ট হ্রাস করুন","Increase indent":"ইন্ডেন্ট বৃদ্ধি করুন"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(n){const a=n.ca=n.ca||{};a.dictionary=Object.assign(a.dictionary||{},{"Decrease indent":"Reduir el sagnat","Increase indent":"Augmentar el sagnat"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(n){const i=n.cs=n.cs||{};i.dictionary=Object.assign(i.dictionary||{},{"Decrease indent":"Zmenšit odsazení","Increase indent":"Zvětšit odsazení"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(n){const i=n.da=n.da||{};i.dictionary=Object.assign(i.dictionary||{},{"Decrease indent":"Formindsk indrykning","Increase indent":"Forøg indrykning"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(n){const e=n["de-ch"]=n["de-ch"]||{};e.dictionary=Object.assign(e.dictionary||{},{"Decrease indent":"Einzug verkleinern","Increase indent":"Einzug vergrössern"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(n){const e=n.de=n.de||{};e.dictionary=Object.assign(e.dictionary||{},{"Decrease indent":"Einzug verkleinern","Increase indent":"Einzug vergrößern"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(n){const e=n.el=n.el||{};e.dictionary=Object.assign(e.dictionary||{},{"Decrease indent":"Μείωση εσοχής","Increase indent":"Αύξηση εσοχής"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(n){const e=n["en-au"]=n["en-au"]||{};e.dictionary=Object.assign(e.dictionary||{},{"Decrease indent":"Decrease indent","Increase indent":"Increase indent"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(n){const e=n["en-gb"]=n["en-gb"]||{};e.dictionary=Object.assign(e.dictionary||{},{"Decrease indent":"Decrease indent","Increase indent":"Increase indent"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(n){const i=n.es=n.es||{};i.dictionary=Object.assign(i.dictionary||{},{"Decrease indent":"Disminuir sangría","Increase indent":"Aumentar sangría"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(n){const e=n.et=n.et||{};e.dictionary=Object.assign(e.dictionary||{},{"Decrease indent":"Vähenda taanet","Increase indent":"Suurenda taanet"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(n){const i=n.fa=n.fa||{};i.dictionary=Object.assign(i.dictionary||{},{"Decrease indent":"کاهش تورفتگی","Increase indent":"افزایش تورفتگی"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(n){const i=n.fi=n.fi||{};i.dictionary=Object.assign(i.dictionary||{},{"Decrease indent":"Vähennä sisennystä","Increase indent":"Lisää sisennystä"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(e){const n=e.fr=e.fr||{};n.dictionary=Object.assign(n.dictionary||{},{"Decrease indent":"Diminuer le retrait","Increase indent":"Augmenter le retrait"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(n){const a=n.gl=n.gl||{};a.dictionary=Object.assign(a.dictionary||{},{"Decrease indent":"Reducir a sangría","Increase indent":"Aumentar a sangría"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(n){const e=n.he=n.he||{};e.dictionary=Object.assign(e.dictionary||{},{"Decrease indent":"הקטנת הזחה","Increase indent":"הגדלת הזחה"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(n){const e=n.hi=n.hi||{};e.dictionary=Object.assign(e.dictionary||{},{"Decrease indent":"Decrease indent","Increase indent":"Increase indent"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(n){const e=n.hr=n.hr||{};e.dictionary=Object.assign(e.dictionary||{},{"Decrease indent":"Umanji uvlačenje","Increase indent":"Povećaj uvlačenje"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(n){const e=n.hu=n.hu||{};e.dictionary=Object.assign(e.dictionary||{},{"Decrease indent":"Behúzás csökkentése","Increase indent":"Behúzás növelése"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(n){const i=n.id=n.id||{};i.dictionary=Object.assign(i.dictionary||{},{"Decrease indent":"Kurangi indentasi","Increase indent":"Tambah indentasi"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(i){const n=i.it=i.it||{};n.dictionary=Object.assign(n.dictionary||{},{"Decrease indent":"Riduci rientro","Increase indent":"Aumenta rientro"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(n){const i=n.ja=n.ja||{};i.dictionary=Object.assign(i.dictionary||{},{"Decrease indent":"インデントの削除","Increase indent":"インデントの追加"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(n){const i=n.ko=n.ko||{};i.dictionary=Object.assign(i.dictionary||{},{"Decrease indent":"들여쓰기 줄이기","Increase indent":"들여쓰기 늘리기"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(n){const i=n.ku=n.ku||{};i.dictionary=Object.assign(i.dictionary||{},{"Decrease indent":"کەمکردنەوەی بۆشایی","Increase indent":"زیادکردنی بۆشایی"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(i){const n=i.lt=i.lt||{};n.dictionary=Object.assign(n.dictionary||{},{"Decrease indent":"Sumažinti atitraukimą","Increase indent":"Padidinti atitraukimą"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(i){const n=i.lv=i.lv||{};n.dictionary=Object.assign(n.dictionary||{},{"Decrease indent":"Samazināt atkāpi","Increase indent":"Palielināt atkāpi"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(n){const i=n.ms=n.ms||{};i.dictionary=Object.assign(i.dictionary||{},{"Decrease indent":"Kurangkan inden","Increase indent":"Tambah inden"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(n){const e=n.ne=n.ne||{};e.dictionary=Object.assign(e.dictionary||{},{"Decrease indent":"इन्डेन्ट घटाउन","Increase indent":"इन्डेन्ट बढाउन"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(n){const i=n.nl=n.nl||{};i.dictionary=Object.assign(i.dictionary||{},{"Decrease indent":"Minder inspringen","Increase indent":"Inspringen"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(n){const i=n.no=n.no||{};i.dictionary=Object.assign(i.dictionary||{},{"Decrease indent":"Reduser innrykk","Increase indent":"Øk innrykk"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(i){const n=i.pl=i.pl||{};n.dictionary=Object.assign(n.dictionary||{},{"Decrease indent":"Zmniejsz wcięcie","Increase indent":"Zwiększ wcięcie"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(n){const i=n["pt-br"]=n["pt-br"]||{};i.dictionary=Object.assign(i.dictionary||{},{"Decrease indent":"Diminuir recuo","Increase indent":"Aumentar recuo"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(n){const i=n.pt=n.pt||{};i.dictionary=Object.assign(i.dictionary||{},{"Decrease indent":"Diminuir indentação","Increase indent":"Aumentar indentação"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(n){const e=n.ro=n.ro||{};e.dictionary=Object.assign(e.dictionary||{},{"Decrease indent":"Micșorează indent","Increase indent":"Mărește indent"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(n){const i=n.ru=n.ru||{};i.dictionary=Object.assign(i.dictionary||{},{"Decrease indent":"Уменьшить отступ","Increase indent":"Увеличить отступ"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(n){const i=n.sk=n.sk||{};i.dictionary=Object.assign(i.dictionary||{},{"Decrease indent":"Zmenšiť odsadenie","Increase indent":"Zväčšiť odsadenie"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(n){const e=n["sr-latn"]=n["sr-latn"]||{};e.dictionary=Object.assign(e.dictionary||{},{"Decrease indent":"Smanji uvlačenje","Increase indent":"Povećaj uclačenje"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(n){const i=n.sr=n.sr||{};i.dictionary=Object.assign(i.dictionary||{},{"Decrease indent":"Смањи увлачење","Increase indent":"Повећај увлачење"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(n){const i=n.sv=n.sv||{};i.dictionary=Object.assign(i.dictionary||{},{"Decrease indent":"Minska indrag","Increase indent":"Öka indrag"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(n){const i=n.th=n.th||{};i.dictionary=Object.assign(i.dictionary||{},{"Decrease indent":"ลดการเยื้อง","Increase indent":"เพิ่มการเยื้อง"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(n){const e=n.tk=n.tk||{};e.dictionary=Object.assign(e.dictionary||{},{"Decrease indent":"Indent peseltmek","Increase indent":"Indent köpeltmek"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(i){const n=i.tr=i.tr||{};n.dictionary=Object.assign(n.dictionary||{},{"Decrease indent":"Girintiyi azalt","Increase indent":"Girintiyi arttır"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(n){const i=n.ug=n.ug||{};i.dictionary=Object.assign(i.dictionary||{},{"Decrease indent":"تارايتىشنى كېمەيت","Increase indent":"تارايتىشنى ئاشۇر"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(n){const i=n.uk=n.uk||{};i.dictionary=Object.assign(i.dictionary||{},{"Decrease indent":"Зменшити відступ","Increase indent":"Збільшити відступ"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(n){const i=n.ur=n.ur||{};i.dictionary=Object.assign(i.dictionary||{},{"Decrease indent":"حاشیہ گھٹائیں","Increase indent":"حاشیہ بڑھائیں"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(i){const n=i.uz=i.uz||{};n.dictionary=Object.assign(n.dictionary||{},{"Decrease indent":"chekinishni kamaytirish","Increase indent":"chekinishni oshirish"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(n){const i=n.vi=n.vi||{};i.dictionary=Object.assign(i.dictionary||{},{"Decrease indent":"Giảm lề","Increase indent":"Tăng lề"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(n){const i=n["zh-cn"]=n["zh-cn"]||{};i.dictionary=Object.assign(i.dictionary||{},{"Decrease indent":"减少缩进","Increase indent":"增加缩进"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(n){const i=n.zh=n.zh||{};i.dictionary=Object.assign(i.dictionary||{},{"Decrease indent":"減少縮排","Increase indent":"增加縮排"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
{
|
|
2
|
+
"plugins": [
|
|
3
|
+
{
|
|
4
|
+
"name": "Indent",
|
|
5
|
+
"className": "Indent",
|
|
6
|
+
"description": "Implements the core of the indent feature. It requires compatible plugins, such as indent block or list, to work.",
|
|
7
|
+
"docs": "features/indent.html",
|
|
8
|
+
"path": "src/indent.js",
|
|
9
|
+
"uiComponents": [
|
|
10
|
+
{
|
|
11
|
+
"type": "Button",
|
|
12
|
+
"name": "indent",
|
|
13
|
+
"iconPath": "@ckeditor/ckeditor5-core/theme/icons/indent.svg"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"type": "Button",
|
|
17
|
+
"name": "outdent",
|
|
18
|
+
"iconPath": "@ckeditor/ckeditor5-core/theme/icons/outdent.svg"
|
|
19
|
+
}
|
|
20
|
+
]
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"name": "Indent block",
|
|
24
|
+
"className": "IndentBlock",
|
|
25
|
+
"description": "The indent block feature, together with the indent feature, controls the indentation of elements such as paragraphs and headings.",
|
|
26
|
+
"docs": "features/indent.html",
|
|
27
|
+
"path": "src/indentblock.js",
|
|
28
|
+
"requires": [
|
|
29
|
+
"Indent"
|
|
30
|
+
],
|
|
31
|
+
"htmlOutput": [
|
|
32
|
+
{
|
|
33
|
+
"elements": "$block",
|
|
34
|
+
"styles": [
|
|
35
|
+
"margin-left",
|
|
36
|
+
"margin-right"
|
|
37
|
+
],
|
|
38
|
+
"_comment": "By default, the plugin uses inline styles for indentation."
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"elements": "$block",
|
|
42
|
+
"classes": "*",
|
|
43
|
+
"isAlternative": true,
|
|
44
|
+
"_comment": "If classes are defined in `config.indentBlock.classes`, they are used instead of inline styles."
|
|
45
|
+
}
|
|
46
|
+
]
|
|
47
|
+
}
|
|
48
|
+
]
|
|
49
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, 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
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
+
*/
|
|
9
|
+
import type { IndentBlockConfig, Indent, IndentBlock, IndentUI, IndentBlockCommand } from './index.js';
|
|
10
|
+
declare module '@ckeditor/ckeditor5-core' {
|
|
11
|
+
interface EditorConfig {
|
|
12
|
+
/**
|
|
13
|
+
* The configuration of the {@link module:indent/indentblock~IndentBlock block indentation feature}.
|
|
14
|
+
*
|
|
15
|
+
* Read more in {@link module:indent/indentconfig~IndentBlockConfig}.
|
|
16
|
+
*/
|
|
17
|
+
indentBlock?: IndentBlockConfig;
|
|
18
|
+
}
|
|
19
|
+
interface PluginsMap {
|
|
20
|
+
[Indent.pluginName]: Indent;
|
|
21
|
+
[IndentBlock.pluginName]: IndentBlock;
|
|
22
|
+
[IndentUI.pluginName]: IndentUI;
|
|
23
|
+
}
|
|
24
|
+
interface CommandsMap {
|
|
25
|
+
indentBlock: IndentBlockCommand;
|
|
26
|
+
outdentBlock: IndentBlockCommand;
|
|
27
|
+
}
|
|
28
|
+
}
|
package/dist/indent.d.ts
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, 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
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* @module indent/indent
|
|
11
|
+
*/
|
|
12
|
+
import { Plugin } from 'ckeditor5/src/core.js';
|
|
13
|
+
import IndentEditing from './indentediting.js';
|
|
14
|
+
import IndentUI from './indentui.js';
|
|
15
|
+
/**
|
|
16
|
+
* The indent feature.
|
|
17
|
+
*
|
|
18
|
+
* This plugin acts as a single entry point plugin for other features that implement indentation of elements like lists or paragraphs.
|
|
19
|
+
*
|
|
20
|
+
* The compatible features are:
|
|
21
|
+
*
|
|
22
|
+
* * The {@link module:list/list~List} or {@link module:list/list/listediting~ListEditing} feature for list indentation.
|
|
23
|
+
* * The {@link module:indent/indentblock~IndentBlock} feature for block indentation.
|
|
24
|
+
*
|
|
25
|
+
* This is a "glue" plugin that loads the following plugins:
|
|
26
|
+
*
|
|
27
|
+
* * The {@link module:indent/indentediting~IndentEditing indent editing feature}.
|
|
28
|
+
* * The {@link module:indent/indentui~IndentUI indent UI feature}.
|
|
29
|
+
*
|
|
30
|
+
* The dependent plugins register the `'indent'` and `'outdent'` commands and introduce the `'indent'` and `'outdent'` buttons
|
|
31
|
+
* that allow to increase or decrease text indentation of supported elements.
|
|
32
|
+
*
|
|
33
|
+
* **Note**: In order for the commands and buttons to work, at least one of compatible features is required.
|
|
34
|
+
*/
|
|
35
|
+
export default class Indent extends Plugin {
|
|
36
|
+
/**
|
|
37
|
+
* @inheritDoc
|
|
38
|
+
*/
|
|
39
|
+
static get pluginName(): "Indent";
|
|
40
|
+
/**
|
|
41
|
+
* @inheritDoc
|
|
42
|
+
*/
|
|
43
|
+
static get isOfficialPlugin(): true;
|
|
44
|
+
/**
|
|
45
|
+
* @inheritDoc
|
|
46
|
+
*/
|
|
47
|
+
static get requires(): readonly [typeof IndentEditing, typeof IndentUI];
|
|
48
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, 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
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* @module indent/indentblock
|
|
11
|
+
*/
|
|
12
|
+
import { Plugin, type Editor } from 'ckeditor5/src/core.js';
|
|
13
|
+
/**
|
|
14
|
+
* The block indentation feature.
|
|
15
|
+
*
|
|
16
|
+
* It registers the `'indentBlock'` and `'outdentBlock'` commands.
|
|
17
|
+
*
|
|
18
|
+
* If the plugin {@link module:indent/indent~Indent} is defined, it also attaches the `'indentBlock'` and `'outdentBlock'` commands to
|
|
19
|
+
* the `'indent'` and `'outdent'` commands.
|
|
20
|
+
*/
|
|
21
|
+
export default class IndentBlock extends Plugin {
|
|
22
|
+
/**
|
|
23
|
+
* @inheritDoc
|
|
24
|
+
*/
|
|
25
|
+
constructor(editor: Editor);
|
|
26
|
+
/**
|
|
27
|
+
* @inheritDoc
|
|
28
|
+
*/
|
|
29
|
+
static get pluginName(): "IndentBlock";
|
|
30
|
+
/**
|
|
31
|
+
* @inheritDoc
|
|
32
|
+
*/
|
|
33
|
+
static get isOfficialPlugin(): true;
|
|
34
|
+
/**
|
|
35
|
+
* @inheritDoc
|
|
36
|
+
*/
|
|
37
|
+
init(): void;
|
|
38
|
+
/**
|
|
39
|
+
* @inheritDoc
|
|
40
|
+
*/
|
|
41
|
+
afterInit(): void;
|
|
42
|
+
/**
|
|
43
|
+
* Setups conversion for using offset indents.
|
|
44
|
+
*/
|
|
45
|
+
private _setupConversionUsingOffset;
|
|
46
|
+
/**
|
|
47
|
+
* Setups conversion for using classes.
|
|
48
|
+
*/
|
|
49
|
+
private _setupConversionUsingClasses;
|
|
50
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, 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
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* @module indent/indentblockcommand
|
|
11
|
+
*/
|
|
12
|
+
import { Command, type Editor } from 'ckeditor5/src/core.js';
|
|
13
|
+
import type { IndentBehavior } from './indentcommandbehavior/indentbehavior.js';
|
|
14
|
+
/**
|
|
15
|
+
* The indent block command.
|
|
16
|
+
*
|
|
17
|
+
* The command is registered by the {@link module:indent/indentblock~IndentBlock} as `'indentBlock'` for indenting blocks and
|
|
18
|
+
* `'outdentBlock'` for outdenting blocks.
|
|
19
|
+
*
|
|
20
|
+
* To increase block indentation at the current selection, execute the command:
|
|
21
|
+
*
|
|
22
|
+
* ```ts
|
|
23
|
+
* editor.execute( 'indentBlock' );
|
|
24
|
+
* ```
|
|
25
|
+
*
|
|
26
|
+
* To decrease block indentation at the current selection, execute the command:
|
|
27
|
+
*
|
|
28
|
+
* ```ts
|
|
29
|
+
* editor.execute( 'outdentBlock' );
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
export default class IndentBlockCommand extends Command {
|
|
33
|
+
/**
|
|
34
|
+
* The command's indentation behavior.
|
|
35
|
+
*/
|
|
36
|
+
private readonly _indentBehavior;
|
|
37
|
+
/**
|
|
38
|
+
* Creates an instance of the command.
|
|
39
|
+
*/
|
|
40
|
+
constructor(editor: Editor, indentBehavior: IndentBehavior);
|
|
41
|
+
/**
|
|
42
|
+
* @inheritDoc
|
|
43
|
+
*/
|
|
44
|
+
refresh(): void;
|
|
45
|
+
/**
|
|
46
|
+
* @inheritDoc
|
|
47
|
+
*/
|
|
48
|
+
execute(): void;
|
|
49
|
+
/**
|
|
50
|
+
* Returns blocks from selection that should have blockIndent selection set.
|
|
51
|
+
*/
|
|
52
|
+
private _getBlocksToChange;
|
|
53
|
+
/**
|
|
54
|
+
* Returns false if indentation cannot be applied, i.e.:
|
|
55
|
+
* - for blocks disallowed by schema declaration
|
|
56
|
+
* - for blocks in Document Lists (disallowed forward indentation only). See https://github.com/ckeditor/ckeditor5/issues/14155.
|
|
57
|
+
* Otherwise returns true.
|
|
58
|
+
*/
|
|
59
|
+
private _isIndentationChangeAllowed;
|
|
60
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, 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
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* @module indent/indentcommandbehavior/indentbehavior
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* Provides indentation behavior to {@link module:indent/indentblockcommand~IndentBlockCommand}.
|
|
14
|
+
*/
|
|
15
|
+
export interface IndentBehavior {
|
|
16
|
+
/**
|
|
17
|
+
* The direction of indentation.
|
|
18
|
+
*/
|
|
19
|
+
isForward: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Checks if the command should be enabled.
|
|
22
|
+
*/
|
|
23
|
+
checkEnabled: (indentAttributeValue: string) => boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Returns a new indent attribute value based on the current indent.
|
|
26
|
+
* This method returns `undefined` when the indentation should be removed.
|
|
27
|
+
*/
|
|
28
|
+
getNextIndent: (indentAttributeValue: string) => string | undefined;
|
|
29
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, 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
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* @module indent/indentcommandbehavior/indentusingclasses
|
|
11
|
+
*/
|
|
12
|
+
import type { IndentBehavior } from './indentbehavior.js';
|
|
13
|
+
/**
|
|
14
|
+
* The block indentation behavior that uses classes to set indentation.
|
|
15
|
+
*/
|
|
16
|
+
export default class IndentUsingClasses implements IndentBehavior {
|
|
17
|
+
/**
|
|
18
|
+
* The direction of indentation.
|
|
19
|
+
*/
|
|
20
|
+
isForward: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* A list of classes used for indentation.
|
|
23
|
+
*/
|
|
24
|
+
classes: Array<string>;
|
|
25
|
+
/**
|
|
26
|
+
* Creates an instance of the indentation behavior.
|
|
27
|
+
*
|
|
28
|
+
* @param config.direction The direction of indentation.
|
|
29
|
+
* @param config.classes A list of classes used for indentation.
|
|
30
|
+
*/
|
|
31
|
+
constructor(config: {
|
|
32
|
+
direction: 'forward' | 'backward';
|
|
33
|
+
classes: Array<string>;
|
|
34
|
+
});
|
|
35
|
+
/**
|
|
36
|
+
* @inheritDoc
|
|
37
|
+
*/
|
|
38
|
+
checkEnabled(indentAttributeValue: string): boolean;
|
|
39
|
+
/**
|
|
40
|
+
* @inheritDoc
|
|
41
|
+
*/
|
|
42
|
+
getNextIndent(indentAttributeValue: string): string | undefined;
|
|
43
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, 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
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* @module indent/indentcommandbehavior/indentusingoffset
|
|
11
|
+
*/
|
|
12
|
+
import type { IndentBehavior } from './indentbehavior.js';
|
|
13
|
+
/**
|
|
14
|
+
* The block indentation behavior that uses offsets to set indentation.
|
|
15
|
+
*/
|
|
16
|
+
export default class IndentUsingOffset implements IndentBehavior {
|
|
17
|
+
/**
|
|
18
|
+
* The direction of indentation.
|
|
19
|
+
*/
|
|
20
|
+
isForward: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* The offset of the next indentation step.
|
|
23
|
+
*/
|
|
24
|
+
offset: number;
|
|
25
|
+
/**
|
|
26
|
+
* Indentation unit.
|
|
27
|
+
*/
|
|
28
|
+
unit: string;
|
|
29
|
+
/**
|
|
30
|
+
* Creates an instance of the indentation behavior.
|
|
31
|
+
*
|
|
32
|
+
* @param config.direction The direction of indentation.
|
|
33
|
+
* @param config.offset The offset of the next indentation step.
|
|
34
|
+
* @param config.unit Indentation unit.
|
|
35
|
+
*/
|
|
36
|
+
constructor(config: {
|
|
37
|
+
direction: 'forward' | 'backward';
|
|
38
|
+
offset: number;
|
|
39
|
+
unit: string;
|
|
40
|
+
});
|
|
41
|
+
/**
|
|
42
|
+
* @inheritDoc
|
|
43
|
+
*/
|
|
44
|
+
checkEnabled(indentAttributeValue: string): boolean;
|
|
45
|
+
/**
|
|
46
|
+
* @inheritDoc
|
|
47
|
+
*/
|
|
48
|
+
getNextIndent(indentAttributeValue: string): string | undefined;
|
|
49
|
+
}
|