@ckeditor/ckeditor5-table 33.0.0 → 34.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/README.md +2 -1
- package/build/table.js +1 -1
- package/build/table.js.map +1 -1
- package/build/translations/en-au.js +1 -1
- package/build/translations/hr.js +1 -1
- package/build/translations/sk.js +1 -1
- package/lang/translations/en-au.po +3 -3
- package/lang/translations/hr.po +3 -3
- package/lang/translations/sk.po +3 -3
- package/package.json +23 -23
- package/src/commands/inserttablecommand.js +1 -5
- package/src/index.js +1 -0
- package/src/tableediting.js +3 -5
- package/src/tablekeyboard.js +68 -66
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e){const t=e["en-au"]=e["en-au"]||{};t.dictionary=Object.assign(t.dictionary||{},{"Align cell text to the bottom":"Align cell text to the bottom","Align cell text to the center":"Align cell text to the center","Align cell text to the left":"Align cell text to the left","Align cell text to the middle":"Align cell text to the middle","Align cell text to the right":"Align cell text to the right","Align cell text to the top":"Align cell text to the top","Align table to the left":"Align table to the left","Align table to the right":"Align table to the right",Alignment:"Alignment",Background:"Background",Border:"Border","Cell properties":"Cell properties","Center table":"Centre table",Color:"Colour","Color picker":"Colour picker",Column:"Column",Dashed:"Dashed","Delete column":"Delete column","Delete row":"Delete row",Dimensions:"Dimensions",Dotted:"Dotted",Double:"Double","Enter table caption":"",Groove:"Groove","Header column":"Header column","Header row":"Header row",Height:"Height","Horizontal text alignment toolbar":"Horizontal text alignment toolbar","Insert column left":"Insert column left","Insert column right":"Insert column right","Insert row above":"Insert row above","Insert row below":"Insert row below","Insert table":"Insert table",Inset:"Inset","Justify cell text":"Justify cell text","Merge cell down":"Merge cell down","Merge cell left":"Merge cell left","Merge cell right":"Merge cell right","Merge cell up":"Merge cell up","Merge cells":"Merge cells",None:"None",Outset:"Outset",Padding:"Padding",Ridge:"Ridge",Row:"Row","Select column":"Select column","Select row":"Select row",Solid:"Solid","Split cell horizontally":"Split cell horizontally","Split cell vertically":"Split cell vertically",Style:"Style","Table alignment toolbar":"Table alignment toolbar","Table cell text alignment":"Table cell text alignment","Table properties":"Table properties","Table toolbar":"Table toolbar",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':'The colour is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".','The value is invalid. Try "10px" or "2em" or simply "2".':'The value is invalid. Try "10px" or "2em" or simply "2".',"Toggle caption off":"","Toggle caption on":"","Vertical text alignment toolbar":"Vertical text alignment toolbar",Width:"Width"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
|
1
|
+
!function(e){const t=e["en-au"]=e["en-au"]||{};t.dictionary=Object.assign(t.dictionary||{},{"Align cell text to the bottom":"Align cell text to the bottom","Align cell text to the center":"Align cell text to the center","Align cell text to the left":"Align cell text to the left","Align cell text to the middle":"Align cell text to the middle","Align cell text to the right":"Align cell text to the right","Align cell text to the top":"Align cell text to the top","Align table to the left":"Align table to the left","Align table to the right":"Align table to the right",Alignment:"Alignment",Background:"Background",Border:"Border","Cell properties":"Cell properties","Center table":"Centre table",Color:"Colour","Color picker":"Colour picker",Column:"Column",Dashed:"Dashed","Delete column":"Delete column","Delete row":"Delete row",Dimensions:"Dimensions",Dotted:"Dotted",Double:"Double","Enter table caption":"Enter table caption",Groove:"Groove","Header column":"Header column","Header row":"Header row",Height:"Height","Horizontal text alignment toolbar":"Horizontal text alignment toolbar","Insert column left":"Insert column left","Insert column right":"Insert column right","Insert row above":"Insert row above","Insert row below":"Insert row below","Insert table":"Insert table",Inset:"Inset","Justify cell text":"Justify cell text","Merge cell down":"Merge cell down","Merge cell left":"Merge cell left","Merge cell right":"Merge cell right","Merge cell up":"Merge cell up","Merge cells":"Merge cells",None:"None",Outset:"Outset",Padding:"Padding",Ridge:"Ridge",Row:"Row","Select column":"Select column","Select row":"Select row",Solid:"Solid","Split cell horizontally":"Split cell horizontally","Split cell vertically":"Split cell vertically",Style:"Style","Table alignment toolbar":"Table alignment toolbar","Table cell text alignment":"Table cell text alignment","Table properties":"Table properties","Table toolbar":"Table toolbar",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':'The colour is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".','The value is invalid. Try "10px" or "2em" or simply "2".':'The value is invalid. Try "10px" or "2em" or simply "2".',"Toggle caption off":"Toggle caption off","Toggle caption on":"Toggle caption on","Vertical text alignment toolbar":"Vertical text alignment toolbar",Width:"Width"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
package/build/translations/hr.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e){const a=e.hr=e.hr||{};a.dictionary=Object.assign(a.dictionary||{},{"Align cell text to the bottom":"Tekst ćelije poravnaj prema dolje","Align cell text to the center":"Tekst ćelije poravnaj u sredinu","Align cell text to the left":"Tekst ćelije poravnaj lijevo","Align cell text to the middle":"Tekst ćelije poravnaj u sredinu","Align cell text to the right":"Tekst ćelije poravnaj udesno","Align cell text to the top":"Tekst ćelije poravnaj prema gore","Align table to the left":"Poravnaj tablicu ulijevo","Align table to the right":"Poravnaj tablicu udesno",Alignment:"Poravnanje",Background:"Pozadina",Border:"Granica","Cell properties":"Svojstva ćelije","Center table":"Centriraj tablicu",Color:"Boja","Color picker":"Birač boje",Column:"Kolona",Dashed:"Crtičasta","Delete column":"Obriši kolonu","Delete row":"Obriši red",Dimensions:"Dimenzije",Dotted:"Točkasta",Double:"Dvostruka","Enter table caption":"",Groove:"","Header column":"Kolona zaglavlja","Header row":"Red zaglavlja",Height:"Visina","Horizontal text alignment toolbar":"Alatna traka za horizontalno poravnanje teksta","Insert column left":"Umetni stupac lijevo","Insert column right":"Umetni stupac desno","Insert row above":"Ubaci red iznad","Insert row below":"Ubaci red ispod","Insert table":"Ubaci tablicu",Inset:"","Justify cell text":"Razvuci tekst ćelije","Merge cell down":"Spoji ćelije prema dolje","Merge cell left":"Spoji ćelije prema lijevo","Merge cell right":"Spoji ćelije prema desno","Merge cell up":"Spoji ćelije prema gore","Merge cells":"Spoji ćelije",None:"Nikakva",Outset:"",Padding:"Podstava",Ridge:"Greben",Row:"Red","Select column":"Odaberi stupac","Select row":"Odaberi redak",Solid:"Neprekidna","Split cell horizontally":"Razdvoji ćeliju vodoravno","Split cell vertically":"Razdvoji ćeliju okomito",Style:"Stil","Table alignment toolbar":"Alatna traka za poravnanje tablice","Table cell text alignment":"Poravnanje teksta ćelije tablice","Table properties":"Svojstva tablice","Table toolbar":"Traka za tablice",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':'Neispravna boja. Pokušajte "#FF0000" ili "rgb(255,0,0)" ili "red".','The value is invalid. Try "10px" or "2em" or simply "2".':'Neispravna vrijednost. Pokušajte "10px" ili "2em" ili jednostavno "2".',"Toggle caption off":"","Toggle caption on":"","Vertical text alignment toolbar":"Alatna traka za vertikalno poravnanje teksta",Width:"Širina"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
|
1
|
+
!function(e){const a=e.hr=e.hr||{};a.dictionary=Object.assign(a.dictionary||{},{"Align cell text to the bottom":"Tekst ćelije poravnaj prema dolje","Align cell text to the center":"Tekst ćelije poravnaj u sredinu","Align cell text to the left":"Tekst ćelije poravnaj lijevo","Align cell text to the middle":"Tekst ćelije poravnaj u sredinu","Align cell text to the right":"Tekst ćelije poravnaj udesno","Align cell text to the top":"Tekst ćelije poravnaj prema gore","Align table to the left":"Poravnaj tablicu ulijevo","Align table to the right":"Poravnaj tablicu udesno",Alignment:"Poravnanje",Background:"Pozadina",Border:"Granica","Cell properties":"Svojstva ćelije","Center table":"Centriraj tablicu",Color:"Boja","Color picker":"Birač boje",Column:"Kolona",Dashed:"Crtičasta","Delete column":"Obriši kolonu","Delete row":"Obriši red",Dimensions:"Dimenzije",Dotted:"Točkasta",Double:"Dvostruka","Enter table caption":"Unesite natpis",Groove:"","Header column":"Kolona zaglavlja","Header row":"Red zaglavlja",Height:"Visina","Horizontal text alignment toolbar":"Alatna traka za horizontalno poravnanje teksta","Insert column left":"Umetni stupac lijevo","Insert column right":"Umetni stupac desno","Insert row above":"Ubaci red iznad","Insert row below":"Ubaci red ispod","Insert table":"Ubaci tablicu",Inset:"","Justify cell text":"Razvuci tekst ćelije","Merge cell down":"Spoji ćelije prema dolje","Merge cell left":"Spoji ćelije prema lijevo","Merge cell right":"Spoji ćelije prema desno","Merge cell up":"Spoji ćelije prema gore","Merge cells":"Spoji ćelije",None:"Nikakva",Outset:"",Padding:"Podstava",Ridge:"Greben",Row:"Red","Select column":"Odaberi stupac","Select row":"Odaberi redak",Solid:"Neprekidna","Split cell horizontally":"Razdvoji ćeliju vodoravno","Split cell vertically":"Razdvoji ćeliju okomito",Style:"Stil","Table alignment toolbar":"Alatna traka za poravnanje tablice","Table cell text alignment":"Poravnanje teksta ćelije tablice","Table properties":"Svojstva tablice","Table toolbar":"Traka za tablice",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':'Neispravna boja. Pokušajte "#FF0000" ili "rgb(255,0,0)" ili "red".','The value is invalid. Try "10px" or "2em" or simply "2".':'Neispravna vrijednost. Pokušajte "10px" ili "2em" ili jednostavno "2".',"Toggle caption off":"Isključite natpis","Toggle caption on":"Uključite natpis","Vertical text alignment toolbar":"Alatna traka za vertikalno poravnanje teksta",Width:"Širina"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
package/build/translations/sk.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e){const t=e.sk=e.sk||{};t.dictionary=Object.assign(t.dictionary||{},{"Align cell text to the bottom":"Zarovnať text bunky nadol","Align cell text to the center":"Zarovnať text bunky na stred","Align cell text to the left":"Zarovnať text bunky doľava","Align cell text to the middle":"Zarovnať text bunky na stred","Align cell text to the right":"Zarovnať text bunky doprava","Align cell text to the top":"Zarovnať text bunky nahor","Align table to the left":"Zarovnať tabuľku doľava","Align table to the right":"Zarovnať tabuľku doprava",Alignment:"Zarovnanie",Background:"Pozadie",Border:"Orámovanie","Cell properties":"Vlastnosti bunky","Center table":"Centrovať tabuľku",Color:"Farba","Color picker":"Vybrať farbu",Column:"Stĺpec",Dashed:"Čiarkovaná","Delete column":"Odstrániť stĺpec","Delete row":"Odstrániť riadok",Dimensions:"Rozmery",Dotted:"Bodkovaná",Double:"Dvojitá","Enter table caption":"",Groove:"Drážkovaná","Header column":"Stĺpec hlavičky","Header row":"Riadok hlavičky",Height:"Výška","Horizontal text alignment toolbar":"Horizontálne zarovnanie textu v panely","Insert column left":"Vložiť stĺpec vľavo","Insert column right":"Vložiť stĺpec vpravo","Insert row above":"Vložiť riadok nad","Insert row below":"Vložiť riadok pod","Insert table":"Vložiť tabuľku",Inset:"Vložená z vnútra","Justify cell text":"Zarovnať text bunky z oboch strán","Merge cell down":"Zlúčiť bunku dole","Merge cell left":"Zlúčiť bunku vľavo","Merge cell right":"Zlúčiť bunku vpravo","Merge cell up":"Zlúčiť bunku hore","Merge cells":"Zlúčiť bunky",None:"Žiadna",Outset:"Vložená zvonku",Padding:"Vnútorný okraj",Ridge:"Rámovaná",Row:"Riadok","Select column":"Vybrať stĺpec","Select row":"Vybrať riadok",Solid:"Plná","Split cell horizontally":"Rozdeliť bunku vodorovne","Split cell vertically":"Rozdeliť bunku zvislo",Style:"Štýl","Table alignment toolbar":"Panel zarovnania tabuľky","Table cell text alignment":"Zarovnanie textu v bunke","Table properties":"Vlastnosti tabuľky","Table toolbar":"Panel nástrojov tabuľky",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':'Farba má nesprávny formát. Skúste "#FF0000", "rgb(255,0,0)" alebo "red".','The value is invalid. Try "10px" or "2em" or simply "2".':'Hodnota je nesprávna. Skúste "10px", "2em" alebo jednoducho "2".',"Toggle caption off":"","Toggle caption on":"","Vertical text alignment toolbar":"Vertikálne zarovnanie textu v panely",Width:"Šírka"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
|
1
|
+
!function(e){const t=e.sk=e.sk||{};t.dictionary=Object.assign(t.dictionary||{},{"Align cell text to the bottom":"Zarovnať text bunky nadol","Align cell text to the center":"Zarovnať text bunky na stred","Align cell text to the left":"Zarovnať text bunky doľava","Align cell text to the middle":"Zarovnať text bunky na stred","Align cell text to the right":"Zarovnať text bunky doprava","Align cell text to the top":"Zarovnať text bunky nahor","Align table to the left":"Zarovnať tabuľku doľava","Align table to the right":"Zarovnať tabuľku doprava",Alignment:"Zarovnanie",Background:"Pozadie",Border:"Orámovanie","Cell properties":"Vlastnosti bunky","Center table":"Centrovať tabuľku",Color:"Farba","Color picker":"Vybrať farbu",Column:"Stĺpec",Dashed:"Čiarkovaná","Delete column":"Odstrániť stĺpec","Delete row":"Odstrániť riadok",Dimensions:"Rozmery",Dotted:"Bodkovaná",Double:"Dvojitá","Enter table caption":"Zadajte popis tabuľky",Groove:"Drážkovaná","Header column":"Stĺpec hlavičky","Header row":"Riadok hlavičky",Height:"Výška","Horizontal text alignment toolbar":"Horizontálne zarovnanie textu v panely","Insert column left":"Vložiť stĺpec vľavo","Insert column right":"Vložiť stĺpec vpravo","Insert row above":"Vložiť riadok nad","Insert row below":"Vložiť riadok pod","Insert table":"Vložiť tabuľku",Inset:"Vložená z vnútra","Justify cell text":"Zarovnať text bunky z oboch strán","Merge cell down":"Zlúčiť bunku dole","Merge cell left":"Zlúčiť bunku vľavo","Merge cell right":"Zlúčiť bunku vpravo","Merge cell up":"Zlúčiť bunku hore","Merge cells":"Zlúčiť bunky",None:"Žiadna",Outset:"Vložená zvonku",Padding:"Vnútorný okraj",Ridge:"Rámovaná",Row:"Riadok","Select column":"Vybrať stĺpec","Select row":"Vybrať riadok",Solid:"Plná","Split cell horizontally":"Rozdeliť bunku vodorovne","Split cell vertically":"Rozdeliť bunku zvislo",Style:"Štýl","Table alignment toolbar":"Panel zarovnania tabuľky","Table cell text alignment":"Zarovnanie textu v bunke","Table properties":"Vlastnosti tabuľky","Table toolbar":"Panel nástrojov tabuľky",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':'Farba má nesprávny formát. Skúste "#FF0000", "rgb(255,0,0)" alebo "red".','The value is invalid. Try "10px" or "2em" or simply "2".':'Hodnota je nesprávna. Skúste "10px", "2em" alebo jednoducho "2".',"Toggle caption off":"Vypnúť titulok","Toggle caption on":"Zapnúť titulok","Vertical text alignment toolbar":"Vertikálne zarovnanie textu v panely",Width:"Šírka"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
|
@@ -250,12 +250,12 @@ msgstr "Colour picker"
|
|
|
250
250
|
|
|
251
251
|
msgctxt "The button label for the table toolbar hiding caption attached to the table."
|
|
252
252
|
msgid "Toggle caption off"
|
|
253
|
-
msgstr ""
|
|
253
|
+
msgstr "Toggle caption off"
|
|
254
254
|
|
|
255
255
|
msgctxt "The button label for the table toolbar showing caption attached to the table."
|
|
256
256
|
msgid "Toggle caption on"
|
|
257
|
-
msgstr ""
|
|
257
|
+
msgstr "Toggle caption on"
|
|
258
258
|
|
|
259
259
|
msgctxt "The placeholder text for the table caption displayed when the caption is empty."
|
|
260
260
|
msgid "Enter table caption"
|
|
261
|
-
msgstr ""
|
|
261
|
+
msgstr "Enter table caption"
|
package/lang/translations/hr.po
CHANGED
|
@@ -250,12 +250,12 @@ msgstr "Birač boje"
|
|
|
250
250
|
|
|
251
251
|
msgctxt "The button label for the table toolbar hiding caption attached to the table."
|
|
252
252
|
msgid "Toggle caption off"
|
|
253
|
-
msgstr ""
|
|
253
|
+
msgstr "Isključite natpis"
|
|
254
254
|
|
|
255
255
|
msgctxt "The button label for the table toolbar showing caption attached to the table."
|
|
256
256
|
msgid "Toggle caption on"
|
|
257
|
-
msgstr ""
|
|
257
|
+
msgstr "Uključite natpis"
|
|
258
258
|
|
|
259
259
|
msgctxt "The placeholder text for the table caption displayed when the caption is empty."
|
|
260
260
|
msgid "Enter table caption"
|
|
261
|
-
msgstr ""
|
|
261
|
+
msgstr "Unesite natpis"
|
package/lang/translations/sk.po
CHANGED
|
@@ -250,12 +250,12 @@ msgstr "Vybrať farbu"
|
|
|
250
250
|
|
|
251
251
|
msgctxt "The button label for the table toolbar hiding caption attached to the table."
|
|
252
252
|
msgid "Toggle caption off"
|
|
253
|
-
msgstr ""
|
|
253
|
+
msgstr "Vypnúť titulok"
|
|
254
254
|
|
|
255
255
|
msgctxt "The button label for the table toolbar showing caption attached to the table."
|
|
256
256
|
msgid "Toggle caption on"
|
|
257
|
-
msgstr ""
|
|
257
|
+
msgstr "Zapnúť titulok"
|
|
258
258
|
|
|
259
259
|
msgctxt "The placeholder text for the table caption displayed when the caption is empty."
|
|
260
260
|
msgid "Enter table caption"
|
|
261
|
-
msgstr ""
|
|
261
|
+
msgstr "Zadajte popis tabuľky"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-table",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "34.0.0",
|
|
4
4
|
"description": "Table feature for CKEditor 5.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ckeditor",
|
|
@@ -12,31 +12,31 @@
|
|
|
12
12
|
],
|
|
13
13
|
"main": "src/index.js",
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"ckeditor5": "^
|
|
15
|
+
"ckeditor5": "^34.0.0",
|
|
16
16
|
"lodash-es": "^4.17.15"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
|
-
"@ckeditor/ckeditor5-alignment": "^
|
|
20
|
-
"@ckeditor/ckeditor5-block-quote": "^
|
|
21
|
-
"@ckeditor/ckeditor5-clipboard": "^
|
|
22
|
-
"@ckeditor/ckeditor5-core": "^
|
|
23
|
-
"@ckeditor/ckeditor5-dev-utils": "^
|
|
24
|
-
"@ckeditor/ckeditor5-editor-classic": "^
|
|
25
|
-
"@ckeditor/ckeditor5-engine": "^
|
|
26
|
-
"@ckeditor/ckeditor5-horizontal-line": "^
|
|
27
|
-
"@ckeditor/ckeditor5-html-support": "^
|
|
28
|
-
"@ckeditor/ckeditor5-image": "^
|
|
29
|
-
"@ckeditor/ckeditor5-indent": "^
|
|
30
|
-
"@ckeditor/ckeditor5-list": "^
|
|
31
|
-
"@ckeditor/ckeditor5-media-embed": "^
|
|
32
|
-
"@ckeditor/ckeditor5-paragraph": "^
|
|
33
|
-
"@ckeditor/ckeditor5-theme-lark": "^
|
|
34
|
-
"@ckeditor/ckeditor5-typing": "^
|
|
35
|
-
"@ckeditor/ckeditor5-ui": "^
|
|
36
|
-
"@ckeditor/ckeditor5-undo": "^
|
|
37
|
-
"@ckeditor/ckeditor5-utils": "^
|
|
38
|
-
"@ckeditor/ckeditor5-widget": "^
|
|
39
|
-
"@ckeditor/ckeditor5-source-editing": "^
|
|
19
|
+
"@ckeditor/ckeditor5-alignment": "^34.0.0",
|
|
20
|
+
"@ckeditor/ckeditor5-block-quote": "^34.0.0",
|
|
21
|
+
"@ckeditor/ckeditor5-clipboard": "^34.0.0",
|
|
22
|
+
"@ckeditor/ckeditor5-core": "^34.0.0",
|
|
23
|
+
"@ckeditor/ckeditor5-dev-utils": "^30.0.0",
|
|
24
|
+
"@ckeditor/ckeditor5-editor-classic": "^34.0.0",
|
|
25
|
+
"@ckeditor/ckeditor5-engine": "^34.0.0",
|
|
26
|
+
"@ckeditor/ckeditor5-horizontal-line": "^34.0.0",
|
|
27
|
+
"@ckeditor/ckeditor5-html-support": "^34.0.0",
|
|
28
|
+
"@ckeditor/ckeditor5-image": "^34.0.0",
|
|
29
|
+
"@ckeditor/ckeditor5-indent": "^34.0.0",
|
|
30
|
+
"@ckeditor/ckeditor5-list": "^34.0.0",
|
|
31
|
+
"@ckeditor/ckeditor5-media-embed": "^34.0.0",
|
|
32
|
+
"@ckeditor/ckeditor5-paragraph": "^34.0.0",
|
|
33
|
+
"@ckeditor/ckeditor5-theme-lark": "^34.0.0",
|
|
34
|
+
"@ckeditor/ckeditor5-typing": "^34.0.0",
|
|
35
|
+
"@ckeditor/ckeditor5-ui": "^34.0.0",
|
|
36
|
+
"@ckeditor/ckeditor5-undo": "^34.0.0",
|
|
37
|
+
"@ckeditor/ckeditor5-utils": "^34.0.0",
|
|
38
|
+
"@ckeditor/ckeditor5-widget": "^34.0.0",
|
|
39
|
+
"@ckeditor/ckeditor5-source-editing": "^34.0.0",
|
|
40
40
|
"json-diff": "^0.5.4",
|
|
41
41
|
"webpack": "^5.58.1",
|
|
42
42
|
"webpack-cli": "^4.9.0"
|
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
import { Command } from 'ckeditor5/src/core';
|
|
11
|
-
import { findOptimalInsertionRange } from 'ckeditor5/src/widget';
|
|
12
11
|
|
|
13
12
|
/**
|
|
14
13
|
* The insert table command.
|
|
@@ -51,12 +50,9 @@ export default class InsertTableCommand extends Command {
|
|
|
51
50
|
*/
|
|
52
51
|
execute( options = {} ) {
|
|
53
52
|
const model = this.editor.model;
|
|
54
|
-
const selection = model.document.selection;
|
|
55
53
|
const tableUtils = this.editor.plugins.get( 'TableUtils' );
|
|
56
54
|
const config = this.editor.config.get( 'table' );
|
|
57
55
|
|
|
58
|
-
const insertionRange = findOptimalInsertionRange( selection, model );
|
|
59
|
-
|
|
60
56
|
const defaultRows = config.defaultHeadings.rows;
|
|
61
57
|
const defaultColumns = config.defaultHeadings.columns;
|
|
62
58
|
|
|
@@ -71,7 +67,7 @@ export default class InsertTableCommand extends Command {
|
|
|
71
67
|
model.change( writer => {
|
|
72
68
|
const table = tableUtils.createTable( writer, options );
|
|
73
69
|
|
|
74
|
-
model.
|
|
70
|
+
model.insertObject( table, null, null, { findOptimalPosition: 'auto' } );
|
|
75
71
|
|
|
76
72
|
writer.setSelection( writer.createPositionAt( table.getNodeByPath( [ 0, 0, 0 ] ), 0 ) );
|
|
77
73
|
} );
|
package/src/index.js
CHANGED
package/src/tableediting.js
CHANGED
|
@@ -65,10 +65,8 @@ export default class TableEditing extends Plugin {
|
|
|
65
65
|
const tableUtils = editor.plugins.get( TableUtils );
|
|
66
66
|
|
|
67
67
|
schema.register( 'table', {
|
|
68
|
-
|
|
69
|
-
allowAttributes: [ 'headingRows', 'headingColumns' ]
|
|
70
|
-
isObject: true,
|
|
71
|
-
isBlock: true
|
|
68
|
+
inheritAllFrom: '$blockObject',
|
|
69
|
+
allowAttributes: [ 'headingRows', 'headingColumns' ]
|
|
72
70
|
} );
|
|
73
71
|
|
|
74
72
|
schema.register( 'tableRow', {
|
|
@@ -77,8 +75,8 @@ export default class TableEditing extends Plugin {
|
|
|
77
75
|
} );
|
|
78
76
|
|
|
79
77
|
schema.register( 'tableCell', {
|
|
78
|
+
allowContentOf: '$container',
|
|
80
79
|
allowIn: 'tableRow',
|
|
81
|
-
allowChildren: '$block',
|
|
82
80
|
allowAttributes: [ 'colspan', 'rowspan' ],
|
|
83
81
|
isLimit: true,
|
|
84
82
|
isSelectable: true
|
package/src/tablekeyboard.js
CHANGED
|
@@ -42,23 +42,20 @@ export default class TableKeyboard extends Plugin {
|
|
|
42
42
|
const view = this.editor.editing.view;
|
|
43
43
|
const viewDocument = view.document;
|
|
44
44
|
|
|
45
|
-
// Handle Tab key navigation.
|
|
46
|
-
this.editor.keystrokes.set( 'Tab', ( ...args ) => this._handleTabOnSelectedTable( ...args ), { priority: 'low' } );
|
|
47
|
-
this.editor.keystrokes.set( 'Tab', this._getTabHandler( true ), { priority: 'low' } );
|
|
48
|
-
this.editor.keystrokes.set( 'Shift+Tab', this._getTabHandler( false ), { priority: 'low' } );
|
|
49
|
-
|
|
50
45
|
this.listenTo( viewDocument, 'arrowKey', ( ...args ) => this._onArrowKey( ...args ), { context: 'table' } );
|
|
46
|
+
this.listenTo( viewDocument, 'tab', ( ...args ) => this._handleTabOnSelectedTable( ...args ), { context: 'figure' } );
|
|
47
|
+
this.listenTo( viewDocument, 'tab', ( ...args ) => this._handleTab( ...args ), { context: [ 'th', 'td' ] } );
|
|
51
48
|
}
|
|
52
49
|
|
|
53
50
|
/**
|
|
54
|
-
* Handles {@link module:engine/view/document~Document#event:
|
|
51
|
+
* Handles {@link module:engine/view/document~Document#event:tab tab} events for the <kbd>Tab</kbd> key executed
|
|
55
52
|
* when the table widget is selected.
|
|
56
53
|
*
|
|
57
54
|
* @private
|
|
58
|
-
* @param {module:engine/view/observer/
|
|
59
|
-
* @param {
|
|
55
|
+
* @param {module:engine/view/observer/bubblingeventinfo~BubblingEventInfo} bubblingEventInfo
|
|
56
|
+
* @param {module:engine/view/observer/domeventdata~DomEventData} domEventData
|
|
60
57
|
*/
|
|
61
|
-
_handleTabOnSelectedTable(
|
|
58
|
+
_handleTabOnSelectedTable( bubblingEventInfo, domEventData ) {
|
|
62
59
|
const editor = this.editor;
|
|
63
60
|
const selection = editor.model.document.selection;
|
|
64
61
|
const selectedElement = selection.getSelectedElement();
|
|
@@ -67,7 +64,9 @@ export default class TableKeyboard extends Plugin {
|
|
|
67
64
|
return;
|
|
68
65
|
}
|
|
69
66
|
|
|
70
|
-
|
|
67
|
+
domEventData.preventDefault();
|
|
68
|
+
domEventData.stopPropagation();
|
|
69
|
+
bubblingEventInfo.stop();
|
|
71
70
|
|
|
72
71
|
editor.model.change( writer => {
|
|
73
72
|
writer.setSelection( writer.createRangeIn( selectedElement.getChild( 0 ).getChild( 0 ) ) );
|
|
@@ -75,87 +74,90 @@ export default class TableKeyboard extends Plugin {
|
|
|
75
74
|
}
|
|
76
75
|
|
|
77
76
|
/**
|
|
78
|
-
*
|
|
77
|
+
* Handles {@link module:engine/view/document~Document#event:tab tab} events for the <kbd>Tab</kbd> key executed
|
|
79
78
|
* inside table cells.
|
|
80
79
|
*
|
|
81
80
|
* @private
|
|
82
|
-
* @param {
|
|
81
|
+
* @param {module:engine/view/observer/bubblingeventinfo~BubblingEventInfo} bubblingEventInfo
|
|
82
|
+
* @param {module:engine/view/observer/domeventdata~DomEventData} domEventData
|
|
83
83
|
*/
|
|
84
|
-
|
|
84
|
+
_handleTab( bubblingEventInfo, domEventData ) {
|
|
85
85
|
const editor = this.editor;
|
|
86
86
|
const tableUtils = this.editor.plugins.get( TableUtils );
|
|
87
87
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
let tableCell = tableUtils.getTableCellsContainingSelection( selection )[ 0 ];
|
|
88
|
+
const selection = editor.model.document.selection;
|
|
89
|
+
const isForward = !domEventData.shiftKey;
|
|
91
90
|
|
|
92
|
-
|
|
93
|
-
tableCell = this.editor.plugins.get( 'TableSelection' ).getFocusCell();
|
|
94
|
-
}
|
|
91
|
+
let tableCell = tableUtils.getTableCellsContainingSelection( selection )[ 0 ];
|
|
95
92
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
93
|
+
if ( !tableCell ) {
|
|
94
|
+
tableCell = this.editor.plugins.get( 'TableSelection' ).getFocusCell();
|
|
95
|
+
}
|
|
99
96
|
|
|
100
|
-
|
|
97
|
+
if ( !tableCell ) {
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
101
100
|
|
|
102
|
-
|
|
103
|
-
|
|
101
|
+
domEventData.preventDefault();
|
|
102
|
+
domEventData.stopPropagation();
|
|
103
|
+
bubblingEventInfo.stop();
|
|
104
104
|
|
|
105
|
-
|
|
106
|
-
|
|
105
|
+
const tableRow = tableCell.parent;
|
|
106
|
+
const table = tableRow.parent;
|
|
107
107
|
|
|
108
|
-
|
|
108
|
+
const currentRowIndex = table.getChildIndex( tableRow );
|
|
109
|
+
const currentCellIndex = tableRow.getChildIndex( tableCell );
|
|
109
110
|
|
|
110
|
-
|
|
111
|
-
// Set the selection over the whole table if the selection was in the first table cell.
|
|
112
|
-
editor.model.change( writer => {
|
|
113
|
-
writer.setSelection( writer.createRangeOn( table ) );
|
|
114
|
-
} );
|
|
111
|
+
const isFirstCellInRow = currentCellIndex === 0;
|
|
115
112
|
|
|
116
|
-
|
|
117
|
-
|
|
113
|
+
if ( !isForward && isFirstCellInRow && currentRowIndex === 0 ) {
|
|
114
|
+
// Set the selection over the whole table if the selection was in the first table cell.
|
|
115
|
+
editor.model.change( writer => {
|
|
116
|
+
writer.setSelection( writer.createRangeOn( table ) );
|
|
117
|
+
} );
|
|
118
118
|
|
|
119
|
-
|
|
120
|
-
|
|
119
|
+
return;
|
|
120
|
+
}
|
|
121
121
|
|
|
122
|
-
|
|
123
|
-
|
|
122
|
+
const isLastCellInRow = currentCellIndex === tableRow.childCount - 1;
|
|
123
|
+
const isLastRow = currentRowIndex === tableUtils.getRows( table ) - 1;
|
|
124
124
|
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
if ( currentRowIndex === tableUtils.getRows( table ) - 1 ) {
|
|
128
|
-
editor.model.change( writer => {
|
|
129
|
-
writer.setSelection( writer.createRangeOn( table ) );
|
|
130
|
-
} );
|
|
125
|
+
if ( isForward && isLastRow && isLastCellInRow ) {
|
|
126
|
+
editor.execute( 'insertTableRowBelow' );
|
|
131
127
|
|
|
132
|
-
|
|
133
|
-
|
|
128
|
+
// Check if the command actually added a row. If `insertTableRowBelow` execution didn't add a row (because it was disabled
|
|
129
|
+
// or it got overwritten) set the selection over the whole table to mirror the first cell case.
|
|
130
|
+
if ( currentRowIndex === tableUtils.getRows( table ) - 1 ) {
|
|
131
|
+
editor.model.change( writer => {
|
|
132
|
+
writer.setSelection( writer.createRangeOn( table ) );
|
|
133
|
+
} );
|
|
134
|
+
|
|
135
|
+
return;
|
|
134
136
|
}
|
|
137
|
+
}
|
|
135
138
|
|
|
136
|
-
|
|
139
|
+
let cellToFocus;
|
|
137
140
|
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
+
// Move to the first cell in the next row.
|
|
142
|
+
if ( isForward && isLastCellInRow ) {
|
|
143
|
+
const nextRow = table.getChild( currentRowIndex + 1 );
|
|
141
144
|
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
145
|
+
cellToFocus = nextRow.getChild( 0 );
|
|
146
|
+
}
|
|
147
|
+
// Move to the last cell in the previous row.
|
|
148
|
+
else if ( !isForward && isFirstCellInRow ) {
|
|
149
|
+
const previousRow = table.getChild( currentRowIndex - 1 );
|
|
147
150
|
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
151
|
+
cellToFocus = previousRow.getChild( previousRow.childCount - 1 );
|
|
152
|
+
}
|
|
153
|
+
// Move to the next/previous cell.
|
|
154
|
+
else {
|
|
155
|
+
cellToFocus = tableRow.getChild( currentCellIndex + ( isForward ? 1 : -1 ) );
|
|
156
|
+
}
|
|
154
157
|
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
};
|
|
158
|
+
editor.model.change( writer => {
|
|
159
|
+
writer.setSelection( writer.createRangeIn( cellToFocus ) );
|
|
160
|
+
} );
|
|
159
161
|
}
|
|
160
162
|
|
|
161
163
|
/**
|