@ckeditor/ckeditor5-source-editing 0.0.0-internal-20241017.0 → 0.0.0-internal-20241206.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 +7 -2
- package/README.md +18 -7
- package/build/translations/af.js +1 -0
- package/build/translations/ast.js +1 -0
- package/build/translations/az.js +1 -0
- package/build/translations/bs.js +1 -0
- package/build/translations/de-ch.js +1 -0
- package/build/translations/en-gb.js +1 -0
- package/build/translations/eo.js +1 -0
- package/build/translations/es-co.js +1 -0
- package/build/translations/eu.js +1 -0
- package/build/translations/fa.js +1 -0
- package/build/translations/gu.js +1 -0
- package/build/translations/hy.js +1 -0
- package/build/translations/jv.js +1 -0
- package/build/translations/kk.js +1 -0
- package/build/translations/km.js +1 -0
- package/build/translations/kn.js +1 -0
- package/build/translations/ku.js +1 -0
- package/build/translations/nb.js +1 -0
- package/build/translations/ne.js +1 -0
- package/build/translations/oc.js +1 -0
- package/build/translations/si.js +1 -0
- package/build/translations/sl.js +1 -0
- package/build/translations/sq.js +1 -0
- package/build/translations/ti.js +1 -0
- package/build/translations/tk.js +1 -0
- package/build/translations/tt.js +1 -0
- package/build/translations/uz.js +1 -0
- package/dist/index.css +4 -4
- package/dist/index.css.map +1 -1
- package/dist/index.js +53 -62
- package/dist/index.js.map +1 -1
- package/dist/translations/af.d.ts +8 -0
- package/dist/translations/af.js +5 -0
- package/dist/translations/af.umd.js +11 -0
- package/dist/translations/ar.js +1 -1
- package/dist/translations/ar.umd.js +1 -1
- package/dist/translations/ast.d.ts +8 -0
- package/dist/translations/ast.js +5 -0
- package/dist/translations/ast.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/bs.d.ts +8 -0
- package/dist/translations/bs.js +5 -0
- package/dist/translations/bs.umd.js +11 -0
- package/dist/translations/cs.js +1 -1
- package/dist/translations/cs.umd.js +1 -1
- 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/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.js +1 -1
- package/dist/translations/en.umd.js +1 -1
- package/dist/translations/eo.d.ts +8 -0
- package/dist/translations/eo.js +5 -0
- package/dist/translations/eo.umd.js +11 -0
- package/dist/translations/es-co.d.ts +8 -0
- package/dist/translations/es-co.js +5 -0
- package/dist/translations/es-co.umd.js +11 -0
- package/dist/translations/es.js +1 -1
- package/dist/translations/es.umd.js +1 -1
- package/dist/translations/eu.d.ts +8 -0
- package/dist/translations/eu.js +5 -0
- package/dist/translations/eu.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/fr.js +1 -1
- package/dist/translations/fr.umd.js +1 -1
- package/dist/translations/gu.d.ts +8 -0
- package/dist/translations/gu.js +5 -0
- package/dist/translations/gu.umd.js +11 -0
- package/dist/translations/he.js +1 -1
- package/dist/translations/he.umd.js +1 -1
- package/dist/translations/hr.js +1 -1
- package/dist/translations/hr.umd.js +1 -1
- package/dist/translations/hy.d.ts +8 -0
- package/dist/translations/hy.js +5 -0
- package/dist/translations/hy.umd.js +11 -0
- package/dist/translations/it.js +1 -1
- package/dist/translations/it.umd.js +1 -1
- package/dist/translations/jv.d.ts +8 -0
- package/dist/translations/jv.js +5 -0
- package/dist/translations/jv.umd.js +11 -0
- package/dist/translations/kk.d.ts +8 -0
- package/dist/translations/kk.js +5 -0
- package/dist/translations/kk.umd.js +11 -0
- package/dist/translations/km.d.ts +8 -0
- package/dist/translations/km.js +5 -0
- package/dist/translations/km.umd.js +11 -0
- package/dist/translations/kn.d.ts +8 -0
- package/dist/translations/kn.js +5 -0
- package/dist/translations/kn.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.js +1 -1
- package/dist/translations/lt.umd.js +1 -1
- package/dist/translations/lv.js +1 -1
- package/dist/translations/lv.umd.js +1 -1
- package/dist/translations/nb.d.ts +8 -0
- package/dist/translations/nb.js +5 -0
- package/dist/translations/nb.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/oc.d.ts +8 -0
- package/dist/translations/oc.js +5 -0
- package/dist/translations/oc.umd.js +11 -0
- package/dist/translations/pl.js +1 -1
- package/dist/translations/pl.umd.js +1 -1
- package/dist/translations/pt-br.js +1 -1
- package/dist/translations/pt-br.umd.js +1 -1
- package/dist/translations/pt.js +1 -1
- package/dist/translations/pt.umd.js +1 -1
- package/dist/translations/ro.js +1 -1
- package/dist/translations/ro.umd.js +1 -1
- package/dist/translations/ru.js +1 -1
- package/dist/translations/ru.umd.js +1 -1
- package/dist/translations/si.d.ts +8 -0
- package/dist/translations/si.js +5 -0
- package/dist/translations/si.umd.js +11 -0
- package/dist/translations/sk.js +1 -1
- package/dist/translations/sk.umd.js +1 -1
- package/dist/translations/sl.d.ts +8 -0
- package/dist/translations/sl.js +5 -0
- package/dist/translations/sl.umd.js +11 -0
- package/dist/translations/sq.d.ts +8 -0
- package/dist/translations/sq.js +5 -0
- package/dist/translations/sq.umd.js +11 -0
- package/dist/translations/sr-latn.js +1 -1
- package/dist/translations/sr-latn.umd.js +1 -1
- package/dist/translations/sr.js +1 -1
- package/dist/translations/sr.umd.js +1 -1
- package/dist/translations/ti.d.ts +8 -0
- package/dist/translations/ti.js +5 -0
- package/dist/translations/ti.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/tt.d.ts +8 -0
- package/dist/translations/tt.js +5 -0
- package/dist/translations/tt.umd.js +11 -0
- package/dist/translations/ug.js +1 -1
- package/dist/translations/ug.umd.js +1 -1
- package/dist/translations/uk.js +1 -1
- package/dist/translations/uk.umd.js +1 -1
- package/dist/translations/uz.d.ts +8 -0
- package/dist/translations/uz.js +5 -0
- package/dist/translations/uz.umd.js +11 -0
- package/lang/translations/af.po +20 -0
- package/lang/translations/ar.po +4 -10
- package/lang/translations/ast.po +20 -0
- package/lang/translations/az.po +20 -0
- package/lang/translations/bg.po +3 -9
- package/lang/translations/bn.po +3 -9
- package/lang/translations/bs.po +20 -0
- package/lang/translations/ca.po +3 -9
- package/lang/translations/cs.po +4 -10
- package/lang/translations/da.po +3 -9
- package/lang/translations/de-ch.po +20 -0
- package/lang/translations/de.po +3 -9
- package/lang/translations/el.po +3 -9
- package/lang/translations/en-au.po +3 -9
- package/lang/translations/en-gb.po +20 -0
- package/lang/translations/en.po +5 -11
- package/lang/translations/eo.po +20 -0
- package/lang/translations/es-co.po +20 -0
- package/lang/translations/es.po +4 -10
- package/lang/translations/et.po +3 -9
- package/lang/translations/eu.po +20 -0
- package/lang/translations/fa.po +20 -0
- package/lang/translations/fi.po +3 -9
- package/lang/translations/fr.po +4 -10
- package/lang/translations/gl.po +3 -9
- package/lang/translations/gu.po +20 -0
- package/lang/translations/he.po +4 -10
- package/lang/translations/hi.po +3 -9
- package/lang/translations/hr.po +4 -10
- package/lang/translations/hu.po +3 -9
- package/lang/translations/hy.po +20 -0
- package/lang/translations/id.po +3 -9
- package/lang/translations/it.po +4 -10
- package/lang/translations/ja.po +3 -9
- package/lang/translations/jv.po +20 -0
- package/lang/translations/kk.po +20 -0
- package/lang/translations/km.po +20 -0
- package/lang/translations/kn.po +20 -0
- package/lang/translations/ko.po +3 -9
- package/lang/translations/ku.po +20 -0
- package/lang/translations/lt.po +4 -10
- package/lang/translations/lv.po +4 -10
- package/lang/translations/ms.po +3 -9
- package/lang/translations/nb.po +20 -0
- package/lang/translations/ne.po +20 -0
- package/lang/translations/nl.po +3 -9
- package/lang/translations/no.po +3 -9
- package/lang/translations/oc.po +20 -0
- package/lang/translations/pl.po +4 -10
- package/lang/translations/pt-br.po +4 -10
- package/lang/translations/pt.po +4 -10
- package/lang/translations/ro.po +4 -10
- package/lang/translations/ru.po +4 -10
- package/lang/translations/si.po +20 -0
- package/lang/translations/sk.po +4 -10
- package/lang/translations/sl.po +20 -0
- package/lang/translations/sq.po +20 -0
- package/lang/translations/sr-latn.po +4 -10
- package/lang/translations/sr.po +4 -10
- package/lang/translations/sv.po +3 -9
- package/lang/translations/th.po +3 -9
- package/lang/translations/ti.po +20 -0
- package/lang/translations/tk.po +20 -0
- package/lang/translations/tr.po +3 -9
- package/lang/translations/tt.po +20 -0
- package/lang/translations/ug.po +4 -10
- package/lang/translations/uk.po +4 -10
- package/lang/translations/ur.po +3 -9
- package/lang/translations/uz.po +20 -0
- package/lang/translations/vi.po +3 -9
- package/lang/translations/zh-cn.po +3 -9
- package/lang/translations/zh.po +3 -9
- package/package.json +27 -8
- package/src/augmentation.d.ts +1 -1
- package/src/augmentation.js +1 -1
- package/src/index.d.ts +1 -1
- package/src/index.js +1 -1
- package/src/sourceediting.d.ts +1 -1
- package/src/sourceediting.js +1 -1
- package/src/sourceeditingconfig.d.ts +1 -1
- package/src/sourceeditingconfig.js +1 -1
- package/src/utils/formathtml.d.ts +1 -1
- package/src/utils/formathtml.js +1 -1
- package/theme/sourceediting.css +1 -1
- package/dist/augmentation.d.ts +0 -22
- package/dist/index.d.ts +0 -14
- package/dist/sourceediting.d.ts +0 -112
- package/dist/sourceeditingconfig.d.ts +0 -38
- package/dist/utils/formathtml.d.ts +0 -23
package/LICENSE.md
CHANGED
@@ -1,10 +1,15 @@
|
|
1
1
|
Software License Agreement
|
2
2
|
==========================
|
3
3
|
|
4
|
-
**CKEditor 5
|
4
|
+
**CKEditor 5 Source editing feature** (https://github.com/ckeditor/ckeditor5)<br>
|
5
5
|
Copyright (c) 2003–2024, [CKSource Holding sp. z o.o.](https://cksource.com) All rights reserved.
|
6
6
|
|
7
|
-
Licensed under
|
7
|
+
Licensed under a dual-license model, this software is available under:
|
8
|
+
|
9
|
+
* the [GNU General Public License Version 2 or later](https://www.gnu.org/licenses/gpl.html),
|
10
|
+
* or commercial license terms from CKSource Holding sp. z o.o.
|
11
|
+
|
12
|
+
For more information, see: [https://ckeditor.com/legal/ckeditor-licensing-options](https://ckeditor.com/legal/ckeditor-licensing-options).
|
8
13
|
|
9
14
|
Sources of Intellectual Property Included in CKEditor
|
10
15
|
-----------------------------------------------------
|
package/README.md
CHANGED
@@ -3,10 +3,22 @@ CKEditor 5 source editing feature
|
|
3
3
|
|
4
4
|
[](https://www.npmjs.com/package/@ckeditor/ckeditor5-source-editing)
|
5
5
|
[](https://coveralls.io/github/ckeditor/ckeditor5?branch=master)
|
6
|
-
[](https://app.circleci.com/pipelines/github/ckeditor/ckeditor5?branch=master)
|
7
7
|
|
8
8
|
This package implements the source editing support for CKEditor 5 that allows you to view and edit the source of the document.
|
9
9
|
|
10
|
+
## Installation
|
11
|
+
|
12
|
+
This plugin is part of the `ckeditor5` package. Install the whole package to use it.
|
13
|
+
|
14
|
+
```bash
|
15
|
+
npm install ckeditor5
|
16
|
+
```
|
17
|
+
|
18
|
+
## Create free account
|
19
|
+
|
20
|
+
If you want to check full CKEditor 5 capabilities, sign up for a [free non-commitment 14-day trial](https://portal.ckeditor.com/checkout?plan=free).
|
21
|
+
|
10
22
|
## Demo
|
11
23
|
|
12
24
|
Check out the [demo in the source editing feature guide](https://ckeditor.com/docs/ckeditor5/latest/features/source-editing.html#demo).
|
@@ -15,12 +27,11 @@ Check out the [demo in the source editing feature guide](https://ckeditor.com/do
|
|
15
27
|
|
16
28
|
See the [`@ckeditor/ckeditor5-source-editing` package](https://ckeditor.com/docs/ckeditor5/latest/api/source-editing.html) page as well as the [source editing feature](https://ckeditor.com/docs/ckeditor5/latest/features/source-editing.html) guide in the [CKEditor 5 documentation](https://ckeditor.com/docs/ckeditor5/latest/).
|
17
29
|
|
18
|
-
##
|
30
|
+
## License
|
19
31
|
|
20
|
-
|
21
|
-
npm install ckeditor5
|
22
|
-
```
|
32
|
+
Licensed under a dual-license model, this software is available under:
|
23
33
|
|
24
|
-
|
34
|
+
* the [GNU General Public License Version 2 or later](https://www.gnu.org/licenses/gpl.html),
|
35
|
+
* or commercial license terms from CKSource Holding sp. z o.o.
|
25
36
|
|
26
|
-
|
37
|
+
For more information, see: [https://ckeditor.com/legal/ckeditor-licensing-options](https://ckeditor.com/legal/ckeditor-licensing-options).
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(o){const i=o.af=o.af||{};i.dictionary=Object.assign(i.dictionary||{},{"Show source":"",Source:""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(o){const i=o.ast=o.ast||{};i.dictionary=Object.assign(i.dictionary||{},{"Show source":"",Source:""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(o){const i=o.az=o.az||{};i.dictionary=Object.assign(i.dictionary||{},{"Show source":"",Source:""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(o){const i=o.bs=o.bs||{};i.dictionary=Object.assign(i.dictionary||{},{"Show source":"",Source:""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(c){const o=c["de-ch"]=c["de-ch"]||{};o.dictionary=Object.assign(o.dictionary||{},{"Show source":"",Source:""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(n){const o=n["en-gb"]=n["en-gb"]||{};o.dictionary=Object.assign(o.dictionary||{},{"Show source":"",Source:""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(o){const i=o.eo=o.eo||{};i.dictionary=Object.assign(i.dictionary||{},{"Show source":"",Source:""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(o){const c=o["es-co"]=o["es-co"]||{};c.dictionary=Object.assign(c.dictionary||{},{"Show source":"",Source:""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(o){const i=o.eu=o.eu||{};i.dictionary=Object.assign(i.dictionary||{},{"Show source":"",Source:""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(o){const i=o.fa=o.fa||{};i.dictionary=Object.assign(i.dictionary||{},{"Show source":"",Source:""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(o){const i=o.gu=o.gu||{};i.dictionary=Object.assign(i.dictionary||{},{"Show source":"",Source:""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(o){const i=o.hy=o.hy||{};i.dictionary=Object.assign(i.dictionary||{},{"Show source":"",Source:""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(o){const i=o.jv=o.jv||{};i.dictionary=Object.assign(i.dictionary||{},{"Show source":"",Source:""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(o){const i=o.kk=o.kk||{};i.dictionary=Object.assign(i.dictionary||{},{"Show source":"",Source:""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(o){const i=o.km=o.km||{};i.dictionary=Object.assign(i.dictionary||{},{"Show source":"",Source:""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(n){const o=n.kn=n.kn||{};o.dictionary=Object.assign(o.dictionary||{},{"Show source":"",Source:""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(o){const i=o.ku=o.ku||{};i.dictionary=Object.assign(i.dictionary||{},{"Show source":"",Source:""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(n){const o=n.nb=n.nb||{};o.dictionary=Object.assign(o.dictionary||{},{"Show source":"",Source:""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(n){const o=n.ne=n.ne||{};o.dictionary=Object.assign(o.dictionary||{},{"Show source":"",Source:""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(o){const c=o.oc=o.oc||{};c.dictionary=Object.assign(c.dictionary||{},{"Show source":"",Source:""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(i){const o=i.si=i.si||{};o.dictionary=Object.assign(o.dictionary||{},{"Show source":"",Source:""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(o){const i=o.sl=o.sl||{};i.dictionary=Object.assign(i.dictionary||{},{"Show source":"",Source:""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(o){const i=o.sq=o.sq||{};i.dictionary=Object.assign(i.dictionary||{},{"Show source":"",Source:""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(i){const o=i.ti=i.ti||{};o.dictionary=Object.assign(o.dictionary||{},{"Show source":"",Source:""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(o){const i=o.tk=o.tk||{};i.dictionary=Object.assign(i.dictionary||{},{"Show source":"",Source:""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(o){const t=o.tt=o.tt||{};t.dictionary=Object.assign(t.dictionary||{},{"Show source":"",Source:""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(o){const i=o.uz=o.uz||{};i.dictionary=Object.assign(i.dictionary||{},{"Show source":"",Source:""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
package/dist/index.css
CHANGED
@@ -4,12 +4,12 @@
|
|
4
4
|
*/
|
5
5
|
/*
|
6
6
|
* 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-
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
8
8
|
*/
|
9
9
|
|
10
10
|
/*
|
11
11
|
* Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
12
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-
|
12
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
13
13
|
*/
|
14
14
|
|
15
15
|
/**
|
@@ -19,14 +19,14 @@
|
|
19
19
|
*/
|
20
20
|
/*
|
21
21
|
* Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
22
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-
|
22
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
23
23
|
*/
|
24
24
|
/**
|
25
25
|
* A visual style of focused element's border.
|
26
26
|
*/
|
27
27
|
/*
|
28
28
|
* Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
29
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-
|
29
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
30
30
|
*/
|
31
31
|
/**
|
32
32
|
* A helper to combine multiple shadows.
|
package/dist/index.css.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../theme/sourceediting.css","index.css","../../../node_modules/@ckeditor/ckeditor5-theme-lark/theme/mixins/_rounded.css","../../../node_modules/@ckeditor/ckeditor5-theme-lark/theme/mixins/_focus.css","../../../node_modules/@ckeditor/ckeditor5-theme-lark/theme/mixins/_shadow.css"],"names":[],"mappings":";;;;AAAA,CAAA;ACCA,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,QAAQ;AAC3E,CAAC,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,QAAQ,CAAC,
|
1
|
+
{"version":3,"sources":["../theme/sourceediting.css","index.css","../../../node_modules/@ckeditor/ckeditor5-theme-lark/theme/mixins/_rounded.css","../../../node_modules/@ckeditor/ckeditor5-theme-lark/theme/mixins/_focus.css","../../../node_modules/@ckeditor/ckeditor5-theme-lark/theme/mixins/_shadow.css"],"names":[],"mappings":";;;;AAAA,CAAA;ACCA,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,QAAQ;AAC3E,CAAC,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,QAAQ,CAAC,SAAS,CAAC;AAClF,CAAC,CDAC;;AEHF,CAAA;ADMA,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,QAAQ;AAC3E,CAAC,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,QAAQ,CAAC,SAAS,CAAC;AAClF,CAAC,CCLC;;AAEF,CAAA,CAAA;ADMA,CAAC,CAAC,CAAC,UAAU,CAAC,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK;AACpE,CAAC;AACD,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,MAAM,CAAC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,CAAA;AC8BD,CAAC,CEpEA,CAAA,CAAA,CAAA,OAAA,CAAA,MAAA,CAAA,OAAA,CAAA,CAAA,CAA4B;AFqE7B,CAAC,CEpEA,OAAA,CAAA,CAAA,IAAa;AFqEd,CAAC,CEpEA,MAAA,CAAA,CAAA,GAAA,CAAA,CAAA,CAAA,EAAA,CAAA,KAAA,CAAA,IAAA,CAA2B;AFqE5B,CAAC,CGvEA,GAAA,CAAA,MAAA,CAAA,CAAA,GAAA,CAAA,CAAA,CAAA,EAAA,CAAA,KAAA,CAAA,MAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAA8B;AHwE/B,CD/BC;;ACiCD,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC","file":"index.css.map","sourcesContent":["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\n\n@import \"@ckeditor/ckeditor5-theme-lark/theme/mixins/_rounded.css\";\n@import \"@ckeditor/ckeditor5-theme-lark/theme/mixins/_focus.css\";\n@import \"@ckeditor/ckeditor5-theme-lark/theme/mixins/_shadow.css\";\n\n.ck-source-editing-area {\n\tposition: relative;\n\toverflow: hidden;\n}\n\n.ck-source-editing-area::after,\n.ck-source-editing-area textarea {\n\tpadding: var(--ck-spacing-large);\n\tmargin: 0;\n\tborder: 1px solid transparent;\n\tline-height: var(--ck-line-height-base);\n\tfont-size: var(--ck-font-size-normal);\n\tfont-family: monospace;\n\twhite-space: pre-wrap;\n}\n\n.ck-source-editing-area::after {\n\tcontent: attr(data-value) \" \";\n\tvisibility: hidden;\n\tdisplay: block;\n}\n\n.ck-source-editing-area textarea {\n\tposition: absolute;\n\twidth: 100%;\n\theight: 100%;\n\tresize: none;\n\toutline: none;\n\toverflow: hidden;\n\tbox-sizing: border-box;\n\n\tborder-color: var(--ck-color-base-border);\n\n\t@mixin ck-rounded-corners {\n\t\tborder-top-left-radius: 0;\n\t\tborder-top-right-radius: 0;\n\t}\n\n\t&:not([readonly]):focus {\n\t\t@mixin ck-focus-ring;\n\t\t@mixin ck-box-shadow var(--ck-inner-shadow);\n\t}\n}\n","/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\n\n/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\n\n/**\n * Implements rounded corner interface for .ck-rounded-corners class.\n *\n * @see $ck-border-radius\n */\n/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\n/**\n * A visual style of focused element's border.\n */\n/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\n/**\n * A helper to combine multiple shadows.\n */\n/**\n * Gives an element a drop shadow so it looks like a floating panel.\n */\n\n.ck-source-editing-area {\n\tposition: relative;\n\toverflow: hidden;\n}\n\n.ck-source-editing-area::after,\n.ck-source-editing-area textarea {\n\tpadding: var(--ck-spacing-large);\n\tmargin: 0;\n\tborder: 1px solid transparent;\n\tline-height: var(--ck-line-height-base);\n\tfont-size: var(--ck-font-size-normal);\n\tfont-family: monospace;\n\twhite-space: pre-wrap;\n}\n\n.ck-source-editing-area::after {\n\tcontent: attr(data-value) \" \";\n\tvisibility: hidden;\n\tdisplay: block;\n}\n\n.ck-source-editing-area textarea {\n\tposition: absolute;\n\twidth: 100%;\n\theight: 100%;\n\tresize: none;\n\toutline: none;\n\toverflow: hidden;\n\tbox-sizing: border-box;\n\n\tborder-color: var(--ck-color-base-border);\n\n\tborder-radius: 0;\n}\n\n.ck-rounded-corners .ck-source-editing-area textarea,\n\t.ck-source-editing-area textarea.ck-rounded-corners {\n\t\tborder-radius: var(--ck-border-radius);\n\t\tborder-top-left-radius: 0;\n\t\tborder-top-right-radius: 0;\n\t}\n\n.ck-source-editing-area textarea:not([readonly]):focus {\n\t\t/* Disable native outline. */\n\t\toutline: none;\n\t\tborder: var(--ck-focus-ring);\n\t\tbox-shadow: var(--ck-inner-shadow), 0 0;\n\t}\n\n/*# sourceMappingURL=index.css.map */","/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\n\n/**\n * Implements rounded corner interface for .ck-rounded-corners class.\n *\n * @see $ck-border-radius\n */\n@define-mixin ck-rounded-corners {\n\tborder-radius: 0;\n\n\t.ck-rounded-corners &,\n\t&.ck-rounded-corners {\n\t\tborder-radius: var(--ck-border-radius);\n\t\t@mixin-content;\n\t}\n}\n","/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\n\n/**\n * A visual style of focused element's border.\n */\n@define-mixin ck-focus-ring {\n\t/* Disable native outline. */\n\toutline: none;\n\tborder: var(--ck-focus-ring)\n}\n","/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\n\n/**\n * A helper to combine multiple shadows.\n */\n@define-mixin ck-box-shadow $shadowA, $shadowB: 0 0 {\n\tbox-shadow: $shadowA, $shadowB;\n}\n\n/**\n * Gives an element a drop shadow so it looks like a floating panel.\n */\n@define-mixin ck-drop-shadow {\n\t@mixin ck-box-shadow var(--ck-drop-shadow);\n}\n"]}
|
package/dist/index.js
CHANGED
@@ -8,7 +8,7 @@ import { ElementReplacer, CKEditorError, createElement } from '@ckeditor/ckedito
|
|
8
8
|
|
9
9
|
/**
|
10
10
|
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
11
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-
|
11
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
12
12
|
*/ /**
|
13
13
|
* @module source-editing/utils/formathtml
|
14
14
|
*/ /**
|
@@ -267,34 +267,25 @@ const COMMAND_FORCE_DISABLE_ID = 'SourceEditingMode';
|
|
267
267
|
* {@glink api/source-editing package page}.
|
268
268
|
*/ class SourceEditing extends Plugin {
|
269
269
|
/**
|
270
|
-
|
271
|
-
|
270
|
+
* @inheritDoc
|
271
|
+
*/ static get pluginName() {
|
272
272
|
return 'SourceEditing';
|
273
273
|
}
|
274
274
|
/**
|
275
|
-
|
276
|
-
|
275
|
+
* @inheritDoc
|
276
|
+
*/ static get isOfficialPlugin() {
|
277
277
|
return true;
|
278
278
|
}
|
279
279
|
/**
|
280
|
-
|
281
|
-
|
280
|
+
* @inheritDoc
|
281
|
+
*/ static get requires() {
|
282
282
|
return [
|
283
283
|
PendingActions
|
284
284
|
];
|
285
285
|
}
|
286
286
|
/**
|
287
|
-
|
288
|
-
|
289
|
-
/**
|
290
|
-
* Maps all root names to wrapper elements containing the document source.
|
291
|
-
*/ _replacedRoots;
|
292
|
-
/**
|
293
|
-
* Maps all root names to their document data.
|
294
|
-
*/ _dataFromRoots;
|
295
|
-
/**
|
296
|
-
* @inheritDoc
|
297
|
-
*/ constructor(editor){
|
287
|
+
* @inheritDoc
|
288
|
+
*/ constructor(editor){
|
298
289
|
super(editor);
|
299
290
|
this.set('isSourceEditingMode', false);
|
300
291
|
this._elementReplacer = new ElementReplacer();
|
@@ -303,8 +294,8 @@ const COMMAND_FORCE_DISABLE_ID = 'SourceEditingMode';
|
|
303
294
|
editor.config.define('sourceEditing.allowCollaborationFeatures', false);
|
304
295
|
}
|
305
296
|
/**
|
306
|
-
|
307
|
-
|
297
|
+
* @inheritDoc
|
298
|
+
*/ init() {
|
308
299
|
this._checkCompatibility();
|
309
300
|
const editor = this.editor;
|
310
301
|
const t = editor.locale.t;
|
@@ -352,8 +343,8 @@ const COMMAND_FORCE_DISABLE_ID = 'SourceEditingMode';
|
|
352
343
|
});
|
353
344
|
}
|
354
345
|
/**
|
355
|
-
|
356
|
-
|
346
|
+
* Updates the source data in all hidden editing roots.
|
347
|
+
*/ updateEditorData() {
|
357
348
|
const editor = this.editor;
|
358
349
|
const data = {};
|
359
350
|
for (const [rootName, domSourceEditingElementWrapper] of this._replacedRoots){
|
@@ -380,17 +371,17 @@ const COMMAND_FORCE_DISABLE_ID = 'SourceEditingMode';
|
|
380
371
|
const allowCollaboration = editor.config.get('sourceEditing.allowCollaborationFeatures');
|
381
372
|
if (!allowCollaboration && editor.plugins.has('RealTimeCollaborativeEditing')) {
|
382
373
|
/**
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
374
|
+
* Source editing feature is not fully compatible with real-time collaboration,
|
375
|
+
* and using it may lead to data loss. Please read
|
376
|
+
* {@glink features/source-editing#limitations-and-incompatibilities source editing feature guide} to learn more.
|
377
|
+
*
|
378
|
+
* If you understand the possible risk of data loss, you can enable the source editing
|
379
|
+
* by setting the
|
380
|
+
* {@link module:source-editing/sourceeditingconfig~SourceEditingConfig#allowCollaborationFeatures}
|
381
|
+
* configuration flag to `true`.
|
382
|
+
*
|
383
|
+
* @error source-editing-incompatible-with-real-time-collaboration
|
384
|
+
*/ throw new CKEditorError('source-editing-incompatible-with-real-time-collaboration', null);
|
394
385
|
}
|
395
386
|
const collaborationPluginNamesToWarn = [
|
396
387
|
'CommentsEditing',
|
@@ -411,18 +402,18 @@ const COMMAND_FORCE_DISABLE_ID = 'SourceEditingMode';
|
|
411
402
|
}
|
412
403
|
}
|
413
404
|
/**
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
|
405
|
+
* Creates source editing wrappers that replace each editing root. Each wrapper contains the document source from the corresponding
|
406
|
+
* root.
|
407
|
+
*
|
408
|
+
* The wrapper element contains a textarea and it solves the problem, that the textarea element cannot auto expand its height based on
|
409
|
+
* the content it contains. The solution is to make the textarea more like a plain div element, which expands in height as much as it
|
410
|
+
* needs to, in order to display the whole document source without scrolling. The wrapper element is a parent for the textarea and for
|
411
|
+
* the pseudo-element `::after`, that replicates the look, content, and position of the textarea. The pseudo-element replica is hidden,
|
412
|
+
* but it is styled to be an identical visual copy of the textarea with the same content. Then, the wrapper is a grid container and both
|
413
|
+
* of its children (the textarea and the `::after` pseudo-element) are positioned within a CSS grid to occupy the same grid cell. The
|
414
|
+
* content in the pseudo-element `::after` is set in CSS and it stretches the grid to the appropriate size based on the textarea value.
|
415
|
+
* Since both children occupy the same grid cell, both have always the same height.
|
416
|
+
*/ _showSourceEditing() {
|
426
417
|
const editor = this.editor;
|
427
418
|
const editingView = editor.editing.view;
|
428
419
|
const model = editor.model;
|
@@ -468,8 +459,8 @@ const COMMAND_FORCE_DISABLE_ID = 'SourceEditingMode';
|
|
468
459
|
this._focusSourceEditing();
|
469
460
|
}
|
470
461
|
/**
|
471
|
-
|
472
|
-
|
462
|
+
* Restores all hidden editing roots and sets the source data in them.
|
463
|
+
*/ _hideSourceEditing() {
|
473
464
|
const editor = this.editor;
|
474
465
|
const editingView = editor.editing.view;
|
475
466
|
this.updateEditorData();
|
@@ -484,8 +475,8 @@ const COMMAND_FORCE_DISABLE_ID = 'SourceEditingMode';
|
|
484
475
|
editingView.focus();
|
485
476
|
}
|
486
477
|
/**
|
487
|
-
|
488
|
-
|
478
|
+
* Focuses the textarea containing document source from the first editing root.
|
479
|
+
*/ _focusSourceEditing() {
|
489
480
|
const editor = this.editor;
|
490
481
|
const [domSourceEditingElementWrapper] = this._replacedRoots.values();
|
491
482
|
const textarea = domSourceEditingElementWrapper.querySelector('textarea');
|
@@ -497,8 +488,8 @@ const COMMAND_FORCE_DISABLE_ID = 'SourceEditingMode';
|
|
497
488
|
textarea.focus();
|
498
489
|
}
|
499
490
|
/**
|
500
|
-
|
501
|
-
|
491
|
+
* Disables all commands.
|
492
|
+
*/ _disableCommands() {
|
502
493
|
const editor = this.editor;
|
503
494
|
for (const command of editor.commands.commands()){
|
504
495
|
command.forceDisabled(COMMAND_FORCE_DISABLE_ID);
|
@@ -509,8 +500,8 @@ const COMMAND_FORCE_DISABLE_ID = 'SourceEditingMode';
|
|
509
500
|
}
|
510
501
|
}
|
511
502
|
/**
|
512
|
-
|
513
|
-
|
503
|
+
* Clears forced disable for all commands, that was previously set through {@link #_disableCommands}.
|
504
|
+
*/ _enableCommands() {
|
514
505
|
const editor = this.editor;
|
515
506
|
for (const command of editor.commands.commands()){
|
516
507
|
command.clearForceDisabled(COMMAND_FORCE_DISABLE_ID);
|
@@ -521,10 +512,10 @@ const COMMAND_FORCE_DISABLE_ID = 'SourceEditingMode';
|
|
521
512
|
}
|
522
513
|
}
|
523
514
|
/**
|
524
|
-
|
525
|
-
|
526
|
-
|
527
|
-
|
515
|
+
* Adds or removes the `readonly` attribute from the textarea from all roots, if document source mode is active.
|
516
|
+
*
|
517
|
+
* @param isReadOnly Indicates whether all textarea elements should be read-only.
|
518
|
+
*/ _handleReadOnlyMode(isReadOnly) {
|
528
519
|
if (!this.isSourceEditingMode) {
|
529
520
|
return;
|
530
521
|
}
|
@@ -533,17 +524,17 @@ const COMMAND_FORCE_DISABLE_ID = 'SourceEditingMode';
|
|
533
524
|
}
|
534
525
|
}
|
535
526
|
/**
|
536
|
-
|
537
|
-
|
538
|
-
|
527
|
+
* Checks, if the plugin is allowed to handle the source editing mode by itself. Currently, the source editing mode is supported only
|
528
|
+
* for the {@link module:editor-classic/classiceditor~ClassicEditor classic editor}.
|
529
|
+
*/ _isAllowedToHandleSourceEditingMode() {
|
539
530
|
const editor = this.editor;
|
540
531
|
const editable = editor.ui.view.editable;
|
541
532
|
// Checks, if the editor's editable belongs to the editor's DOM tree.
|
542
533
|
return editable && !editable.hasExternalElement;
|
543
534
|
}
|
544
535
|
/**
|
545
|
-
|
546
|
-
|
536
|
+
* If any {@link module:ui/dialog/dialogview~DialogView editor dialog} is currently visible, hide it.
|
537
|
+
*/ _hideVisibleDialog() {
|
547
538
|
if (this.editor.plugins.has('Dialog')) {
|
548
539
|
const dialogPlugin = this.editor.plugins.get('Dialog');
|
549
540
|
if (dialogPlugin.isOpen) {
|