@ckeditor/ckeditor5-widget 41.4.0-alpha.0 → 41.4.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.js +7 -3
- package/dist/index.js.map +1 -1
- package/dist/translations/ar.umd.js +11 -0
- package/dist/translations/az.umd.js +11 -0
- package/dist/translations/bg.umd.js +11 -0
- package/dist/translations/bn.umd.js +11 -0
- package/dist/translations/ca.umd.js +11 -0
- package/dist/translations/cs.umd.js +11 -0
- package/dist/translations/da.umd.js +11 -0
- package/dist/translations/de-ch.umd.js +11 -0
- package/dist/translations/de.umd.js +11 -0
- package/dist/translations/el.umd.js +11 -0
- package/dist/translations/en-au.umd.js +11 -0
- package/dist/translations/en.umd.js +11 -0
- package/dist/translations/es.umd.js +11 -0
- package/dist/translations/et.umd.js +11 -0
- package/dist/translations/fa.umd.js +11 -0
- package/dist/translations/fi.umd.js +11 -0
- package/dist/translations/fr.umd.js +11 -0
- package/dist/translations/gl.umd.js +11 -0
- package/dist/translations/he.umd.js +11 -0
- package/dist/translations/hi.umd.js +11 -0
- package/dist/translations/hr.umd.js +11 -0
- package/dist/translations/hu.umd.js +11 -0
- package/dist/translations/id.umd.js +11 -0
- package/dist/translations/it.umd.js +11 -0
- package/dist/translations/ja.umd.js +11 -0
- package/dist/translations/ko.umd.js +11 -0
- package/dist/translations/ku.umd.js +11 -0
- package/dist/translations/lt.umd.js +11 -0
- package/dist/translations/lv.umd.js +11 -0
- package/dist/translations/ms.umd.js +11 -0
- package/dist/translations/nl.umd.js +11 -0
- package/dist/translations/no.umd.js +11 -0
- package/dist/translations/pl.umd.js +11 -0
- package/dist/translations/pt-br.umd.js +11 -0
- package/dist/translations/pt.umd.js +11 -0
- package/dist/translations/ro.umd.js +11 -0
- package/dist/translations/ru.umd.js +11 -0
- package/dist/translations/sk.umd.js +11 -0
- package/dist/translations/sq.umd.js +11 -0
- package/dist/translations/sr-latn.umd.js +11 -0
- package/dist/translations/sr.umd.js +11 -0
- package/dist/translations/sv.umd.js +11 -0
- package/dist/translations/th.umd.js +11 -0
- package/dist/translations/tk.umd.js +11 -0
- package/dist/translations/tr.umd.js +11 -0
- package/dist/translations/uk.umd.js +11 -0
- package/dist/translations/ur.umd.js +11 -0
- package/dist/translations/uz.umd.js +11 -0
- package/dist/translations/vi.umd.js +11 -0
- package/dist/translations/zh-cn.umd.js +11 -0
- package/dist/translations/zh.umd.js +11 -0
- package/dist/types/utils.d.ts +1 -1
- package/package.json +7 -7
- package/src/utils.d.ts +1 -1
- package/src/utils.js +7 -3
@@ -0,0 +1,11 @@
|
|
1
|
+
/**
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
4
|
+
*/
|
5
|
+
|
6
|
+
( e => {
|
7
|
+
const { [ 'sr-latn' ]: { dictionary, getPluralForm } } = {"sr-latn":{"dictionary":{"Widget toolbar":"Видгет трака са алаткама","Insert paragraph before block":"Уметните одломак пре блока","Insert paragraph after block":"Уметните одломак после блока","Press Enter to type after or press Shift + Enter to type before the widget":"Pritisnite Enter da kucate posle ili pritisnite Shift + Enter da kucate pre vidžeta","Keystrokes that can be used when a widget is selected (for example: image, table, etc.)":"","Insert a new paragraph directly after a widget":"","Insert a new paragraph directly before a widget":"","Move the caret to allow typing directly before a widget":"","Move the caret to allow typing directly after a widget":""},getPluralForm(n){return (n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);}}};
|
8
|
+
e[ 'sr-latn' ] ||= { dictionary: {}, getPluralForm: null };
|
9
|
+
e[ 'sr-latn' ].dictionary = Object.assign( e[ 'sr-latn' ].dictionary, dictionary );
|
10
|
+
e[ 'sr-latn' ].getPluralForm = getPluralForm;
|
11
|
+
} )( window.CKEDITOR_TRANSLATIONS ||= {} );
|
@@ -0,0 +1,11 @@
|
|
1
|
+
/**
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
4
|
+
*/
|
5
|
+
|
6
|
+
( e => {
|
7
|
+
const { [ 'sr' ]: { dictionary, getPluralForm } } = {"sr":{"dictionary":{"Widget toolbar":"Widget traka sa alatkama","Insert paragraph before block":"Umetnite odlomak pre bloka","Insert paragraph after block":"Umetnite odlomak posle bloka","Press Enter to type after or press Shift + Enter to type before the widget":"Притисните Ентер да куцате после или притисните Схифт + Ентер да куцате пре виџета","Keystrokes that can be used when a widget is selected (for example: image, table, etc.)":"Tasteri koji se mogu koristiti kada je vidžet izabran (na primer: slika, tabela, itd.)","Insert a new paragraph directly after a widget":"Umetni novi pasus direktno posle vidžeta","Insert a new paragraph directly before a widget":"Umetni novi pasus direktno pre vidžeta","Move the caret to allow typing directly before a widget":"Pomeri kursor kako bi se omogućilo kucanje direktno pre vidžeta","Move the caret to allow typing directly after a widget":"Pomeri kursor kako bi se omogućilo kucanje direktno posle vidžeta"},getPluralForm(n){return (n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);}}};
|
8
|
+
e[ 'sr' ] ||= { dictionary: {}, getPluralForm: null };
|
9
|
+
e[ 'sr' ].dictionary = Object.assign( e[ 'sr' ].dictionary, dictionary );
|
10
|
+
e[ 'sr' ].getPluralForm = getPluralForm;
|
11
|
+
} )( window.CKEDITOR_TRANSLATIONS ||= {} );
|
@@ -0,0 +1,11 @@
|
|
1
|
+
/**
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
4
|
+
*/
|
5
|
+
|
6
|
+
( e => {
|
7
|
+
const { [ 'sv' ]: { dictionary, getPluralForm } } = {"sv":{"dictionary":{"Widget toolbar":"Widgetverktygsfält","Insert paragraph before block":"Infoga stycke före block","Insert paragraph after block":"Infoga stycke efter block","Press Enter to type after or press Shift + Enter to type before the widget":"Tryck på retur för att skriva efter eller på skift + retur för att skriva före widgeten.","Keystrokes that can be used when a widget is selected (for example: image, table, etc.)":"Tangenter som kan användas när en widget är vald (till exempel: bild, tabell m.m.)","Insert a new paragraph directly after a widget":"Påbörja nytt stycke direkt efter en widget","Insert a new paragraph directly before a widget":"Påbörja nytt stycke direkt före en widget","Move the caret to allow typing directly before a widget":"Flytta textmarkören för att kunna skriva direkt före en widget","Move the caret to allow typing directly after a widget":"Flytta textmarkören för att kunna skriva direkt efter en widget"},getPluralForm(n){return (n != 1);}}};
|
8
|
+
e[ 'sv' ] ||= { dictionary: {}, getPluralForm: null };
|
9
|
+
e[ 'sv' ].dictionary = Object.assign( e[ 'sv' ].dictionary, dictionary );
|
10
|
+
e[ 'sv' ].getPluralForm = getPluralForm;
|
11
|
+
} )( window.CKEDITOR_TRANSLATIONS ||= {} );
|
@@ -0,0 +1,11 @@
|
|
1
|
+
/**
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
4
|
+
*/
|
5
|
+
|
6
|
+
( e => {
|
7
|
+
const { [ 'th' ]: { dictionary, getPluralForm } } = {"th":{"dictionary":{"Widget toolbar":"แถมเครื่องมือวิดเจ็ต","Insert paragraph before block":"แทรกย่อหน้าก่อนบล็อก","Insert paragraph after block":"แทรกย่อหน้าหลังบล็อก","Press Enter to type after or press Shift + Enter to type before the widget":"กด Enter เพื่อพิมพ์หลังจาก หรือกด Shift + Enter เพื่อพิมพ์ก่อนหน้าวิดเจ็ต","Keystrokes that can be used when a widget is selected (for example: image, table, etc.)":"แป้นพิมพ์ลัดที่สามารถใช้ได้เมื่อเลือกวิดเจ็ต (ยกตัวอย่าง: รูปภาพ, ตาราง, ฯลฯ)","Insert a new paragraph directly after a widget":"แทรกย่อหน้าใหม่หลังวิดเจ็ตโดยตรง","Insert a new paragraph directly before a widget":"แทรกย่อหน้าใหม่หน้าวิดเจ็ตโดยตรง","Move the caret to allow typing directly before a widget":"ย้ายสัญลักษณ์คาเร็ตเพื่อให้สามารถพิมพ์ได้ไปอยู่หน้าวิดเจ็ตโดยตรง","Move the caret to allow typing directly after a widget":"ย้ายสัญลักษณ์คาเร็ตเพื่อให้สามารถพิมพ์ได้ไปอยู่หลังวิดเจ็ตโดยตรง"},getPluralForm(n){return 0;}}};
|
8
|
+
e[ 'th' ] ||= { dictionary: {}, getPluralForm: null };
|
9
|
+
e[ 'th' ].dictionary = Object.assign( e[ 'th' ].dictionary, dictionary );
|
10
|
+
e[ 'th' ].getPluralForm = getPluralForm;
|
11
|
+
} )( window.CKEDITOR_TRANSLATIONS ||= {} );
|
@@ -0,0 +1,11 @@
|
|
1
|
+
/**
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
4
|
+
*/
|
5
|
+
|
6
|
+
( e => {
|
7
|
+
const { [ 'tk' ]: { dictionary, getPluralForm } } = {"tk":{"dictionary":{"Widget toolbar":"Widget gurallar paneli","Insert paragraph before block":"Blokdan öň abzas goýuň","Insert paragraph after block":"Blokdan soň abzas goýuň","Press Enter to type after or press Shift + Enter to type before the widget":"","Keystrokes that can be used when a widget is selected (for example: image, table, etc.)":"","Insert a new paragraph directly after a widget":"","Insert a new paragraph directly before a widget":"","Move the caret to allow typing directly before a widget":"","Move the caret to allow typing directly after a widget":""},getPluralForm(n){return (n != 1);}}};
|
8
|
+
e[ 'tk' ] ||= { dictionary: {}, getPluralForm: null };
|
9
|
+
e[ 'tk' ].dictionary = Object.assign( e[ 'tk' ].dictionary, dictionary );
|
10
|
+
e[ 'tk' ].getPluralForm = getPluralForm;
|
11
|
+
} )( window.CKEDITOR_TRANSLATIONS ||= {} );
|
@@ -0,0 +1,11 @@
|
|
1
|
+
/**
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
4
|
+
*/
|
5
|
+
|
6
|
+
( e => {
|
7
|
+
const { [ 'tr' ]: { dictionary, getPluralForm } } = {"tr":{"dictionary":{"Widget toolbar":"Bileşen araç çubuğu","Insert paragraph before block":"Bloktan önce paragraf ekle","Insert paragraph after block":"Bloktan sonra paragraf ekle","Press Enter to type after or press Shift + Enter to type before the widget":"Görsel bileşenden sonra yazmak için Enter'a basın ya da görsel bileşenden önce yazmak için Shift + Enter'a basın","Keystrokes that can be used when a widget is selected (for example: image, table, etc.)":"Bir araç takımı seçildiğinde kullanılabilecek tuş vuruşları (örnek: resim, tablo vb.)","Insert a new paragraph directly after a widget":"Araç takımının hemen sonrasına yeni bir paragraf ekle","Insert a new paragraph directly before a widget":"Araç takımının hemen öncesine yeni bir paragraf ekle","Move the caret to allow typing directly before a widget":"Bir araç takımından hemen önce yazmaya izin vermek için ekleme noktasını taşı","Move the caret to allow typing directly after a widget":"Bir araç takımından hemen sonra yazmaya izin vermek için ekleme noktasını taşı"},getPluralForm(n){return (n > 1);}}};
|
8
|
+
e[ 'tr' ] ||= { dictionary: {}, getPluralForm: null };
|
9
|
+
e[ 'tr' ].dictionary = Object.assign( e[ 'tr' ].dictionary, dictionary );
|
10
|
+
e[ 'tr' ].getPluralForm = getPluralForm;
|
11
|
+
} )( window.CKEDITOR_TRANSLATIONS ||= {} );
|
@@ -0,0 +1,11 @@
|
|
1
|
+
/**
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
4
|
+
*/
|
5
|
+
|
6
|
+
( e => {
|
7
|
+
const { [ 'uk' ]: { dictionary, getPluralForm } } = {"uk":{"dictionary":{"Widget toolbar":"Панель інструментів віджетів","Insert paragraph before block":"Додати абзац перед блоком","Insert paragraph after block":"Додати абзац після блока","Press Enter to type after or press Shift + Enter to type before the widget":"Натисніть Enter, щоб друкувати після або натисніть Shift + Enter, щоб друкувати перед віджетом","Keystrokes that can be used when a widget is selected (for example: image, table, etc.)":"Натискання клавіш, які можна використовувати, коли вибрано віджет (наприклад: зображення, таблиця тощо)","Insert a new paragraph directly after a widget":"Вставити новий абзац безпосередньо після віджета","Insert a new paragraph directly before a widget":"Вставити новий абзац безпосередньо перед віджетом","Move the caret to allow typing directly before a widget":"Перемістіть курсор, щоб дозволити введення безпосередньо перед віджетом","Move the caret to allow typing directly after a widget":"Перемістіть курсор, щоб дозволити введення безпосередньо після віджета"},getPluralForm(n){return (n % 1 == 0 && n % 10 == 1 && n % 100 != 11 ? 0 : n % 1 == 0 && n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 12 || n % 100 > 14) ? 1 : n % 1 == 0 && (n % 10 ==0 || (n % 10 >=5 && n % 10 <=9) || (n % 100 >=11 && n % 100 <=14 )) ? 2: 3);}}};
|
8
|
+
e[ 'uk' ] ||= { dictionary: {}, getPluralForm: null };
|
9
|
+
e[ 'uk' ].dictionary = Object.assign( e[ 'uk' ].dictionary, dictionary );
|
10
|
+
e[ 'uk' ].getPluralForm = getPluralForm;
|
11
|
+
} )( window.CKEDITOR_TRANSLATIONS ||= {} );
|
@@ -0,0 +1,11 @@
|
|
1
|
+
/**
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
4
|
+
*/
|
5
|
+
|
6
|
+
( e => {
|
7
|
+
const { [ 'ur' ]: { dictionary, getPluralForm } } = {"ur":{"dictionary":{"Widget toolbar":"آلہ جات برائے وجٹ","Insert paragraph before block":"پیراگراف سے پہلے کوڈ خانہ نصب کریں","Insert paragraph after block":"پیراگراف کے بعد کوڈ خانہ نصب کریں","Press Enter to type after or press Shift + Enter to type before the widget":"","Keystrokes that can be used when a widget is selected (for example: image, table, etc.)":"","Insert a new paragraph directly after a widget":"","Insert a new paragraph directly before a widget":"","Move the caret to allow typing directly before a widget":"","Move the caret to allow typing directly after a widget":""},getPluralForm(n){return (n != 1);}}};
|
8
|
+
e[ 'ur' ] ||= { dictionary: {}, getPluralForm: null };
|
9
|
+
e[ 'ur' ].dictionary = Object.assign( e[ 'ur' ].dictionary, dictionary );
|
10
|
+
e[ 'ur' ].getPluralForm = getPluralForm;
|
11
|
+
} )( window.CKEDITOR_TRANSLATIONS ||= {} );
|
@@ -0,0 +1,11 @@
|
|
1
|
+
/**
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
4
|
+
*/
|
5
|
+
|
6
|
+
( e => {
|
7
|
+
const { [ 'uz' ]: { dictionary, getPluralForm } } = {"uz":{"dictionary":{"Widget toolbar":"Vidjet asboblar paneli","Insert paragraph before block":"Blokdan oldin paragrafni kiritish","Insert paragraph after block":"Вblokdan keyin paragraf qo'yish","Press Enter to type after or press Shift + Enter to type before the widget":"","Keystrokes that can be used when a widget is selected (for example: image, table, etc.)":"","Insert a new paragraph directly after a widget":"","Insert a new paragraph directly before a widget":"","Move the caret to allow typing directly before a widget":"","Move the caret to allow typing directly after a widget":""},getPluralForm(n){return 0;}}};
|
8
|
+
e[ 'uz' ] ||= { dictionary: {}, getPluralForm: null };
|
9
|
+
e[ 'uz' ].dictionary = Object.assign( e[ 'uz' ].dictionary, dictionary );
|
10
|
+
e[ 'uz' ].getPluralForm = getPluralForm;
|
11
|
+
} )( window.CKEDITOR_TRANSLATIONS ||= {} );
|
@@ -0,0 +1,11 @@
|
|
1
|
+
/**
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
4
|
+
*/
|
5
|
+
|
6
|
+
( e => {
|
7
|
+
const { [ 'vi' ]: { dictionary, getPluralForm } } = {"vi":{"dictionary":{"Widget toolbar":"Thanh công cụ tiện ích","Insert paragraph before block":"Chèn đoạn trước khối","Insert paragraph after block":"Chèn đoạn sau khối","Press Enter to type after or press Shift + Enter to type before the widget":"Nhấn Enter để nhập vào sau hoặc nhấn Shift + Enter để nhập vào trước tiện ích","Keystrokes that can be used when a widget is selected (for example: image, table, etc.)":"Tổ hợp phím mà bạn có thể dùng khi một tiện ích được chọn (ví dụ: hình ảnh, bảng, v.v.)","Insert a new paragraph directly after a widget":"Chèn đoạn văn mới ngay sau tiện ích","Insert a new paragraph directly before a widget":"Chèn đoạn văn mới ngay trước tiện ích","Move the caret to allow typing directly before a widget":"Di chuyển dấu sót để cho phép nhập ngay trước một tiện ích","Move the caret to allow typing directly after a widget":"Di chuyển dấu sót để cho phép nhập ngay sau một tiện ích"},getPluralForm(n){return 0;}}};
|
8
|
+
e[ 'vi' ] ||= { dictionary: {}, getPluralForm: null };
|
9
|
+
e[ 'vi' ].dictionary = Object.assign( e[ 'vi' ].dictionary, dictionary );
|
10
|
+
e[ 'vi' ].getPluralForm = getPluralForm;
|
11
|
+
} )( window.CKEDITOR_TRANSLATIONS ||= {} );
|
@@ -0,0 +1,11 @@
|
|
1
|
+
/**
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
4
|
+
*/
|
5
|
+
|
6
|
+
( e => {
|
7
|
+
const { [ 'zh-cn' ]: { dictionary, getPluralForm } } = {"zh-cn":{"dictionary":{"Widget toolbar":"小部件工具栏","Insert paragraph before block":"在前面插入段落","Insert paragraph after block":"在后面插入段落","Press Enter to type after or press Shift + Enter to type before the widget":"按下“Enter”键,在小组件后输入;按下“Shift+Enter”键,在小组件前输入","Keystrokes that can be used when a widget is selected (for example: image, table, etc.)":"当小组件被选中时(例如:图片、表格等)可以使用的按键","Insert a new paragraph directly after a widget":"直接在小组件之后插入新段落","Insert a new paragraph directly before a widget":"直接在小组件之前插入新段落","Move the caret to allow typing directly before a widget":"移动插入符,以允许在小组件之前直接输入文字","Move the caret to allow typing directly after a widget":"移动插入符,以允许在小组件之后直接输入文字"},getPluralForm(n){return 0;}}};
|
8
|
+
e[ 'zh-cn' ] ||= { dictionary: {}, getPluralForm: null };
|
9
|
+
e[ 'zh-cn' ].dictionary = Object.assign( e[ 'zh-cn' ].dictionary, dictionary );
|
10
|
+
e[ 'zh-cn' ].getPluralForm = getPluralForm;
|
11
|
+
} )( window.CKEDITOR_TRANSLATIONS ||= {} );
|
@@ -0,0 +1,11 @@
|
|
1
|
+
/**
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
4
|
+
*/
|
5
|
+
|
6
|
+
( e => {
|
7
|
+
const { [ 'zh' ]: { dictionary, getPluralForm } } = {"zh":{"dictionary":{"Widget toolbar":"小工具","Insert paragraph before block":"在這個區塊前面插入一個段落","Insert paragraph after block":"在這個區塊後面插入一個段落","Press Enter to type after or press Shift + Enter to type before the widget":"按下 Enter 在小工具後輸入,或按下 Shift + Enter 在小工具前輸入","Keystrokes that can be used when a widget is selected (for example: image, table, etc.)":"小工具選取時可使用的按鍵(例如:圖片、表格等)","Insert a new paragraph directly after a widget":"在小工具後直接插入新段落","Insert a new paragraph directly before a widget":"在小工具前直接插入新段落","Move the caret to allow typing directly before a widget":"移動插入符號,以便在小工具前直接輸入","Move the caret to allow typing directly after a widget":"移動插入符號,以便在小工具後直接輸入"},getPluralForm(n){return 0;}}};
|
8
|
+
e[ 'zh' ] ||= { dictionary: {}, getPluralForm: null };
|
9
|
+
e[ 'zh' ].dictionary = Object.assign( e[ 'zh' ].dictionary, dictionary );
|
10
|
+
e[ 'zh' ].getPluralForm = getPluralForm;
|
11
|
+
} )( window.CKEDITOR_TRANSLATIONS ||= {} );
|
package/dist/types/utils.d.ts
CHANGED
@@ -204,7 +204,7 @@ export declare function viewToModelPositionOutsideModelElement(model: Model, vie
|
|
204
204
|
* Starting from a DOM resize host element (an element that receives dimensions as a result of resizing),
|
205
205
|
* this helper returns the width of the found ancestor element.
|
206
206
|
*
|
207
|
-
*
|
207
|
+
* * It searches up to 5 levels of ancestors only.
|
208
208
|
*
|
209
209
|
* @param domResizeHost Resize host DOM element that receives dimensions as a result of resizing.
|
210
210
|
* @returns Width of ancestor element in pixels or 0 if no ancestor with a computed width has been found.
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@ckeditor/ckeditor5-widget",
|
3
|
-
"version": "41.4.0
|
3
|
+
"version": "41.4.0",
|
4
4
|
"description": "Widget API for CKEditor 5.",
|
5
5
|
"keywords": [
|
6
6
|
"ckeditor",
|
@@ -12,12 +12,12 @@
|
|
12
12
|
"type": "module",
|
13
13
|
"main": "src/index.js",
|
14
14
|
"dependencies": {
|
15
|
-
"@ckeditor/ckeditor5-core": "41.4.0
|
16
|
-
"@ckeditor/ckeditor5-engine": "41.4.0
|
17
|
-
"@ckeditor/ckeditor5-enter": "41.4.0
|
18
|
-
"@ckeditor/ckeditor5-ui": "41.4.0
|
19
|
-
"@ckeditor/ckeditor5-utils": "41.4.0
|
20
|
-
"@ckeditor/ckeditor5-typing": "41.4.0
|
15
|
+
"@ckeditor/ckeditor5-core": "41.4.0",
|
16
|
+
"@ckeditor/ckeditor5-engine": "41.4.0",
|
17
|
+
"@ckeditor/ckeditor5-enter": "41.4.0",
|
18
|
+
"@ckeditor/ckeditor5-ui": "41.4.0",
|
19
|
+
"@ckeditor/ckeditor5-utils": "41.4.0",
|
20
|
+
"@ckeditor/ckeditor5-typing": "41.4.0",
|
21
21
|
"lodash-es": "4.17.21"
|
22
22
|
},
|
23
23
|
"author": "CKSource (http://cksource.com/)",
|
package/src/utils.d.ts
CHANGED
@@ -200,7 +200,7 @@ export declare function viewToModelPositionOutsideModelElement(model: Model, vie
|
|
200
200
|
* Starting from a DOM resize host element (an element that receives dimensions as a result of resizing),
|
201
201
|
* this helper returns the width of the found ancestor element.
|
202
202
|
*
|
203
|
-
*
|
203
|
+
* * It searches up to 5 levels of ancestors only.
|
204
204
|
*
|
205
205
|
* @param domResizeHost Resize host DOM element that receives dimensions as a result of resizing.
|
206
206
|
* @returns Width of ancestor element in pixels or 0 if no ancestor with a computed width has been found.
|
package/src/utils.js
CHANGED
@@ -350,18 +350,22 @@ function addSelectionHandle(widgetElement, writer) {
|
|
350
350
|
* Starting from a DOM resize host element (an element that receives dimensions as a result of resizing),
|
351
351
|
* this helper returns the width of the found ancestor element.
|
352
352
|
*
|
353
|
-
*
|
353
|
+
* * It searches up to 5 levels of ancestors only.
|
354
354
|
*
|
355
355
|
* @param domResizeHost Resize host DOM element that receives dimensions as a result of resizing.
|
356
356
|
* @returns Width of ancestor element in pixels or 0 if no ancestor with a computed width has been found.
|
357
357
|
*/
|
358
358
|
export function calculateResizeHostAncestorWidth(domResizeHost) {
|
359
|
+
const getElementComputedWidth = (element) => {
|
360
|
+
const { width, paddingLeft, paddingRight } = element.ownerDocument.defaultView.getComputedStyle(element);
|
361
|
+
return parseFloat(width) - (parseFloat(paddingLeft) || 0) - (parseFloat(paddingRight) || 0);
|
362
|
+
};
|
359
363
|
const domResizeHostParent = domResizeHost.parentElement;
|
360
364
|
if (!domResizeHostParent) {
|
361
365
|
return 0;
|
362
366
|
}
|
363
367
|
// Need to use computed style as it properly excludes parent's paddings from the returned value.
|
364
|
-
let parentWidth =
|
368
|
+
let parentWidth = getElementComputedWidth(domResizeHostParent);
|
365
369
|
// Sometimes parent width cannot be accessed. If that happens we should go up in the elements tree
|
366
370
|
// and try to get width from next ancestor.
|
367
371
|
// https://github.com/ckeditor/ckeditor5/issues/10776
|
@@ -373,7 +377,7 @@ export function calculateResizeHostAncestorWidth(domResizeHost) {
|
|
373
377
|
if (++currentLevel > ancestorLevelLimit) {
|
374
378
|
return 0;
|
375
379
|
}
|
376
|
-
parentWidth =
|
380
|
+
parentWidth = getElementComputedWidth(checkedElement);
|
377
381
|
}
|
378
382
|
return parentWidth;
|
379
383
|
}
|