@ckeditor/ckeditor5-table 47.1.0-alpha.2 → 47.2.0-alpha.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.
@@ -1 +1 @@
1
- !function(e){const t=e.da=e.da||{};t.dictionary=Object.assign(t.dictionary||{},{"Align cell text to the bottom":"Justér tekstcelle til bunden","Align cell text to the center":"Justér tekstcelle centreret","Align cell text to the left":"Justér tekstcelle til venstre","Align cell text to the middle":"Justér tekstcelle til midten","Align cell text to the right":"Justér tekstcelle til højre","Align cell text to the top":"Justér tekstcelle til top","Align table to the left":"Justér tabel til venstre","Align table to the right":"Justér tabel til højre",Alignment:"Justering",Background:"Baggrund",Border:"Ramme","Cell properties":"Celleegenskaber","Center table":"Centrér tabel","Choose table type":"Vælg tabeltype",Color:"Farve",Column:"Kolonne","Content table":"Indholdstabel",Dashed:"Stiplet (streg)","Delete column":"Slet kolonne","Delete row":"Slet række",Dimensions:"Dimensioner",Dotted:"Stiplet (prik)",Double:"Dobbel","Enter table caption":"Indtast tabeltekst",Groove:"Not","Header column":"Headerkolonne","Header row":"Headerrække",Height:"Højde","Horizontal text alignment toolbar":"Horisontal tekstjustering værktøjslinje","Insert a new table row (when in the last cell of a table)":"Indsæt en ny tabelrække (når du er i den sidste celle i en tabel)","Insert column left":"Indsæt kolonne venstre","Insert column right":"Indsæt kolonne højre","Insert row above":"Indsæt header over","Insert row below":"Indsæt header under","Insert table":"Indsæt tabel","Insert table layout":"Indsæt tabellayout",Inset:"Forsænket","Justify cell text":"Justér tekstcelle","Keystrokes that can be used in a table cell":"Tastaturtryk, der kan bruges i en tabelcelle","Layout table":"Layouttabel","Merge cell down":"Flet celler ned","Merge cell left":"Flet celler venstre","Merge cell right":"Flet celler højre","Merge cell up":"Flet celler op","Merge cells":"Flet celler","Move the selection to the next cell":"Flyt markeringen til den næste celle","Move the selection to the previous cell":"Flyt markeringen til den forrige celle","Navigate through the table":"Naviger gennem tabellen",None:"Ingen",Outset:"Fra starten",Padding:"Fyld",Ridge:"Kam",Row:"Række","Select column":"Vælg kolonne","Select row":"Vælg række",Solid:"Massiv","Split cell horizontally":"Del celle horisontalt","Split cell vertically":"Del celle vertikalt",Style:"Stil",Table:"Tabel","Table alignment toolbar":"Tabeljustering værktøjslinje","Table cell text alignment":"Tabelcelle tekstjustering","Table layout":"Tabellayout","Table properties":"Tabelegenskaber","Table toolbar":"Tabel værktøjslinje","Table type":"Tabeltype","Table type options":"Indstillinger for tabeltype",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':'Farven er ugyldig. Prøv "#FF0000" eller "rgb(255,0,0)" eller "red".','The value is invalid. Try "10px" or "2em" or simply "2".':'Værdien er ugyldig. Prøv "10px" eller "2em" eller ganske enkelt "2".',"Vertical text alignment toolbar":"Vertikal tekstjustering værktøjslinje",Width:"Bredde"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
1
+ !function(e){const t=e.da=e.da||{};t.dictionary=Object.assign(t.dictionary||{},{"Align cell text to the bottom":"Justér tekstcelle til bunden","Align cell text to the center":"Justér tekstcelle centreret","Align cell text to the left":"Justér tekstcelle til venstre","Align cell text to the middle":"Justér tekstcelle til midten","Align cell text to the right":"Justér tekstcelle til højre","Align cell text to the top":"Justér tekstcelle til top","Align table to the left":"Justér tabel til venstre","Align table to the right":"Justér tabel til højre",Alignment:"Justering",Background:"Baggrund",Border:"Ramme","Cell properties":"Celleegenskaber","Center table":"Centrér tabel","Choose table type":"Vælg tabeltype",Color:"Farve",Column:"Kolonne","Content table":"Indholdstabel",Dashed:"Stiplet (streg)","Delete column":"Slet kolonne","Delete row":"Slet række",Dimensions:"Dimensioner",Dotted:"Stiplet (prik)",Double:"Dobbel","Enter table caption":"Indtast tabeltekst",Groove:"Not","Header column":"Headerkolonne","Header row":"Headerrække",Height:"Højde","Horizontal text alignment toolbar":"Horisontal tekstjustering værktøjslinje","Insert a new table row (when in the last cell of a table)":"Indsæt en ny tabelrække (når du er i den sidste celle i en tabel)","Insert column left":"Indsæt kolonne venstre","Insert column right":"Indsæt kolonne højre","Insert row above":"Indsæt række over","Insert row below":"Indsæt række under","Insert table":"Indsæt tabel","Insert table layout":"Indsæt tabellayout",Inset:"Forsænket","Justify cell text":"Justér tekstcelle","Keystrokes that can be used in a table cell":"Tastaturtryk, der kan bruges i en tabelcelle","Layout table":"Layouttabel","Merge cell down":"Flet celler ned","Merge cell left":"Flet celler venstre","Merge cell right":"Flet celler højre","Merge cell up":"Flet celler op","Merge cells":"Flet celler","Move the selection to the next cell":"Flyt markeringen til den næste celle","Move the selection to the previous cell":"Flyt markeringen til den forrige celle","Navigate through the table":"Naviger gennem tabellen",None:"Ingen",Outset:"Fra starten",Padding:"Fyld",Ridge:"Kam",Row:"Række","Select column":"Vælg kolonne","Select row":"Vælg række",Solid:"Massiv","Split cell horizontally":"Del celle horisontalt","Split cell vertically":"Del celle vertikalt",Style:"Stil",Table:"Tabel","Table alignment toolbar":"Tabeljustering værktøjslinje","Table cell text alignment":"Tabelcelle tekstjustering","Table layout":"Tabellayout","Table properties":"Tabelegenskaber","Table toolbar":"Tabel værktøjslinje","Table type":"Tabeltype","Table type options":"Indstillinger for tabeltype",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':'Farven er ugyldig. Prøv "#FF0000" eller "rgb(255,0,0)" eller "red".','The value is invalid. Try "10px" or "2em" or simply "2".':'Værdien er ugyldig. Prøv "10px" eller "2em" eller ganske enkelt "2".',"Vertical text alignment toolbar":"Vertikal tekstjustering værktøjslinje",Width:"Bredde"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
@@ -1 +1 @@
1
- !function(e){const t=e.ja=e.ja||{};t.dictionary=Object.assign(t.dictionary||{},{"Align cell text to the bottom":"セルのテキストを下に寄せる","Align cell text to the center":"セルのテキストを中央へ揃える","Align cell text to the left":"セルのテキストを左へ寄せる","Align cell text to the middle":"セルのテキストを中央へ揃える","Align cell text to the right":"セルのテキストを右へ寄せる","Align cell text to the top":"セルのテキストを上に寄せる","Align table to the left":"テーブルを左へ寄せる","Align table to the right":"テーブルを右へ寄せる",Alignment:"配置",Background:"背景",Border:"罫線","Cell properties":"セルのプロパティ","Center table":"テーブルを中央へ寄せる","Choose table type":"表の種類を選択",Color:"色",Column:"列","Content table":"コンテンツ表",Dashed:"破線","Delete column":"列を削除","Delete row":"行を削除",Dimensions:"寸法",Dotted:"点線",Double:"2本線","Enter table caption":"テーブルキャプションを入力",Groove:"立体的にくぼんだ線","Header column":"見出し列","Header row":"見出し行",Height:"高さ","Horizontal text alignment toolbar":"水平方向のテキスト配置ツールバー","Insert a new table row (when in the last cell of a table)":"新しいテーブル行を挿入する(テーブルの最終セルにある場合)","Insert column left":"左に列を挿入","Insert column right":"右に列を挿入","Insert row above":"上に行を挿入","Insert row below":"下に行を挿入","Insert table":"表の挿入","Insert table layout":"表のレイアウトを挿入コンテンツ表表の種類表の種類のオプション表示されるテキストリンクのプロパティメディアの埋め込み利用できるリンクがありません画像のサイズ変更代替テキスト全画面モードを終了全画面モードに入る",Inset:"内側全体がくぼんだ線","Justify cell text":"セルのテキストを両端へ揃える","Keystrokes that can be used in a table cell":"テーブルセルで使用できるキーストローク","Layout table":"表のレイアウト","Merge cell down":"下のセルと結合","Merge cell left":"左のセルと結合","Merge cell right":"右のセルと結合","Merge cell up":"上のセルと結合","Merge cells":"セルを結合","Move the selection to the next cell":"選択範囲を次のセルに移動させる","Move the selection to the previous cell":"選択範囲を前のセルに移動させる","Navigate through the table":"テーブル内を移動する",None:"なし",Outset:"内側全体が隆起した線",Padding:"パディング",Ridge:"立体的に隆起した線",Row:"行","Select column":"列を選択","Select row":"行を選択",Solid:"1本線","Split cell horizontally":"縦にセルを分離","Split cell vertically":"横にセルを分離",Style:"スタイル",Table:"テーブル","Table alignment toolbar":"テーブル配置ツールバー","Table cell text alignment":"テーブルセルのテキスト配置","Table layout":"表のレイアウト","Table properties":"テーブルのプロパティ","Table toolbar":"テーブルのツールバー","Table type":"表の種類","Table type options":"表の種類のオプション表示されるテキストリンクのプロパティメディアの埋め込み利用できるリンクがありません画像のサイズ変更代替テキスト全画面モードを終了全画面モードに入る",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':"この色は無効です。「#FF0000」、「rgb(255,0,0」または「赤」をお試しください。",'The value is invalid. Try "10px" or "2em" or simply "2".':"この値は無効です。「10px」、「2em」または単純に「2」をお試しください。","Vertical text alignment toolbar":"垂直方向のテキスト配置ツールバー",Width:"幅"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
1
+ !function(e){const t=e.ja=e.ja||{};t.dictionary=Object.assign(t.dictionary||{},{"Align cell text to the bottom":"セルのテキストを下に寄せる","Align cell text to the center":"セルのテキストを中央へ揃える","Align cell text to the left":"セルのテキストを左へ寄せる","Align cell text to the middle":"セルのテキストを中央へ揃える","Align cell text to the right":"セルのテキストを右へ寄せる","Align cell text to the top":"セルのテキストを上に寄せる","Align table to the left":"テーブルを左へ寄せる","Align table to the right":"テーブルを右へ寄せる",Alignment:"配置",Background:"背景",Border:"罫線","Cell properties":"セルのプロパティ","Center table":"テーブルを中央へ寄せる","Choose table type":"表の種類を選択",Color:"色",Column:"列","Content table":"コンテンツ表",Dashed:"破線","Delete column":"列を削除","Delete row":"行を削除",Dimensions:"寸法",Dotted:"点線",Double:"2本線","Enter table caption":"テーブルキャプションを入力",Groove:"立体的にくぼんだ線","Header column":"見出し列","Header row":"見出し行",Height:"高さ","Horizontal text alignment toolbar":"水平方向のテキスト配置ツールバー","Insert a new table row (when in the last cell of a table)":"新しいテーブル行を挿入する(テーブルの最終セルにある場合)","Insert column left":"左に列を挿入","Insert column right":"右に列を挿入","Insert row above":"上に行を挿入","Insert row below":"下に行を挿入","Insert table":"表の挿入","Insert table layout":"表のレイアウトを挿入",Inset:"内側全体がくぼんだ線","Justify cell text":"セルのテキストを両端へ揃える","Keystrokes that can be used in a table cell":"テーブルセルで使用できるキーストローク","Layout table":"表のレイアウト","Merge cell down":"下のセルと結合","Merge cell left":"左のセルと結合","Merge cell right":"右のセルと結合","Merge cell up":"上のセルと結合","Merge cells":"セルを結合","Move the selection to the next cell":"選択範囲を次のセルに移動させる","Move the selection to the previous cell":"選択範囲を前のセルに移動させる","Navigate through the table":"テーブル内を移動する",None:"なし",Outset:"内側全体が隆起した線",Padding:"パディング",Ridge:"立体的に隆起した線",Row:"行","Select column":"列を選択","Select row":"行を選択",Solid:"1本線","Split cell horizontally":"縦にセルを分離","Split cell vertically":"横にセルを分離",Style:"スタイル",Table:"テーブル","Table alignment toolbar":"テーブル配置ツールバー","Table cell text alignment":"テーブルセルのテキスト配置","Table layout":"表のレイアウト","Table properties":"テーブルのプロパティ","Table toolbar":"テーブルのツールバー","Table type":"表の種類","Table type options":"表の種類のオプション",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':"この色は無効です。「#FF0000」、「rgb(255,0,0」または「赤」をお試しください。",'The value is invalid. Try "10px" or "2em" or simply "2".':"この値は無効です。「10px」、「2em」または単純に「2」をお試しください。","Vertical text alignment toolbar":"垂直方向のテキスト配置ツールバー",Width:"幅"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
package/dist/index.js CHANGED
@@ -364,12 +364,17 @@ import { isObject, debounce, isEqual, throttle } from 'es-toolkit/compat';
364
364
  // Get table element from conversion result.
365
365
  const modelTable = first(conversionResult.modelRange.getItems());
366
366
  // When table wasn't successfully converted then finish conversion.
367
- if (!modelTable) {
367
+ if (!modelTable || !modelTable.is('element', 'table')) {
368
368
  // Revert consumed figure so other features can convert it.
369
369
  conversionApi.consumable.revert(data.viewItem, {
370
370
  name: true,
371
371
  classes: 'table'
372
372
  });
373
+ // If anyway some table content was converted, we have to pass the model range and cursor.
374
+ if (conversionResult.modelRange && !conversionResult.modelRange.isCollapsed) {
375
+ data.modelRange = conversionResult.modelRange;
376
+ data.modelCursor = conversionResult.modelCursor;
377
+ }
373
378
  return;
374
379
  }
375
380
  conversionApi.convertChildren(data.viewItem, conversionApi.writer.createPositionAt(modelTable, 'end'));