@ckeditor/ckeditor5-html-support 31.0.0 → 33.0.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 +2 -2
- package/build/html-support.js +3 -3
- package/build/html-support.js.map +1 -0
- package/build/translations/cs.js +1 -0
- package/build/translations/el.js +1 -0
- package/build/translations/es.js +1 -0
- package/build/translations/id.js +1 -0
- package/build/translations/pt-br.js +1 -0
- package/build/translations/sk.js +1 -0
- package/build/translations/zh.js +1 -0
- package/lang/translations/cs.po +21 -0
- package/lang/translations/de.po +1 -1
- package/lang/translations/el.po +21 -0
- package/lang/translations/en.po +1 -1
- package/lang/translations/es.po +21 -0
- package/lang/translations/gl.po +1 -1
- package/lang/translations/hu.po +1 -1
- package/lang/translations/id.po +21 -0
- package/lang/translations/it.po +1 -1
- package/lang/translations/nl.po +1 -1
- package/lang/translations/pl.po +1 -1
- package/lang/translations/pt-br.po +21 -0
- package/lang/translations/ru.po +1 -1
- package/lang/translations/sk.po +21 -0
- package/lang/translations/sr-latn.po +1 -1
- package/lang/translations/sr.po +1 -1
- package/lang/translations/zh.po +21 -0
- package/package.json +34 -34
- package/src/conversionutils.js +1 -1
- package/src/converters.js +13 -11
- package/src/datafilter.js +10 -6
- package/src/dataschema.js +1 -1
- package/src/generalhtmlsupport.js +6 -2
- package/src/htmlcomment.js +1 -1
- package/src/index.js +1 -1
- package/src/integrations/codeblock.js +1 -1
- package/src/integrations/dualcontent.js +1 -1
- package/src/integrations/heading.js +1 -1
- package/src/integrations/image.js +1 -1
- package/src/integrations/mediaembed.js +1 -1
- package/src/integrations/script.js +74 -0
- package/src/integrations/style.js +74 -0
- package/src/integrations/table.js +1 -1
- package/src/schemadefinitions.js +18 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(c){const i=c.cs=c.cs||{};i.dictionary=Object.assign(i.dictionary||{},{"HTML object":"HTML objekt"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(i){const n=i.el=i.el||{};n.dictionary=Object.assign(n.dictionary||{},{"HTML object":"Αντικείμενο HTML"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(i){const n=i.es=i.es||{};n.dictionary=Object.assign(n.dictionary||{},{"HTML object":"Objeto HTML"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(i){const n=i.id=i.id||{};n.dictionary=Object.assign(n.dictionary||{},{"HTML object":"Objek HTML"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(t){const i=t["pt-br"]=t["pt-br"]||{};i.dictionary=Object.assign(i.dictionary||{},{"HTML object":"Objeto HTML"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(i){const n=i.sk=i.sk||{};n.dictionary=Object.assign(n.dictionary||{},{"HTML object":"HTML objekt"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(i){const n=i.zh=i.zh||{};n.dictionary=Object.assign(n.dictionary||{},{"HTML object":"HTML 物件"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
|
|
2
|
+
#
|
|
3
|
+
# !!! IMPORTANT !!!
|
|
4
|
+
#
|
|
5
|
+
# Before you edit this file, please keep in mind that contributing to the project
|
|
6
|
+
# translations is possible ONLY via the Transifex online service.
|
|
7
|
+
#
|
|
8
|
+
# To submit your translations, visit https://www.transifex.com/ckeditor/ckeditor5.
|
|
9
|
+
#
|
|
10
|
+
# To learn more, check out the official contributor's guide:
|
|
11
|
+
# https://ckeditor.com/docs/ckeditor5/latest/framework/guides/contributing/contributing.html
|
|
12
|
+
#
|
|
13
|
+
msgid ""
|
|
14
|
+
msgstr ""
|
|
15
|
+
"Language-Team: Czech (https://www.transifex.com/ckeditor/teams/11143/cs/)\n"
|
|
16
|
+
"Language: cs\n"
|
|
17
|
+
"Plural-Forms: nplurals=4; plural=(n == 1 && n % 1 == 0) ? 0 : (n >= 2 && n <= 4 && n % 1 == 0) ? 1: (n % 1 != 0 ) ? 2 : 3;\n"
|
|
18
|
+
|
|
19
|
+
msgctxt "A label describing an HTML object widget."
|
|
20
|
+
msgid "HTML object"
|
|
21
|
+
msgstr "HTML objekt"
|
package/lang/translations/de.po
CHANGED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
|
|
2
|
+
#
|
|
3
|
+
# !!! IMPORTANT !!!
|
|
4
|
+
#
|
|
5
|
+
# Before you edit this file, please keep in mind that contributing to the project
|
|
6
|
+
# translations is possible ONLY via the Transifex online service.
|
|
7
|
+
#
|
|
8
|
+
# To submit your translations, visit https://www.transifex.com/ckeditor/ckeditor5.
|
|
9
|
+
#
|
|
10
|
+
# To learn more, check out the official contributor's guide:
|
|
11
|
+
# https://ckeditor.com/docs/ckeditor5/latest/framework/guides/contributing/contributing.html
|
|
12
|
+
#
|
|
13
|
+
msgid ""
|
|
14
|
+
msgstr ""
|
|
15
|
+
"Language-Team: Greek (https://www.transifex.com/ckeditor/teams/11143/el/)\n"
|
|
16
|
+
"Language: el\n"
|
|
17
|
+
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
|
18
|
+
|
|
19
|
+
msgctxt "A label describing an HTML object widget."
|
|
20
|
+
msgid "HTML object"
|
|
21
|
+
msgstr "Αντικείμενο HTML"
|
package/lang/translations/en.po
CHANGED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
|
|
2
|
+
#
|
|
3
|
+
# !!! IMPORTANT !!!
|
|
4
|
+
#
|
|
5
|
+
# Before you edit this file, please keep in mind that contributing to the project
|
|
6
|
+
# translations is possible ONLY via the Transifex online service.
|
|
7
|
+
#
|
|
8
|
+
# To submit your translations, visit https://www.transifex.com/ckeditor/ckeditor5.
|
|
9
|
+
#
|
|
10
|
+
# To learn more, check out the official contributor's guide:
|
|
11
|
+
# https://ckeditor.com/docs/ckeditor5/latest/framework/guides/contributing/contributing.html
|
|
12
|
+
#
|
|
13
|
+
msgid ""
|
|
14
|
+
msgstr ""
|
|
15
|
+
"Language-Team: Spanish (https://www.transifex.com/ckeditor/teams/11143/es/)\n"
|
|
16
|
+
"Language: es\n"
|
|
17
|
+
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
|
18
|
+
|
|
19
|
+
msgctxt "A label describing an HTML object widget."
|
|
20
|
+
msgid "HTML object"
|
|
21
|
+
msgstr "Objeto HTML"
|
package/lang/translations/gl.po
CHANGED
package/lang/translations/hu.po
CHANGED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
|
|
2
|
+
#
|
|
3
|
+
# !!! IMPORTANT !!!
|
|
4
|
+
#
|
|
5
|
+
# Before you edit this file, please keep in mind that contributing to the project
|
|
6
|
+
# translations is possible ONLY via the Transifex online service.
|
|
7
|
+
#
|
|
8
|
+
# To submit your translations, visit https://www.transifex.com/ckeditor/ckeditor5.
|
|
9
|
+
#
|
|
10
|
+
# To learn more, check out the official contributor's guide:
|
|
11
|
+
# https://ckeditor.com/docs/ckeditor5/latest/framework/guides/contributing/contributing.html
|
|
12
|
+
#
|
|
13
|
+
msgid ""
|
|
14
|
+
msgstr ""
|
|
15
|
+
"Language-Team: Indonesian (https://www.transifex.com/ckeditor/teams/11143/id/)\n"
|
|
16
|
+
"Language: id\n"
|
|
17
|
+
"Plural-Forms: nplurals=1; plural=0;\n"
|
|
18
|
+
|
|
19
|
+
msgctxt "A label describing an HTML object widget."
|
|
20
|
+
msgid "HTML object"
|
|
21
|
+
msgstr "Objek HTML"
|
package/lang/translations/it.po
CHANGED
package/lang/translations/nl.po
CHANGED
package/lang/translations/pl.po
CHANGED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
|
|
2
|
+
#
|
|
3
|
+
# !!! IMPORTANT !!!
|
|
4
|
+
#
|
|
5
|
+
# Before you edit this file, please keep in mind that contributing to the project
|
|
6
|
+
# translations is possible ONLY via the Transifex online service.
|
|
7
|
+
#
|
|
8
|
+
# To submit your translations, visit https://www.transifex.com/ckeditor/ckeditor5.
|
|
9
|
+
#
|
|
10
|
+
# To learn more, check out the official contributor's guide:
|
|
11
|
+
# https://ckeditor.com/docs/ckeditor5/latest/framework/guides/contributing/contributing.html
|
|
12
|
+
#
|
|
13
|
+
msgid ""
|
|
14
|
+
msgstr ""
|
|
15
|
+
"Language-Team: Portuguese (Brazil) (https://www.transifex.com/ckeditor/teams/11143/pt_BR/)\n"
|
|
16
|
+
"Language: pt_BR\n"
|
|
17
|
+
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
|
|
18
|
+
|
|
19
|
+
msgctxt "A label describing an HTML object widget."
|
|
20
|
+
msgid "HTML object"
|
|
21
|
+
msgstr "Objeto HTML"
|
package/lang/translations/ru.po
CHANGED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
|
|
2
|
+
#
|
|
3
|
+
# !!! IMPORTANT !!!
|
|
4
|
+
#
|
|
5
|
+
# Before you edit this file, please keep in mind that contributing to the project
|
|
6
|
+
# translations is possible ONLY via the Transifex online service.
|
|
7
|
+
#
|
|
8
|
+
# To submit your translations, visit https://www.transifex.com/ckeditor/ckeditor5.
|
|
9
|
+
#
|
|
10
|
+
# To learn more, check out the official contributor's guide:
|
|
11
|
+
# https://ckeditor.com/docs/ckeditor5/latest/framework/guides/contributing/contributing.html
|
|
12
|
+
#
|
|
13
|
+
msgid ""
|
|
14
|
+
msgstr ""
|
|
15
|
+
"Language-Team: Slovak (https://www.transifex.com/ckeditor/teams/11143/sk/)\n"
|
|
16
|
+
"Language: sk\n"
|
|
17
|
+
"Plural-Forms: nplurals=4; plural=(n % 1 == 0 && n == 1 ? 0 : n % 1 == 0 && n >= 2 && n <= 4 ? 1 : n % 1 != 0 ? 2: 3);\n"
|
|
18
|
+
|
|
19
|
+
msgctxt "A label describing an HTML object widget."
|
|
20
|
+
msgid "HTML object"
|
|
21
|
+
msgstr "HTML objekt"
|
package/lang/translations/sr.po
CHANGED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
|
|
2
|
+
#
|
|
3
|
+
# !!! IMPORTANT !!!
|
|
4
|
+
#
|
|
5
|
+
# Before you edit this file, please keep in mind that contributing to the project
|
|
6
|
+
# translations is possible ONLY via the Transifex online service.
|
|
7
|
+
#
|
|
8
|
+
# To submit your translations, visit https://www.transifex.com/ckeditor/ckeditor5.
|
|
9
|
+
#
|
|
10
|
+
# To learn more, check out the official contributor's guide:
|
|
11
|
+
# https://ckeditor.com/docs/ckeditor5/latest/framework/guides/contributing/contributing.html
|
|
12
|
+
#
|
|
13
|
+
msgid ""
|
|
14
|
+
msgstr ""
|
|
15
|
+
"Language-Team: Chinese (Taiwan) (https://www.transifex.com/ckeditor/teams/11143/zh_TW/)\n"
|
|
16
|
+
"Language: zh_TW\n"
|
|
17
|
+
"Plural-Forms: nplurals=1; plural=0;\n"
|
|
18
|
+
|
|
19
|
+
msgctxt "A label describing an HTML object widget."
|
|
20
|
+
msgid "HTML object"
|
|
21
|
+
msgstr "HTML 物件"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-html-support",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "33.0.0",
|
|
4
4
|
"description": "HTML Support feature for CKEditor 5.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ckeditor",
|
|
@@ -16,44 +16,44 @@
|
|
|
16
16
|
],
|
|
17
17
|
"main": "src/index.js",
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"ckeditor5": "^
|
|
19
|
+
"ckeditor5": "^33.0.0",
|
|
20
20
|
"lodash-es": "^4.17.15"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
|
-
"@ckeditor/ckeditor5-alignment": "^
|
|
24
|
-
"@ckeditor/ckeditor5-basic-styles": "^
|
|
25
|
-
"@ckeditor/ckeditor5-block-quote": "^
|
|
26
|
-
"@ckeditor/ckeditor5-cloud-services": "^
|
|
27
|
-
"@ckeditor/ckeditor5-code-block": "^
|
|
28
|
-
"@ckeditor/ckeditor5-core": "^
|
|
29
|
-
"@ckeditor/ckeditor5-dev-utils": "^
|
|
30
|
-
"@ckeditor/ckeditor5-easy-image": "^
|
|
31
|
-
"@ckeditor/ckeditor5-editor-classic": "^
|
|
32
|
-
"@ckeditor/ckeditor5-engine": "^
|
|
33
|
-
"@ckeditor/ckeditor5-enter": "^
|
|
34
|
-
"@ckeditor/ckeditor5-essentials": "^
|
|
35
|
-
"@ckeditor/ckeditor5-font": "^
|
|
36
|
-
"@ckeditor/ckeditor5-heading": "^
|
|
37
|
-
"@ckeditor/ckeditor5-highlight": "^
|
|
38
|
-
"@ckeditor/ckeditor5-horizontal-line": "^
|
|
39
|
-
"@ckeditor/ckeditor5-html-embed": "^
|
|
40
|
-
"@ckeditor/ckeditor5-image": "^
|
|
41
|
-
"@ckeditor/ckeditor5-indent": "^
|
|
42
|
-
"@ckeditor/ckeditor5-link": "^
|
|
43
|
-
"@ckeditor/ckeditor5-list": "^
|
|
44
|
-
"@ckeditor/ckeditor5-media-embed": "^
|
|
45
|
-
"@ckeditor/ckeditor5-page-break": "^
|
|
46
|
-
"@ckeditor/ckeditor5-paragraph": "^
|
|
47
|
-
"@ckeditor/ckeditor5-paste-from-office": "^
|
|
48
|
-
"@ckeditor/ckeditor5-source-editing": "^
|
|
49
|
-
"@ckeditor/ckeditor5-table": "^
|
|
50
|
-
"@ckeditor/ckeditor5-theme-lark": "^
|
|
51
|
-
"@ckeditor/ckeditor5-utils": "^
|
|
52
|
-
"webpack": "^
|
|
53
|
-
"webpack-cli": "^
|
|
23
|
+
"@ckeditor/ckeditor5-alignment": "^33.0.0",
|
|
24
|
+
"@ckeditor/ckeditor5-basic-styles": "^33.0.0",
|
|
25
|
+
"@ckeditor/ckeditor5-block-quote": "^33.0.0",
|
|
26
|
+
"@ckeditor/ckeditor5-cloud-services": "^33.0.0",
|
|
27
|
+
"@ckeditor/ckeditor5-code-block": "^33.0.0",
|
|
28
|
+
"@ckeditor/ckeditor5-core": "^33.0.0",
|
|
29
|
+
"@ckeditor/ckeditor5-dev-utils": "^28.0.1",
|
|
30
|
+
"@ckeditor/ckeditor5-easy-image": "^33.0.0",
|
|
31
|
+
"@ckeditor/ckeditor5-editor-classic": "^33.0.0",
|
|
32
|
+
"@ckeditor/ckeditor5-engine": "^33.0.0",
|
|
33
|
+
"@ckeditor/ckeditor5-enter": "^33.0.0",
|
|
34
|
+
"@ckeditor/ckeditor5-essentials": "^33.0.0",
|
|
35
|
+
"@ckeditor/ckeditor5-font": "^33.0.0",
|
|
36
|
+
"@ckeditor/ckeditor5-heading": "^33.0.0",
|
|
37
|
+
"@ckeditor/ckeditor5-highlight": "^33.0.0",
|
|
38
|
+
"@ckeditor/ckeditor5-horizontal-line": "^33.0.0",
|
|
39
|
+
"@ckeditor/ckeditor5-html-embed": "^33.0.0",
|
|
40
|
+
"@ckeditor/ckeditor5-image": "^33.0.0",
|
|
41
|
+
"@ckeditor/ckeditor5-indent": "^33.0.0",
|
|
42
|
+
"@ckeditor/ckeditor5-link": "^33.0.0",
|
|
43
|
+
"@ckeditor/ckeditor5-list": "^33.0.0",
|
|
44
|
+
"@ckeditor/ckeditor5-media-embed": "^33.0.0",
|
|
45
|
+
"@ckeditor/ckeditor5-page-break": "^33.0.0",
|
|
46
|
+
"@ckeditor/ckeditor5-paragraph": "^33.0.0",
|
|
47
|
+
"@ckeditor/ckeditor5-paste-from-office": "^33.0.0",
|
|
48
|
+
"@ckeditor/ckeditor5-source-editing": "^33.0.0",
|
|
49
|
+
"@ckeditor/ckeditor5-table": "^33.0.0",
|
|
50
|
+
"@ckeditor/ckeditor5-theme-lark": "^33.0.0",
|
|
51
|
+
"@ckeditor/ckeditor5-utils": "^33.0.0",
|
|
52
|
+
"webpack": "^5.58.1",
|
|
53
|
+
"webpack-cli": "^4.9.0"
|
|
54
54
|
},
|
|
55
55
|
"engines": {
|
|
56
|
-
"node": ">=
|
|
56
|
+
"node": ">=14.0.0",
|
|
57
57
|
"npm": ">=5.7.1"
|
|
58
58
|
},
|
|
59
59
|
"author": "CKSource (http://cksource.com/)",
|
package/src/conversionutils.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
|
package/src/converters.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -40,15 +40,6 @@ export function toObjectWidgetConverter( editor, { view: viewName, isInline } )
|
|
|
40
40
|
return ( modelElement, { writer, consumable } ) => {
|
|
41
41
|
const widgetLabel = t( 'HTML object' );
|
|
42
42
|
|
|
43
|
-
// Widget cannot be a raw element because the widget system would not be able
|
|
44
|
-
// to add its UI to it. Thus, we need separate view container.
|
|
45
|
-
const viewContainer = writer.createContainerElement( isInline ? 'span' : 'div', {
|
|
46
|
-
class: 'html-object-embed',
|
|
47
|
-
'data-html-object-embed-label': widgetLabel
|
|
48
|
-
}, {
|
|
49
|
-
isAllowedInsideAttributeElement: isInline
|
|
50
|
-
} );
|
|
51
|
-
|
|
52
43
|
const viewElement = createObjectView( viewName, modelElement, writer );
|
|
53
44
|
writer.addClass( 'html-object-embed__content', viewElement );
|
|
54
45
|
|
|
@@ -57,7 +48,18 @@ export function toObjectWidgetConverter( editor, { view: viewName, isInline } )
|
|
|
57
48
|
setViewAttributes( writer, viewAttributes, viewElement );
|
|
58
49
|
}
|
|
59
50
|
|
|
60
|
-
|
|
51
|
+
// Widget cannot be a raw element because the widget system would not be able
|
|
52
|
+
// to add its UI to it. Thus, we need separate view container.
|
|
53
|
+
const viewContainer = writer.createContainerElement( isInline ? 'span' : 'div',
|
|
54
|
+
{
|
|
55
|
+
class: 'html-object-embed',
|
|
56
|
+
'data-html-object-embed-label': widgetLabel
|
|
57
|
+
},
|
|
58
|
+
viewElement,
|
|
59
|
+
{
|
|
60
|
+
isAllowedInsideAttributeElement: isInline
|
|
61
|
+
}
|
|
62
|
+
);
|
|
61
63
|
|
|
62
64
|
return toWidget( viewContainer, writer, { widgetLabel } );
|
|
63
65
|
};
|
package/src/datafilter.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -240,10 +240,14 @@ export default class DataFilter extends Plugin {
|
|
|
240
240
|
this._fireRegisterEvent( definition );
|
|
241
241
|
}
|
|
242
242
|
}, {
|
|
243
|
-
// With
|
|
244
|
-
// running data conversion.
|
|
245
|
-
//
|
|
246
|
-
|
|
243
|
+
// With highest priority listener we are able to register elements right before
|
|
244
|
+
// running data conversion. Also:
|
|
245
|
+
// * Make sure that priority is higher than the one used by `RealTimeCollaborationClient`,
|
|
246
|
+
// as RTC is stopping event propagation.
|
|
247
|
+
// * Make sure no other features hook into this event before GHS because otherwise the
|
|
248
|
+
// downcast conversion (for these features) could run before GHS registered its converters
|
|
249
|
+
// (https://github.com/ckeditor/ckeditor5/issues/11356).
|
|
250
|
+
priority: priorities.get( 'highest' ) + 1
|
|
247
251
|
} );
|
|
248
252
|
}
|
|
249
253
|
|
|
@@ -331,7 +335,7 @@ export default class DataFilter extends Plugin {
|
|
|
331
335
|
} );
|
|
332
336
|
conversion.for( 'upcast' ).add( viewToModelBlockAttributeConverter( definition, this ) );
|
|
333
337
|
|
|
334
|
-
conversion.for( 'editingDowncast' ).
|
|
338
|
+
conversion.for( 'editingDowncast' ).elementToStructure( {
|
|
335
339
|
model: modelName,
|
|
336
340
|
view: toObjectWidgetConverter( editor, definition )
|
|
337
341
|
} );
|
package/src/dataschema.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -15,7 +15,9 @@ import DualContentModelElementSupport from './integrations/dualcontent';
|
|
|
15
15
|
import HeadingElementSupport from './integrations/heading';
|
|
16
16
|
import ImageElementSupport from './integrations/image';
|
|
17
17
|
import MediaEmbedElementSupport from './integrations/mediaembed';
|
|
18
|
+
import ScriptElementSupport from './integrations/script';
|
|
18
19
|
import TableElementSupport from './integrations/table';
|
|
20
|
+
import StyleElementSupport from './integrations/style';
|
|
19
21
|
|
|
20
22
|
/**
|
|
21
23
|
* The General HTML Support feature.
|
|
@@ -44,7 +46,9 @@ export default class GeneralHtmlSupport extends Plugin {
|
|
|
44
46
|
HeadingElementSupport,
|
|
45
47
|
ImageElementSupport,
|
|
46
48
|
MediaEmbedElementSupport,
|
|
47
|
-
|
|
49
|
+
ScriptElementSupport,
|
|
50
|
+
TableElementSupport,
|
|
51
|
+
StyleElementSupport
|
|
48
52
|
];
|
|
49
53
|
}
|
|
50
54
|
|
package/src/htmlcomment.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
|
package/src/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2022, 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
|
+
/**
|
|
7
|
+
* @module html-support/integrations/script
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import { Plugin } from 'ckeditor5/src/core';
|
|
11
|
+
import {
|
|
12
|
+
createObjectView,
|
|
13
|
+
modelToViewBlockAttributeConverter,
|
|
14
|
+
viewToModelBlockAttributeConverter,
|
|
15
|
+
viewToModelObjectConverter
|
|
16
|
+
} from '../converters.js';
|
|
17
|
+
|
|
18
|
+
import DataFilter from '../datafilter';
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Provides the General HTML Support for `script` elements.
|
|
22
|
+
*
|
|
23
|
+
* @extends module:core/plugin~Plugin
|
|
24
|
+
*/
|
|
25
|
+
export default class ScriptElementSupport extends Plugin {
|
|
26
|
+
/**
|
|
27
|
+
* @inheritDoc
|
|
28
|
+
*/
|
|
29
|
+
static get requires() {
|
|
30
|
+
return [ DataFilter ];
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* @inheritDoc
|
|
35
|
+
*/
|
|
36
|
+
init() {
|
|
37
|
+
const dataFilter = this.editor.plugins.get( DataFilter );
|
|
38
|
+
|
|
39
|
+
dataFilter.on( 'register:script', ( evt, definition ) => {
|
|
40
|
+
const editor = this.editor;
|
|
41
|
+
const schema = editor.model.schema;
|
|
42
|
+
const conversion = editor.conversion;
|
|
43
|
+
|
|
44
|
+
schema.register( 'htmlScript', definition.modelSchema );
|
|
45
|
+
|
|
46
|
+
schema.extend( 'htmlScript', {
|
|
47
|
+
allowAttributes: [ 'htmlAttributes', 'htmlContent' ],
|
|
48
|
+
isContent: true
|
|
49
|
+
} );
|
|
50
|
+
|
|
51
|
+
editor.data.registerRawContentMatcher( {
|
|
52
|
+
name: 'script'
|
|
53
|
+
} );
|
|
54
|
+
|
|
55
|
+
conversion.for( 'upcast' ).elementToElement( {
|
|
56
|
+
view: 'script',
|
|
57
|
+
model: viewToModelObjectConverter( definition )
|
|
58
|
+
} );
|
|
59
|
+
|
|
60
|
+
conversion.for( 'upcast' ).add( viewToModelBlockAttributeConverter( definition, dataFilter ) );
|
|
61
|
+
|
|
62
|
+
conversion.for( 'downcast' ).elementToElement( {
|
|
63
|
+
model: 'htmlScript',
|
|
64
|
+
view: ( modelElement, { writer } ) => {
|
|
65
|
+
return createObjectView( 'script', modelElement, writer );
|
|
66
|
+
}
|
|
67
|
+
} );
|
|
68
|
+
|
|
69
|
+
conversion.for( 'downcast' ).add( modelToViewBlockAttributeConverter( definition ) );
|
|
70
|
+
|
|
71
|
+
evt.stop();
|
|
72
|
+
} );
|
|
73
|
+
}
|
|
74
|
+
}
|