@ckeditor/ckeditor5-ui 35.1.0 → 35.2.1
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/lang/translations/ar.po +2 -2
- package/lang/translations/bg.po +2 -2
- package/lang/translations/bn.po +2 -2
- package/lang/translations/ca.po +2 -2
- package/lang/translations/cs.po +2 -2
- package/lang/translations/da.po +2 -2
- package/lang/translations/de.po +2 -2
- package/lang/translations/el.po +2 -2
- package/lang/translations/es.po +2 -2
- package/lang/translations/et.po +2 -2
- package/lang/translations/fi.po +2 -2
- package/lang/translations/fr.po +2 -2
- package/lang/translations/he.po +2 -2
- package/lang/translations/hi.po +2 -2
- package/lang/translations/hu.po +2 -2
- package/lang/translations/id.po +2 -2
- package/lang/translations/it.po +2 -2
- package/lang/translations/ja.po +2 -2
- package/lang/translations/ko.po +5 -5
- package/lang/translations/lt.po +2 -2
- package/lang/translations/lv.po +2 -2
- package/lang/translations/ms.po +2 -2
- package/lang/translations/nl.po +2 -2
- package/lang/translations/no.po +2 -2
- package/lang/translations/pl.po +2 -2
- package/lang/translations/pt-br.po +2 -2
- package/lang/translations/pt.po +2 -2
- package/lang/translations/ro.po +2 -2
- package/lang/translations/ru.po +2 -2
- package/lang/translations/sk.po +2 -2
- package/lang/translations/sr-latn.po +3 -3
- package/lang/translations/sr.po +3 -3
- package/lang/translations/sv.po +2 -2
- package/lang/translations/th.po +2 -2
- package/lang/translations/tr.po +2 -2
- package/lang/translations/uk.po +2 -2
- package/lang/translations/vi.po +2 -2
- package/lang/translations/zh-cn.po +2 -2
- package/lang/translations/zh.po +2 -2
- package/package.json +21 -21
- package/src/dropdown/dropdownview.js +14 -8
- package/src/dropdown/utils.js +58 -4
- package/src/toolbar/block/blocktoolbar.js +19 -0
- package/src/toolbar/toolbarview.js +132 -21
package/lang/translations/ar.po
CHANGED
|
@@ -106,8 +106,8 @@ msgstr "أرجواني"
|
|
|
106
106
|
|
|
107
107
|
msgctxt "Accessible label of a toolbar that shows up next to the blocks of content (e.g. headings, paragraphs)."
|
|
108
108
|
msgid "Editor block content toolbar"
|
|
109
|
-
msgstr ""
|
|
109
|
+
msgstr "شريط المحرر لأدوات كتلة المحتوى"
|
|
110
110
|
|
|
111
111
|
msgctxt "Accessible label of a balloon toolbar that shows up right next to the user selection (the caret)."
|
|
112
112
|
msgid "Editor contextual toolbar"
|
|
113
|
-
msgstr ""
|
|
113
|
+
msgstr "شريط المحرر للأدوات السياقية"
|
package/lang/translations/bg.po
CHANGED
|
@@ -106,8 +106,8 @@ msgstr "Лилав"
|
|
|
106
106
|
|
|
107
107
|
msgctxt "Accessible label of a toolbar that shows up next to the blocks of content (e.g. headings, paragraphs)."
|
|
108
108
|
msgid "Editor block content toolbar"
|
|
109
|
-
msgstr ""
|
|
109
|
+
msgstr "Лента с инструменти за блокиране на съдържанието на редактора"
|
|
110
110
|
|
|
111
111
|
msgctxt "Accessible label of a balloon toolbar that shows up right next to the user selection (the caret)."
|
|
112
112
|
msgid "Editor contextual toolbar"
|
|
113
|
-
msgstr ""
|
|
113
|
+
msgstr "Контекстна лента с инструменти на редактора"
|
package/lang/translations/bn.po
CHANGED
|
@@ -106,8 +106,8 @@ msgstr "বেগুনি"
|
|
|
106
106
|
|
|
107
107
|
msgctxt "Accessible label of a toolbar that shows up next to the blocks of content (e.g. headings, paragraphs)."
|
|
108
108
|
msgid "Editor block content toolbar"
|
|
109
|
-
msgstr ""
|
|
109
|
+
msgstr "সম্পাদক ব্লক কন্টেন্ট টুলবার"
|
|
110
110
|
|
|
111
111
|
msgctxt "Accessible label of a balloon toolbar that shows up right next to the user selection (the caret)."
|
|
112
112
|
msgid "Editor contextual toolbar"
|
|
113
|
-
msgstr ""
|
|
113
|
+
msgstr "সম্পাদক প্রাসঙ্গিক টুলবার"
|
package/lang/translations/ca.po
CHANGED
|
@@ -106,8 +106,8 @@ msgstr "Lila"
|
|
|
106
106
|
|
|
107
107
|
msgctxt "Accessible label of a toolbar that shows up next to the blocks of content (e.g. headings, paragraphs)."
|
|
108
108
|
msgid "Editor block content toolbar"
|
|
109
|
-
msgstr ""
|
|
109
|
+
msgstr "Barra d'eines de contingut del bloc de l'editor"
|
|
110
110
|
|
|
111
111
|
msgctxt "Accessible label of a balloon toolbar that shows up right next to the user selection (the caret)."
|
|
112
112
|
msgid "Editor contextual toolbar"
|
|
113
|
-
msgstr ""
|
|
113
|
+
msgstr "Barra d'eines contextual de l'editor"
|
package/lang/translations/cs.po
CHANGED
|
@@ -106,8 +106,8 @@ msgstr "Fialová"
|
|
|
106
106
|
|
|
107
107
|
msgctxt "Accessible label of a toolbar that shows up next to the blocks of content (e.g. headings, paragraphs)."
|
|
108
108
|
msgid "Editor block content toolbar"
|
|
109
|
-
msgstr ""
|
|
109
|
+
msgstr "Panel nástrojů obsahu bloku editoru"
|
|
110
110
|
|
|
111
111
|
msgctxt "Accessible label of a balloon toolbar that shows up right next to the user selection (the caret)."
|
|
112
112
|
msgid "Editor contextual toolbar"
|
|
113
|
-
msgstr ""
|
|
113
|
+
msgstr "Kontextový panel nástrojů editoru"
|
package/lang/translations/da.po
CHANGED
|
@@ -106,8 +106,8 @@ msgstr "Lilla"
|
|
|
106
106
|
|
|
107
107
|
msgctxt "Accessible label of a toolbar that shows up next to the blocks of content (e.g. headings, paragraphs)."
|
|
108
108
|
msgid "Editor block content toolbar"
|
|
109
|
-
msgstr ""
|
|
109
|
+
msgstr "Redigeringskasse indholdsværktøjslinje"
|
|
110
110
|
|
|
111
111
|
msgctxt "Accessible label of a balloon toolbar that shows up right next to the user selection (the caret)."
|
|
112
112
|
msgid "Editor contextual toolbar"
|
|
113
|
-
msgstr ""
|
|
113
|
+
msgstr "Kontekstuel værktøjslinje til redigeringsprogram"
|
package/lang/translations/de.po
CHANGED
|
@@ -106,8 +106,8 @@ msgstr "Violett"
|
|
|
106
106
|
|
|
107
107
|
msgctxt "Accessible label of a toolbar that shows up next to the blocks of content (e.g. headings, paragraphs)."
|
|
108
108
|
msgid "Editor block content toolbar"
|
|
109
|
-
msgstr ""
|
|
109
|
+
msgstr "Editor Blockinhalt-Toolbar"
|
|
110
110
|
|
|
111
111
|
msgctxt "Accessible label of a balloon toolbar that shows up right next to the user selection (the caret)."
|
|
112
112
|
msgid "Editor contextual toolbar"
|
|
113
|
-
msgstr ""
|
|
113
|
+
msgstr "Editor kontextuelle Toolbar"
|
package/lang/translations/el.po
CHANGED
|
@@ -106,8 +106,8 @@ msgstr "Πορφυρό"
|
|
|
106
106
|
|
|
107
107
|
msgctxt "Accessible label of a toolbar that shows up next to the blocks of content (e.g. headings, paragraphs)."
|
|
108
108
|
msgid "Editor block content toolbar"
|
|
109
|
-
msgstr ""
|
|
109
|
+
msgstr "Γραμμή εργαλείων επεξεργασίας περιεχομένου αποκλεισμού"
|
|
110
110
|
|
|
111
111
|
msgctxt "Accessible label of a balloon toolbar that shows up right next to the user selection (the caret)."
|
|
112
112
|
msgid "Editor contextual toolbar"
|
|
113
|
-
msgstr ""
|
|
113
|
+
msgstr "Γραμμή εργαλείων επεξεργασίας συμφραζομένων"
|
package/lang/translations/es.po
CHANGED
|
@@ -106,8 +106,8 @@ msgstr "Morado"
|
|
|
106
106
|
|
|
107
107
|
msgctxt "Accessible label of a toolbar that shows up next to the blocks of content (e.g. headings, paragraphs)."
|
|
108
108
|
msgid "Editor block content toolbar"
|
|
109
|
-
msgstr ""
|
|
109
|
+
msgstr "Barra de herramientas de contenido del bloque del editor"
|
|
110
110
|
|
|
111
111
|
msgctxt "Accessible label of a balloon toolbar that shows up right next to the user selection (the caret)."
|
|
112
112
|
msgid "Editor contextual toolbar"
|
|
113
|
-
msgstr ""
|
|
113
|
+
msgstr "Barra de herramientas contextual del editor"
|
package/lang/translations/et.po
CHANGED
|
@@ -106,8 +106,8 @@ msgstr "Lilla"
|
|
|
106
106
|
|
|
107
107
|
msgctxt "Accessible label of a toolbar that shows up next to the blocks of content (e.g. headings, paragraphs)."
|
|
108
108
|
msgid "Editor block content toolbar"
|
|
109
|
-
msgstr ""
|
|
109
|
+
msgstr "Redigeerija ploki sisu tööriistariba"
|
|
110
110
|
|
|
111
111
|
msgctxt "Accessible label of a balloon toolbar that shows up right next to the user selection (the caret)."
|
|
112
112
|
msgid "Editor contextual toolbar"
|
|
113
|
-
msgstr ""
|
|
113
|
+
msgstr "Redigeerija kontekstuaalne tööriistariba"
|
package/lang/translations/fi.po
CHANGED
|
@@ -106,8 +106,8 @@ msgstr "Purppura"
|
|
|
106
106
|
|
|
107
107
|
msgctxt "Accessible label of a toolbar that shows up next to the blocks of content (e.g. headings, paragraphs)."
|
|
108
108
|
msgid "Editor block content toolbar"
|
|
109
|
-
msgstr ""
|
|
109
|
+
msgstr "Editorin lohkon sisällön työkalupalkki"
|
|
110
110
|
|
|
111
111
|
msgctxt "Accessible label of a balloon toolbar that shows up right next to the user selection (the caret)."
|
|
112
112
|
msgid "Editor contextual toolbar"
|
|
113
|
-
msgstr ""
|
|
113
|
+
msgstr "Editorin kontekstuaalinen työkalupalkki"
|
package/lang/translations/fr.po
CHANGED
|
@@ -106,8 +106,8 @@ msgstr "Violet"
|
|
|
106
106
|
|
|
107
107
|
msgctxt "Accessible label of a toolbar that shows up next to the blocks of content (e.g. headings, paragraphs)."
|
|
108
108
|
msgid "Editor block content toolbar"
|
|
109
|
-
msgstr ""
|
|
109
|
+
msgstr "Barre d'outils du contenu du bloc éditeur"
|
|
110
110
|
|
|
111
111
|
msgctxt "Accessible label of a balloon toolbar that shows up right next to the user selection (the caret)."
|
|
112
112
|
msgid "Editor contextual toolbar"
|
|
113
|
-
msgstr ""
|
|
113
|
+
msgstr "Barre d'outils contextuelle de l'éditeur"
|
package/lang/translations/he.po
CHANGED
|
@@ -106,8 +106,8 @@ msgstr "סגול"
|
|
|
106
106
|
|
|
107
107
|
msgctxt "Accessible label of a toolbar that shows up next to the blocks of content (e.g. headings, paragraphs)."
|
|
108
108
|
msgid "Editor block content toolbar"
|
|
109
|
-
msgstr ""
|
|
109
|
+
msgstr "סרגל כלים של תוכן בלוק של העורך"
|
|
110
110
|
|
|
111
111
|
msgctxt "Accessible label of a balloon toolbar that shows up right next to the user selection (the caret)."
|
|
112
112
|
msgid "Editor contextual toolbar"
|
|
113
|
-
msgstr ""
|
|
113
|
+
msgstr "סרגל כלים הקשרי של העורך"
|
package/lang/translations/hi.po
CHANGED
|
@@ -106,8 +106,8 @@ msgstr "Purple"
|
|
|
106
106
|
|
|
107
107
|
msgctxt "Accessible label of a toolbar that shows up next to the blocks of content (e.g. headings, paragraphs)."
|
|
108
108
|
msgid "Editor block content toolbar"
|
|
109
|
-
msgstr ""
|
|
109
|
+
msgstr "एडीटर ब्लॉक कंटेंट टूलबार"
|
|
110
110
|
|
|
111
111
|
msgctxt "Accessible label of a balloon toolbar that shows up right next to the user selection (the caret)."
|
|
112
112
|
msgid "Editor contextual toolbar"
|
|
113
|
-
msgstr ""
|
|
113
|
+
msgstr "एडीटर कॉन्टेक्स्टूअल टूलबार"
|
package/lang/translations/hu.po
CHANGED
|
@@ -106,8 +106,8 @@ msgstr "Lila"
|
|
|
106
106
|
|
|
107
107
|
msgctxt "Accessible label of a toolbar that shows up next to the blocks of content (e.g. headings, paragraphs)."
|
|
108
108
|
msgid "Editor block content toolbar"
|
|
109
|
-
msgstr ""
|
|
109
|
+
msgstr "Szerkesztő - tartalomblokk eszköztár"
|
|
110
110
|
|
|
111
111
|
msgctxt "Accessible label of a balloon toolbar that shows up right next to the user selection (the caret)."
|
|
112
112
|
msgid "Editor contextual toolbar"
|
|
113
|
-
msgstr ""
|
|
113
|
+
msgstr "Szerkesztő - szövegre vonatkozó eszköztár"
|
package/lang/translations/id.po
CHANGED
|
@@ -106,8 +106,8 @@ msgstr "Ungu"
|
|
|
106
106
|
|
|
107
107
|
msgctxt "Accessible label of a toolbar that shows up next to the blocks of content (e.g. headings, paragraphs)."
|
|
108
108
|
msgid "Editor block content toolbar"
|
|
109
|
-
msgstr ""
|
|
109
|
+
msgstr "Bilah alat konten blok editor"
|
|
110
110
|
|
|
111
111
|
msgctxt "Accessible label of a balloon toolbar that shows up right next to the user selection (the caret)."
|
|
112
112
|
msgid "Editor contextual toolbar"
|
|
113
|
-
msgstr ""
|
|
113
|
+
msgstr "Bilah alat kontekstual editor"
|
package/lang/translations/it.po
CHANGED
|
@@ -106,8 +106,8 @@ msgstr "Porpora"
|
|
|
106
106
|
|
|
107
107
|
msgctxt "Accessible label of a toolbar that shows up next to the blocks of content (e.g. headings, paragraphs)."
|
|
108
108
|
msgid "Editor block content toolbar"
|
|
109
|
-
msgstr ""
|
|
109
|
+
msgstr "Barra degli strumenti contestuale dell'editor del blocco"
|
|
110
110
|
|
|
111
111
|
msgctxt "Accessible label of a balloon toolbar that shows up right next to the user selection (the caret)."
|
|
112
112
|
msgid "Editor contextual toolbar"
|
|
113
|
-
msgstr ""
|
|
113
|
+
msgstr "Barra degli strumenti contestuale dell'editor"
|
package/lang/translations/ja.po
CHANGED
|
@@ -106,8 +106,8 @@ msgstr "紫"
|
|
|
106
106
|
|
|
107
107
|
msgctxt "Accessible label of a toolbar that shows up next to the blocks of content (e.g. headings, paragraphs)."
|
|
108
108
|
msgid "Editor block content toolbar"
|
|
109
|
-
msgstr ""
|
|
109
|
+
msgstr "エディター ブロック コンテンツ ツールバー"
|
|
110
110
|
|
|
111
111
|
msgctxt "Accessible label of a balloon toolbar that shows up right next to the user selection (the caret)."
|
|
112
112
|
msgid "Editor contextual toolbar"
|
|
113
|
-
msgstr ""
|
|
113
|
+
msgstr "エディター コンテクスト ツールバー"
|
package/lang/translations/ko.po
CHANGED
|
@@ -18,7 +18,7 @@ msgstr ""
|
|
|
18
18
|
|
|
19
19
|
msgctxt "Title of the CKEditor5 editor."
|
|
20
20
|
msgid "Rich Text Editor"
|
|
21
|
-
msgstr "
|
|
21
|
+
msgstr "서식 있는 텍스트 편집기"
|
|
22
22
|
|
|
23
23
|
msgctxt "Accessible label of the specific editing area belonging to a container with an ARIA application role."
|
|
24
24
|
msgid "Editor editing area: %0"
|
|
@@ -38,7 +38,7 @@ msgstr "이전"
|
|
|
38
38
|
|
|
39
39
|
msgctxt "Label used by assistive technologies describing a generic editor toolbar."
|
|
40
40
|
msgid "Editor toolbar"
|
|
41
|
-
msgstr "
|
|
41
|
+
msgstr "편집기 툴바"
|
|
42
42
|
|
|
43
43
|
msgctxt "Label used by assistive technologies describing a toolbar displayed inside a dropdown."
|
|
44
44
|
msgid "Dropdown toolbar"
|
|
@@ -78,7 +78,7 @@ msgstr "노랑색"
|
|
|
78
78
|
|
|
79
79
|
msgctxt "Label of a button that applies a light green color in color pickers."
|
|
80
80
|
msgid "Light green"
|
|
81
|
-
msgstr "
|
|
81
|
+
msgstr "연한 초록색"
|
|
82
82
|
|
|
83
83
|
msgctxt "Label of a button that applies a green color in color pickers."
|
|
84
84
|
msgid "Green"
|
|
@@ -106,8 +106,8 @@ msgstr "보라색"
|
|
|
106
106
|
|
|
107
107
|
msgctxt "Accessible label of a toolbar that shows up next to the blocks of content (e.g. headings, paragraphs)."
|
|
108
108
|
msgid "Editor block content toolbar"
|
|
109
|
-
msgstr ""
|
|
109
|
+
msgstr "편집기 영역 내용 툴바"
|
|
110
110
|
|
|
111
111
|
msgctxt "Accessible label of a balloon toolbar that shows up right next to the user selection (the caret)."
|
|
112
112
|
msgid "Editor contextual toolbar"
|
|
113
|
-
msgstr ""
|
|
113
|
+
msgstr "편집기 문맥 툴바"
|
package/lang/translations/lt.po
CHANGED
|
@@ -106,8 +106,8 @@ msgstr "Violetinė"
|
|
|
106
106
|
|
|
107
107
|
msgctxt "Accessible label of a toolbar that shows up next to the blocks of content (e.g. headings, paragraphs)."
|
|
108
108
|
msgid "Editor block content toolbar"
|
|
109
|
-
msgstr ""
|
|
109
|
+
msgstr "Redaktoriaus bloko turinio įrankių juosta"
|
|
110
110
|
|
|
111
111
|
msgctxt "Accessible label of a balloon toolbar that shows up right next to the user selection (the caret)."
|
|
112
112
|
msgid "Editor contextual toolbar"
|
|
113
|
-
msgstr ""
|
|
113
|
+
msgstr "Redaktoriaus kontekstinė įrankių juosta"
|
package/lang/translations/lv.po
CHANGED
|
@@ -106,8 +106,8 @@ msgstr "Violets"
|
|
|
106
106
|
|
|
107
107
|
msgctxt "Accessible label of a toolbar that shows up next to the blocks of content (e.g. headings, paragraphs)."
|
|
108
108
|
msgid "Editor block content toolbar"
|
|
109
|
-
msgstr ""
|
|
109
|
+
msgstr "Rediģēšanas bloka satura rīkjosla"
|
|
110
110
|
|
|
111
111
|
msgctxt "Accessible label of a balloon toolbar that shows up right next to the user selection (the caret)."
|
|
112
112
|
msgid "Editor contextual toolbar"
|
|
113
|
-
msgstr ""
|
|
113
|
+
msgstr "Redaktora konteksta rīkjosla"
|
package/lang/translations/ms.po
CHANGED
|
@@ -106,8 +106,8 @@ msgstr "Ungu"
|
|
|
106
106
|
|
|
107
107
|
msgctxt "Accessible label of a toolbar that shows up next to the blocks of content (e.g. headings, paragraphs)."
|
|
108
108
|
msgid "Editor block content toolbar"
|
|
109
|
-
msgstr ""
|
|
109
|
+
msgstr "Bar alat sekat kandungan editor"
|
|
110
110
|
|
|
111
111
|
msgctxt "Accessible label of a balloon toolbar that shows up right next to the user selection (the caret)."
|
|
112
112
|
msgid "Editor contextual toolbar"
|
|
113
|
-
msgstr ""
|
|
113
|
+
msgstr "Bar alat kontekstual editor"
|
package/lang/translations/nl.po
CHANGED
|
@@ -106,8 +106,8 @@ msgstr "Paars"
|
|
|
106
106
|
|
|
107
107
|
msgctxt "Accessible label of a toolbar that shows up next to the blocks of content (e.g. headings, paragraphs)."
|
|
108
108
|
msgid "Editor block content toolbar"
|
|
109
|
-
msgstr ""
|
|
109
|
+
msgstr "Inhoud werkbalk voor editorblok"
|
|
110
110
|
|
|
111
111
|
msgctxt "Accessible label of a balloon toolbar that shows up right next to the user selection (the caret)."
|
|
112
112
|
msgid "Editor contextual toolbar"
|
|
113
|
-
msgstr ""
|
|
113
|
+
msgstr "Contextuele werkbalk van editor"
|
package/lang/translations/no.po
CHANGED
|
@@ -106,8 +106,8 @@ msgstr "Lilla"
|
|
|
106
106
|
|
|
107
107
|
msgctxt "Accessible label of a toolbar that shows up next to the blocks of content (e.g. headings, paragraphs)."
|
|
108
108
|
msgid "Editor block content toolbar"
|
|
109
|
-
msgstr ""
|
|
109
|
+
msgstr "Verktøylinje for blokkinnhold i redigeringsverktøy"
|
|
110
110
|
|
|
111
111
|
msgctxt "Accessible label of a balloon toolbar that shows up right next to the user selection (the caret)."
|
|
112
112
|
msgid "Editor contextual toolbar"
|
|
113
|
-
msgstr ""
|
|
113
|
+
msgstr "Verktøylinje for kontekst i redigeringsverktøy"
|
package/lang/translations/pl.po
CHANGED
|
@@ -106,8 +106,8 @@ msgstr "Purpurowy"
|
|
|
106
106
|
|
|
107
107
|
msgctxt "Accessible label of a toolbar that shows up next to the blocks of content (e.g. headings, paragraphs)."
|
|
108
108
|
msgid "Editor block content toolbar"
|
|
109
|
-
msgstr ""
|
|
109
|
+
msgstr "Pasek zadań treści blokowej edytora"
|
|
110
110
|
|
|
111
111
|
msgctxt "Accessible label of a balloon toolbar that shows up right next to the user selection (the caret)."
|
|
112
112
|
msgid "Editor contextual toolbar"
|
|
113
|
-
msgstr ""
|
|
113
|
+
msgstr "Kontekstowy pasek zadań edytora"
|
|
@@ -106,8 +106,8 @@ msgstr "Púrpura"
|
|
|
106
106
|
|
|
107
107
|
msgctxt "Accessible label of a toolbar that shows up next to the blocks of content (e.g. headings, paragraphs)."
|
|
108
108
|
msgid "Editor block content toolbar"
|
|
109
|
-
msgstr ""
|
|
109
|
+
msgstr "Barra de ferramentas de bloco do Editor"
|
|
110
110
|
|
|
111
111
|
msgctxt "Accessible label of a balloon toolbar that shows up right next to the user selection (the caret)."
|
|
112
112
|
msgid "Editor contextual toolbar"
|
|
113
|
-
msgstr ""
|
|
113
|
+
msgstr "Barra de ferramentas contextuais do Editor"
|
package/lang/translations/pt.po
CHANGED
|
@@ -106,8 +106,8 @@ msgstr "Roxo"
|
|
|
106
106
|
|
|
107
107
|
msgctxt "Accessible label of a toolbar that shows up next to the blocks of content (e.g. headings, paragraphs)."
|
|
108
108
|
msgid "Editor block content toolbar"
|
|
109
|
-
msgstr ""
|
|
109
|
+
msgstr "Barra de ferramentas de edição do conteúdo de blocos"
|
|
110
110
|
|
|
111
111
|
msgctxt "Accessible label of a balloon toolbar that shows up right next to the user selection (the caret)."
|
|
112
112
|
msgid "Editor contextual toolbar"
|
|
113
|
-
msgstr ""
|
|
113
|
+
msgstr "Barra de ferramentas contextual de edição"
|
package/lang/translations/ro.po
CHANGED
|
@@ -106,8 +106,8 @@ msgstr "Violet"
|
|
|
106
106
|
|
|
107
107
|
msgctxt "Accessible label of a toolbar that shows up next to the blocks of content (e.g. headings, paragraphs)."
|
|
108
108
|
msgid "Editor block content toolbar"
|
|
109
|
-
msgstr ""
|
|
109
|
+
msgstr "Bară de instrumente editor pentru blocuri de conținut"
|
|
110
110
|
|
|
111
111
|
msgctxt "Accessible label of a balloon toolbar that shows up right next to the user selection (the caret)."
|
|
112
112
|
msgid "Editor contextual toolbar"
|
|
113
|
-
msgstr ""
|
|
113
|
+
msgstr "Bară contextuală de instrumente editor"
|
package/lang/translations/ru.po
CHANGED
|
@@ -106,8 +106,8 @@ msgstr "Фиолетовый"
|
|
|
106
106
|
|
|
107
107
|
msgctxt "Accessible label of a toolbar that shows up next to the blocks of content (e.g. headings, paragraphs)."
|
|
108
108
|
msgid "Editor block content toolbar"
|
|
109
|
-
msgstr ""
|
|
109
|
+
msgstr "Панель инструментов редактора"
|
|
110
110
|
|
|
111
111
|
msgctxt "Accessible label of a balloon toolbar that shows up right next to the user selection (the caret)."
|
|
112
112
|
msgid "Editor contextual toolbar"
|
|
113
|
-
msgstr ""
|
|
113
|
+
msgstr "Контекстуальная панель инструментов редактора"
|
package/lang/translations/sk.po
CHANGED
|
@@ -106,8 +106,8 @@ msgstr "Fialová"
|
|
|
106
106
|
|
|
107
107
|
msgctxt "Accessible label of a toolbar that shows up next to the blocks of content (e.g. headings, paragraphs)."
|
|
108
108
|
msgid "Editor block content toolbar"
|
|
109
|
-
msgstr ""
|
|
109
|
+
msgstr "Panel s nástrojmi obsahu bloku editora"
|
|
110
110
|
|
|
111
111
|
msgctxt "Accessible label of a balloon toolbar that shows up right next to the user selection (the caret)."
|
|
112
112
|
msgid "Editor contextual toolbar"
|
|
113
|
-
msgstr ""
|
|
113
|
+
msgstr "Kontextový panel nástrojov editora"
|
|
@@ -22,7 +22,7 @@ msgstr "Prošireni uređivač teksta"
|
|
|
22
22
|
|
|
23
23
|
msgctxt "Accessible label of the specific editing area belonging to a container with an ARIA application role."
|
|
24
24
|
msgid "Editor editing area: %0"
|
|
25
|
-
msgstr ""
|
|
25
|
+
msgstr "Oblast za uređivanje urednika: %0"
|
|
26
26
|
|
|
27
27
|
msgctxt "Label of the block toolbar icon (a block toolbar is displayed next to each paragraph, heading, list item, etc. and contains e.g. block formatting options)"
|
|
28
28
|
msgid "Edit block"
|
|
@@ -106,8 +106,8 @@ msgstr "Ljubičasta"
|
|
|
106
106
|
|
|
107
107
|
msgctxt "Accessible label of a toolbar that shows up next to the blocks of content (e.g. headings, paragraphs)."
|
|
108
108
|
msgid "Editor block content toolbar"
|
|
109
|
-
msgstr ""
|
|
109
|
+
msgstr "Traka sa alatkama za blokiranje sadržaja uređivača"
|
|
110
110
|
|
|
111
111
|
msgctxt "Accessible label of a balloon toolbar that shows up right next to the user selection (the caret)."
|
|
112
112
|
msgid "Editor contextual toolbar"
|
|
113
|
-
msgstr ""
|
|
113
|
+
msgstr "Kontekstualna traka sa alatkama Editor"
|
package/lang/translations/sr.po
CHANGED
|
@@ -22,7 +22,7 @@ msgstr "Проширен уређивач текста"
|
|
|
22
22
|
|
|
23
23
|
msgctxt "Accessible label of the specific editing area belonging to a container with an ARIA application role."
|
|
24
24
|
msgid "Editor editing area: %0"
|
|
25
|
-
msgstr "
|
|
25
|
+
msgstr "Област за уређивање уредника: %0"
|
|
26
26
|
|
|
27
27
|
msgctxt "Label of the block toolbar icon (a block toolbar is displayed next to each paragraph, heading, list item, etc. and contains e.g. block formatting options)"
|
|
28
28
|
msgid "Edit block"
|
|
@@ -106,8 +106,8 @@ msgstr "Љубичаста"
|
|
|
106
106
|
|
|
107
107
|
msgctxt "Accessible label of a toolbar that shows up next to the blocks of content (e.g. headings, paragraphs)."
|
|
108
108
|
msgid "Editor block content toolbar"
|
|
109
|
-
msgstr ""
|
|
109
|
+
msgstr "Трака са алаткама за блокирање садржаја уређивача"
|
|
110
110
|
|
|
111
111
|
msgctxt "Accessible label of a balloon toolbar that shows up right next to the user selection (the caret)."
|
|
112
112
|
msgid "Editor contextual toolbar"
|
|
113
|
-
msgstr ""
|
|
113
|
+
msgstr "Контекстуална трака са алаткама Едитор"
|
package/lang/translations/sv.po
CHANGED
|
@@ -106,8 +106,8 @@ msgstr "Lila"
|
|
|
106
106
|
|
|
107
107
|
msgctxt "Accessible label of a toolbar that shows up next to the blocks of content (e.g. headings, paragraphs)."
|
|
108
108
|
msgid "Editor block content toolbar"
|
|
109
|
-
msgstr ""
|
|
109
|
+
msgstr "Verktygsfält vid block av innehåll"
|
|
110
110
|
|
|
111
111
|
msgctxt "Accessible label of a balloon toolbar that shows up right next to the user selection (the caret)."
|
|
112
112
|
msgid "Editor contextual toolbar"
|
|
113
|
-
msgstr ""
|
|
113
|
+
msgstr "Ordbehandlarens kontextuella verktygsfält"
|
package/lang/translations/th.po
CHANGED
|
@@ -106,8 +106,8 @@ msgstr "สีม่วง"
|
|
|
106
106
|
|
|
107
107
|
msgctxt "Accessible label of a toolbar that shows up next to the blocks of content (e.g. headings, paragraphs)."
|
|
108
108
|
msgid "Editor block content toolbar"
|
|
109
|
-
msgstr ""
|
|
109
|
+
msgstr "แถบเครื่องมือแก้ไขบล็อกเนื้อหา"
|
|
110
110
|
|
|
111
111
|
msgctxt "Accessible label of a balloon toolbar that shows up right next to the user selection (the caret)."
|
|
112
112
|
msgid "Editor contextual toolbar"
|
|
113
|
-
msgstr ""
|
|
113
|
+
msgstr "แถบเครื่องมือแก้ไขข้อความ"
|
package/lang/translations/tr.po
CHANGED
|
@@ -106,8 +106,8 @@ msgstr "Mor"
|
|
|
106
106
|
|
|
107
107
|
msgctxt "Accessible label of a toolbar that shows up next to the blocks of content (e.g. headings, paragraphs)."
|
|
108
108
|
msgid "Editor block content toolbar"
|
|
109
|
-
msgstr ""
|
|
109
|
+
msgstr "Düzenleyici engelleme içerik araç çubuğu"
|
|
110
110
|
|
|
111
111
|
msgctxt "Accessible label of a balloon toolbar that shows up right next to the user selection (the caret)."
|
|
112
112
|
msgid "Editor contextual toolbar"
|
|
113
|
-
msgstr ""
|
|
113
|
+
msgstr "Düzenleyici içeriksel araç çubuğu"
|
package/lang/translations/uk.po
CHANGED
|
@@ -106,8 +106,8 @@ msgstr "Фіолетовий"
|
|
|
106
106
|
|
|
107
107
|
msgctxt "Accessible label of a toolbar that shows up next to the blocks of content (e.g. headings, paragraphs)."
|
|
108
108
|
msgid "Editor block content toolbar"
|
|
109
|
-
msgstr ""
|
|
109
|
+
msgstr "Панель інструментів вмісту блоку редактора"
|
|
110
110
|
|
|
111
111
|
msgctxt "Accessible label of a balloon toolbar that shows up right next to the user selection (the caret)."
|
|
112
112
|
msgid "Editor contextual toolbar"
|
|
113
|
-
msgstr ""
|
|
113
|
+
msgstr "Контекстна панель інструментів редактора"
|
package/lang/translations/vi.po
CHANGED
|
@@ -106,8 +106,8 @@ msgstr "Tím"
|
|
|
106
106
|
|
|
107
107
|
msgctxt "Accessible label of a toolbar that shows up next to the blocks of content (e.g. headings, paragraphs)."
|
|
108
108
|
msgid "Editor block content toolbar"
|
|
109
|
-
msgstr ""
|
|
109
|
+
msgstr "Thanh công cụ chỉnh sửa khối nội dung"
|
|
110
110
|
|
|
111
111
|
msgctxt "Accessible label of a balloon toolbar that shows up right next to the user selection (the caret)."
|
|
112
112
|
msgid "Editor contextual toolbar"
|
|
113
|
-
msgstr ""
|
|
113
|
+
msgstr "Thanh công cụ chỉnh sửa theo ngữ cảnh"
|
|
@@ -106,8 +106,8 @@ msgstr "紫色"
|
|
|
106
106
|
|
|
107
107
|
msgctxt "Accessible label of a toolbar that shows up next to the blocks of content (e.g. headings, paragraphs)."
|
|
108
108
|
msgid "Editor block content toolbar"
|
|
109
|
-
msgstr ""
|
|
109
|
+
msgstr "编辑器块内容工具栏"
|
|
110
110
|
|
|
111
111
|
msgctxt "Accessible label of a balloon toolbar that shows up right next to the user selection (the caret)."
|
|
112
112
|
msgid "Editor contextual toolbar"
|
|
113
|
-
msgstr ""
|
|
113
|
+
msgstr "编辑器上下文工具栏"
|
package/lang/translations/zh.po
CHANGED
|
@@ -106,8 +106,8 @@ msgstr "紫色"
|
|
|
106
106
|
|
|
107
107
|
msgctxt "Accessible label of a toolbar that shows up next to the blocks of content (e.g. headings, paragraphs)."
|
|
108
108
|
msgid "Editor block content toolbar"
|
|
109
|
-
msgstr ""
|
|
109
|
+
msgstr "編輯器區塊內容工具列"
|
|
110
110
|
|
|
111
111
|
msgctxt "Accessible label of a balloon toolbar that shows up right next to the user selection (the caret)."
|
|
112
112
|
msgid "Editor contextual toolbar"
|
|
113
|
-
msgstr ""
|
|
113
|
+
msgstr "編輯器關聯式工具列"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-ui",
|
|
3
|
-
"version": "35.1
|
|
3
|
+
"version": "35.2.1",
|
|
4
4
|
"description": "The UI framework and standard UI library of CKEditor 5.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ckeditor",
|
|
@@ -11,29 +11,29 @@
|
|
|
11
11
|
],
|
|
12
12
|
"main": "src/index.js",
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@ckeditor/ckeditor5-utils": "^35.1
|
|
15
|
-
"@ckeditor/ckeditor5-core": "^35.1
|
|
14
|
+
"@ckeditor/ckeditor5-utils": "^35.2.1",
|
|
15
|
+
"@ckeditor/ckeditor5-core": "^35.2.1",
|
|
16
16
|
"lodash-es": "^4.17.15"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
|
-
"@ckeditor/ckeditor5-basic-styles": "^35.1
|
|
20
|
-
"@ckeditor/ckeditor5-block-quote": "^35.1
|
|
21
|
-
"@ckeditor/ckeditor5-editor-balloon": "^35.1
|
|
22
|
-
"@ckeditor/ckeditor5-editor-classic": "^35.1
|
|
23
|
-
"@ckeditor/ckeditor5-engine": "^35.1
|
|
24
|
-
"@ckeditor/ckeditor5-enter": "^35.1
|
|
25
|
-
"@ckeditor/ckeditor5-essentials": "^35.1
|
|
26
|
-
"@ckeditor/ckeditor5-font": "^35.1
|
|
27
|
-
"@ckeditor/ckeditor5-find-and-replace": "^35.1
|
|
28
|
-
"@ckeditor/ckeditor5-heading": "^35.1
|
|
29
|
-
"@ckeditor/ckeditor5-image": "^35.1
|
|
30
|
-
"@ckeditor/ckeditor5-link": "^35.1
|
|
31
|
-
"@ckeditor/ckeditor5-list": "^35.1
|
|
32
|
-
"@ckeditor/ckeditor5-mention": "^35.1
|
|
33
|
-
"@ckeditor/ckeditor5-paragraph": "^35.1
|
|
34
|
-
"@ckeditor/ckeditor5-horizontal-line": "^35.1
|
|
35
|
-
"@ckeditor/ckeditor5-table": "^35.1
|
|
36
|
-
"@ckeditor/ckeditor5-typing": "^35.1
|
|
19
|
+
"@ckeditor/ckeditor5-basic-styles": "^35.2.1",
|
|
20
|
+
"@ckeditor/ckeditor5-block-quote": "^35.2.1",
|
|
21
|
+
"@ckeditor/ckeditor5-editor-balloon": "^35.2.1",
|
|
22
|
+
"@ckeditor/ckeditor5-editor-classic": "^35.2.1",
|
|
23
|
+
"@ckeditor/ckeditor5-engine": "^35.2.1",
|
|
24
|
+
"@ckeditor/ckeditor5-enter": "^35.2.1",
|
|
25
|
+
"@ckeditor/ckeditor5-essentials": "^35.2.1",
|
|
26
|
+
"@ckeditor/ckeditor5-font": "^35.2.1",
|
|
27
|
+
"@ckeditor/ckeditor5-find-and-replace": "^35.2.1",
|
|
28
|
+
"@ckeditor/ckeditor5-heading": "^35.2.1",
|
|
29
|
+
"@ckeditor/ckeditor5-image": "^35.2.1",
|
|
30
|
+
"@ckeditor/ckeditor5-link": "^35.2.1",
|
|
31
|
+
"@ckeditor/ckeditor5-list": "^35.2.1",
|
|
32
|
+
"@ckeditor/ckeditor5-mention": "^35.2.1",
|
|
33
|
+
"@ckeditor/ckeditor5-paragraph": "^35.2.1",
|
|
34
|
+
"@ckeditor/ckeditor5-horizontal-line": "^35.2.1",
|
|
35
|
+
"@ckeditor/ckeditor5-table": "^35.2.1",
|
|
36
|
+
"@ckeditor/ckeditor5-typing": "^35.2.1"
|
|
37
37
|
},
|
|
38
38
|
"engines": {
|
|
39
39
|
"node": ">=14.0.0",
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
import View from '../view';
|
|
11
11
|
import KeystrokeHandler from '@ckeditor/ckeditor5-utils/src/keystrokehandler';
|
|
12
|
+
import { FocusTracker } from '@ckeditor/ckeditor5-utils';
|
|
12
13
|
|
|
13
14
|
import '../../theme/components/dropdown/dropdown.css';
|
|
14
15
|
|
|
@@ -170,6 +171,14 @@ export default class DropdownView extends View {
|
|
|
170
171
|
*/
|
|
171
172
|
this.keystrokes = new KeystrokeHandler();
|
|
172
173
|
|
|
174
|
+
/**
|
|
175
|
+
* Tracks information about the DOM focus in the dropdown.
|
|
176
|
+
*
|
|
177
|
+
* @readonly
|
|
178
|
+
* @member {module:utils/focustracker~FocusTracker}
|
|
179
|
+
*/
|
|
180
|
+
this.focusTracker = new FocusTracker();
|
|
181
|
+
|
|
173
182
|
this.setTemplate( {
|
|
174
183
|
tag: 'div',
|
|
175
184
|
|
|
@@ -241,6 +250,9 @@ export default class DropdownView extends View {
|
|
|
241
250
|
render() {
|
|
242
251
|
super.render();
|
|
243
252
|
|
|
253
|
+
this.focusTracker.add( this.buttonView.element );
|
|
254
|
+
this.focusTracker.add( this.panelView.element );
|
|
255
|
+
|
|
244
256
|
// Toggle the dropdown when its button has been clicked.
|
|
245
257
|
this.listenTo( this.buttonView, 'open', () => {
|
|
246
258
|
this.isOpen = !this.isOpen;
|
|
@@ -251,11 +263,8 @@ export default class DropdownView extends View {
|
|
|
251
263
|
|
|
252
264
|
// Let the dropdown control the position of the panel. The position must
|
|
253
265
|
// be updated every time the dropdown is open.
|
|
254
|
-
this.on( 'change:isOpen', () => {
|
|
255
|
-
if ( !
|
|
256
|
-
// If the dropdown was closed, move the focus back to the button (#12125).
|
|
257
|
-
this.focus();
|
|
258
|
-
|
|
266
|
+
this.on( 'change:isOpen', ( evt, name, isOpen ) => {
|
|
267
|
+
if ( !isOpen ) {
|
|
259
268
|
return;
|
|
260
269
|
}
|
|
261
270
|
|
|
@@ -271,9 +280,6 @@ export default class DropdownView extends View {
|
|
|
271
280
|
} else {
|
|
272
281
|
this.panelView.position = this.panelPosition;
|
|
273
282
|
}
|
|
274
|
-
|
|
275
|
-
// Focus the first item in the dropdown when the dropdown opened
|
|
276
|
-
this.panelView.focus();
|
|
277
283
|
} );
|
|
278
284
|
|
|
279
285
|
// Listen for keystrokes coming from within #element.
|
package/src/dropdown/utils.js
CHANGED
|
@@ -19,7 +19,7 @@ import SwitchButtonView from '../button/switchbuttonview';
|
|
|
19
19
|
|
|
20
20
|
import clickOutsideHandler from '../bindings/clickoutsidehandler';
|
|
21
21
|
|
|
22
|
-
import { logWarning } from '@ckeditor/ckeditor5-utils
|
|
22
|
+
import { global, priorities, logWarning } from '@ckeditor/ckeditor5-utils';
|
|
23
23
|
|
|
24
24
|
import '../../theme/components/dropdown/toolbardropdown.css';
|
|
25
25
|
import '../../theme/components/dropdown/listdropdown.css';
|
|
@@ -288,22 +288,28 @@ export function focusChildOnDropdownOpen( dropdownView, childSelectorCallback )
|
|
|
288
288
|
*/
|
|
289
289
|
logWarning( 'ui-dropdown-focus-child-on-open-child-missing-focus', { view: childToFocus } );
|
|
290
290
|
}
|
|
291
|
-
|
|
291
|
+
|
|
292
|
+
// * Let the panel show up first (do not focus an invisible element).
|
|
293
|
+
// * Execute after focusDropdownPanelOnOpen(). See focusDropdownPanelOnOpen() to learn more.
|
|
294
|
+
}, { priority: priorities.low - 10 } );
|
|
292
295
|
}
|
|
293
296
|
|
|
294
297
|
// Add a set of default behaviors to dropdown view.
|
|
295
298
|
//
|
|
296
299
|
// @param {module:ui/dropdown/dropdownview~DropdownView} dropdownView
|
|
297
300
|
function addDefaultBehavior( dropdownView ) {
|
|
298
|
-
|
|
301
|
+
closeDropdownOnClickOutside( dropdownView );
|
|
299
302
|
closeDropdownOnExecute( dropdownView );
|
|
303
|
+
closeDropdownOnBlur( dropdownView );
|
|
300
304
|
focusDropdownContentsOnArrows( dropdownView );
|
|
305
|
+
focusDropdownButtonOnClose( dropdownView );
|
|
306
|
+
focusDropdownPanelOnOpen( dropdownView );
|
|
301
307
|
}
|
|
302
308
|
|
|
303
309
|
// Adds a behavior to a dropdownView that closes opened dropdown when user clicks outside the dropdown.
|
|
304
310
|
//
|
|
305
311
|
// @param {module:ui/dropdown/dropdownview~DropdownView} dropdownView
|
|
306
|
-
function
|
|
312
|
+
function closeDropdownOnClickOutside( dropdownView ) {
|
|
307
313
|
dropdownView.on( 'render', () => {
|
|
308
314
|
clickOutsideHandler( {
|
|
309
315
|
emitter: dropdownView,
|
|
@@ -331,6 +337,17 @@ function closeDropdownOnExecute( dropdownView ) {
|
|
|
331
337
|
} );
|
|
332
338
|
}
|
|
333
339
|
|
|
340
|
+
// Adds a behavior to a dropdown view that closes opened dropdown when it loses focus.
|
|
341
|
+
//
|
|
342
|
+
// @param {module:ui/dropdown/dropdownview~DropdownView} dropdownView
|
|
343
|
+
function closeDropdownOnBlur( dropdownView ) {
|
|
344
|
+
dropdownView.focusTracker.on( 'change:isFocused', ( evt, name, isFocused ) => {
|
|
345
|
+
if ( dropdownView.isOpen && !isFocused ) {
|
|
346
|
+
dropdownView.isOpen = false;
|
|
347
|
+
}
|
|
348
|
+
} );
|
|
349
|
+
}
|
|
350
|
+
|
|
334
351
|
// Adds a behavior to a dropdownView that focuses the dropdown's panel view contents on keystrokes.
|
|
335
352
|
//
|
|
336
353
|
// @param {module:ui/dropdown/dropdownview~DropdownView} dropdownView
|
|
@@ -352,6 +369,43 @@ function focusDropdownContentsOnArrows( dropdownView ) {
|
|
|
352
369
|
} );
|
|
353
370
|
}
|
|
354
371
|
|
|
372
|
+
// Adds a behavior that focuses the #buttonView when the dropdown was closed but focus was within the #panelView element.
|
|
373
|
+
// This makes sure the focus is never lost.
|
|
374
|
+
//
|
|
375
|
+
// @param {module:ui/dropdown/dropdownview~DropdownView} dropdownView
|
|
376
|
+
function focusDropdownButtonOnClose( dropdownView ) {
|
|
377
|
+
dropdownView.on( 'change:isOpen', ( evt, name, isOpen ) => {
|
|
378
|
+
if ( isOpen ) {
|
|
379
|
+
return;
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
// If the dropdown was closed, move the focus back to the button (#12125).
|
|
383
|
+
// Don't touch the focus, if it moved somewhere else (e.g. moved to the editing root on #execute) (#12178).
|
|
384
|
+
// Note: Don't use the state of the DropdownView#focusTracker here. It fires #blur with the timeout.
|
|
385
|
+
if ( dropdownView.panelView.element.contains( global.document.activeElement ) ) {
|
|
386
|
+
dropdownView.buttonView.focus();
|
|
387
|
+
}
|
|
388
|
+
} );
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
// Adds a behavior that focuses the #panelView when dropdown gets open (accessibility).
|
|
392
|
+
//
|
|
393
|
+
// @param {module:ui/dropdown/dropdownview~DropdownView} dropdownView
|
|
394
|
+
function focusDropdownPanelOnOpen( dropdownView ) {
|
|
395
|
+
dropdownView.on( 'change:isOpen', ( evt, name, isOpen ) => {
|
|
396
|
+
if ( !isOpen ) {
|
|
397
|
+
return;
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
// Focus the first item in the dropdown when the dropdown opened.
|
|
401
|
+
dropdownView.panelView.focus();
|
|
402
|
+
|
|
403
|
+
// * Let the panel show up first (do not focus an invisible element).
|
|
404
|
+
// * Also, execute before focusChildOnDropdownOpen() to make sure this helper does not break the
|
|
405
|
+
// focus of a specific child by kicking in too late and resetting the focus in the panel.
|
|
406
|
+
}, { priority: 'low' } );
|
|
407
|
+
}
|
|
408
|
+
|
|
355
409
|
/**
|
|
356
410
|
* A definition of the list item used by the {@link module:ui/dropdown/utils~addListToDropdown}
|
|
357
411
|
* utility.
|
|
@@ -25,6 +25,7 @@ import normalizeToolbarConfig from '../normalizetoolbarconfig';
|
|
|
25
25
|
import ResizeObserver from '@ckeditor/ckeditor5-utils/src/dom/resizeobserver';
|
|
26
26
|
|
|
27
27
|
import toUnit from '@ckeditor/ckeditor5-utils/src/dom/tounit';
|
|
28
|
+
import env from '@ckeditor/ckeditor5-utils/src/env';
|
|
28
29
|
|
|
29
30
|
const toPx = toUnit( 'px' );
|
|
30
31
|
|
|
@@ -280,6 +281,7 @@ export default class BlockToolbar extends Plugin {
|
|
|
280
281
|
const editor = this.editor;
|
|
281
282
|
const t = editor.t;
|
|
282
283
|
const buttonView = new BlockButtonView( editor.locale );
|
|
284
|
+
const bind = buttonView.bindTemplate;
|
|
283
285
|
|
|
284
286
|
buttonView.set( {
|
|
285
287
|
label: t( 'Edit block' ),
|
|
@@ -287,6 +289,23 @@ export default class BlockToolbar extends Plugin {
|
|
|
287
289
|
withText: false
|
|
288
290
|
} );
|
|
289
291
|
|
|
292
|
+
// Note that this piece over here overrides the default mousedown logic in ButtonView
|
|
293
|
+
// to make it work with BlockToolbar. See the implementation of the ButtonView class to learn more.
|
|
294
|
+
buttonView.extendTemplate( {
|
|
295
|
+
on: {
|
|
296
|
+
mousedown: bind.to( evt => {
|
|
297
|
+
// On Safari we have to force the focus on a button on click as it's the only browser
|
|
298
|
+
// that doesn't do that automatically. See #12115.
|
|
299
|
+
if ( env.isSafari && this.panelView.isVisible ) {
|
|
300
|
+
this.toolbarView.focus();
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
// Workaround to #12184, see https://github.com/ckeditor/ckeditor5/issues/12184#issuecomment-1199147964.
|
|
304
|
+
evt.preventDefault();
|
|
305
|
+
} )
|
|
306
|
+
}
|
|
307
|
+
} );
|
|
308
|
+
|
|
290
309
|
// Bind the panelView observable properties to the buttonView.
|
|
291
310
|
buttonView.bind( 'isOn' ).to( this.panelView, 'isVisible' );
|
|
292
311
|
buttonView.bind( 'tooltip' ).to( this.panelView, 'isVisible', isVisible => !isVisible );
|
|
@@ -21,10 +21,24 @@ import global from '@ckeditor/ckeditor5-utils/src/dom/global';
|
|
|
21
21
|
import { createDropdown, addToolbarToDropdown } from '../dropdown/utils';
|
|
22
22
|
import { logWarning } from '@ckeditor/ckeditor5-utils/src/ckeditorerror';
|
|
23
23
|
import normalizeToolbarConfig from './normalizetoolbarconfig';
|
|
24
|
+
import { isObject } from 'lodash-es';
|
|
25
|
+
|
|
24
26
|
import threeVerticalDots from '@ckeditor/ckeditor5-core/theme/icons/three-vertical-dots.svg';
|
|
25
27
|
|
|
26
28
|
import '../../theme/components/toolbar/toolbar.css';
|
|
27
29
|
|
|
30
|
+
import { icons } from '@ckeditor/ckeditor5-core';
|
|
31
|
+
|
|
32
|
+
const NESTED_TOOLBAR_ICONS = {
|
|
33
|
+
alignLeft: icons.alignLeft,
|
|
34
|
+
bold: icons.bold,
|
|
35
|
+
importExport: icons.importExport,
|
|
36
|
+
paragraph: icons.paragraph,
|
|
37
|
+
plus: icons.plus,
|
|
38
|
+
text: icons.text,
|
|
39
|
+
threeVerticalDots: icons.threeVerticalDots
|
|
40
|
+
};
|
|
41
|
+
|
|
28
42
|
/**
|
|
29
43
|
* The toolbar view class.
|
|
30
44
|
*
|
|
@@ -286,18 +300,48 @@ export default class ToolbarView extends View {
|
|
|
286
300
|
*
|
|
287
301
|
* @param {Array.<String>|Object} itemsOrConfig The toolbar items or the entire toolbar configuration object.
|
|
288
302
|
* @param {module:ui/componentfactory~ComponentFactory} factory A factory producing toolbar items.
|
|
303
|
+
* @param {Array.<String>} [removeItems] An array of items names to be removed from the configuration. When present, applies
|
|
304
|
+
* to this toolbar and all nested ones as well.
|
|
289
305
|
*/
|
|
290
|
-
fillFromConfig( itemsOrConfig, factory ) {
|
|
306
|
+
fillFromConfig( itemsOrConfig, factory, removeItems ) {
|
|
291
307
|
const config = normalizeToolbarConfig( itemsOrConfig );
|
|
308
|
+
const normalizedRemoveItems = removeItems || config.removeItems;
|
|
309
|
+
const itemsToAdd = this._cleanItemsConfiguration( config.items, factory, normalizedRemoveItems )
|
|
310
|
+
.map( name => {
|
|
311
|
+
if ( isObject( name ) ) {
|
|
312
|
+
return this._createNestedToolbarDropdown( name, factory, normalizedRemoveItems );
|
|
313
|
+
} else if ( name === '|' ) {
|
|
314
|
+
return new ToolbarSeparatorView();
|
|
315
|
+
} else if ( name === '-' ) {
|
|
316
|
+
return new ToolbarLineBreakView();
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
return factory.create( name );
|
|
320
|
+
} )
|
|
321
|
+
.filter( item => item );
|
|
322
|
+
|
|
323
|
+
this.items.addMany( itemsToAdd );
|
|
324
|
+
}
|
|
292
325
|
|
|
293
|
-
|
|
326
|
+
/**
|
|
327
|
+
* Cleans up the {@link module:ui/toolbar/toolbarview~ToolbarView#items} of the toolbar by removing unwanted items and
|
|
328
|
+
* duplicated (obsolete) separators or line breaks.
|
|
329
|
+
*
|
|
330
|
+
* @private
|
|
331
|
+
* @param {Array.<String>} items The toolbar items configuration.
|
|
332
|
+
* @param {module:ui/componentfactory~ComponentFactory} factory A factory producing toolbar items.
|
|
333
|
+
* @param {Array.<String>} removeItems An array of items names to be removed from the configuration.
|
|
334
|
+
* @returns {Array.<String>} Items after the clean-up.
|
|
335
|
+
*/
|
|
336
|
+
_cleanItemsConfiguration( items, factory, removeItems ) {
|
|
337
|
+
const filteredItems = items
|
|
294
338
|
.filter( ( name, idx, items ) => {
|
|
295
339
|
if ( name === '|' ) {
|
|
296
340
|
return true;
|
|
297
341
|
}
|
|
298
342
|
|
|
299
343
|
// Items listed in `config.removeItems` should not be added to the toolbar.
|
|
300
|
-
if (
|
|
344
|
+
if ( removeItems.indexOf( name ) !== -1 ) {
|
|
301
345
|
return false;
|
|
302
346
|
}
|
|
303
347
|
|
|
@@ -330,7 +374,7 @@ export default class ToolbarView extends View {
|
|
|
330
374
|
}
|
|
331
375
|
|
|
332
376
|
// For the items that cannot be instantiated we are sending warning message. We also filter them out.
|
|
333
|
-
if ( !factory.has( name ) ) {
|
|
377
|
+
if ( !isObject( name ) && !factory.has( name ) ) {
|
|
334
378
|
/**
|
|
335
379
|
* There was a problem processing the configuration of the toolbar. The item with the given
|
|
336
380
|
* name does not exist so it was omitted when rendering the toolbar.
|
|
@@ -356,19 +400,7 @@ export default class ToolbarView extends View {
|
|
|
356
400
|
return true;
|
|
357
401
|
} );
|
|
358
402
|
|
|
359
|
-
|
|
360
|
-
// Instantiate toolbar items.
|
|
361
|
-
.map( name => {
|
|
362
|
-
if ( name === '|' ) {
|
|
363
|
-
return new ToolbarSeparatorView();
|
|
364
|
-
} else if ( name === '-' ) {
|
|
365
|
-
return new ToolbarLineBreakView();
|
|
366
|
-
}
|
|
367
|
-
|
|
368
|
-
return factory.create( name );
|
|
369
|
-
} );
|
|
370
|
-
|
|
371
|
-
this.items.addMany( itemsToAdd );
|
|
403
|
+
return this._cleanSeparatorsAndLineBreaks( filteredItems );
|
|
372
404
|
}
|
|
373
405
|
|
|
374
406
|
/**
|
|
@@ -376,23 +408,29 @@ export default class ToolbarView extends View {
|
|
|
376
408
|
*
|
|
377
409
|
* @private
|
|
378
410
|
* @param {Array.<String>} items
|
|
411
|
+
* @returns {Array.<String>} Toolbar items after the separator and line break clean-up.
|
|
379
412
|
*/
|
|
380
|
-
|
|
413
|
+
_cleanSeparatorsAndLineBreaks( items ) {
|
|
381
414
|
const nonSeparatorPredicate = item => ( item !== '-' && item !== '|' );
|
|
382
415
|
const count = items.length;
|
|
383
416
|
|
|
384
417
|
// Find an index of the first item that is not a separator.
|
|
385
|
-
const
|
|
418
|
+
const firstCommandItemIndex = items.findIndex( nonSeparatorPredicate );
|
|
419
|
+
|
|
420
|
+
// Items include separators only. There is no point in displaying them.
|
|
421
|
+
if ( firstCommandItemIndex === -1 ) {
|
|
422
|
+
return [];
|
|
423
|
+
}
|
|
386
424
|
|
|
387
425
|
// Search from the end of the list, then convert found index back to the original direction.
|
|
388
|
-
const
|
|
426
|
+
const lastCommandItemIndex = count - items
|
|
389
427
|
.slice()
|
|
390
428
|
.reverse()
|
|
391
429
|
.findIndex( nonSeparatorPredicate );
|
|
392
430
|
|
|
393
431
|
return items
|
|
394
432
|
// Return items without the leading and trailing separators.
|
|
395
|
-
.slice(
|
|
433
|
+
.slice( firstCommandItemIndex, lastCommandItemIndex )
|
|
396
434
|
// Remove duplicated separators.
|
|
397
435
|
.filter( ( name, idx, items ) => {
|
|
398
436
|
// Filter only separators.
|
|
@@ -405,6 +443,79 @@ export default class ToolbarView extends View {
|
|
|
405
443
|
} );
|
|
406
444
|
}
|
|
407
445
|
|
|
446
|
+
/**
|
|
447
|
+
* Creates a user-defined dropdown containing a toolbar with items.
|
|
448
|
+
*
|
|
449
|
+
* @private
|
|
450
|
+
* @param {Object} definition A definition of the nested toolbar dropdown.
|
|
451
|
+
* @param {String} definition.label A label of the dropdown.
|
|
452
|
+
* @param {String|Boolean} [definition.icon] An icon of the drop-down. One of 'bold', 'plus', 'text', 'importExport', 'alignLeft',
|
|
453
|
+
* 'paragraph' or an SVG string. When `false` is passed, no icon will be used.
|
|
454
|
+
* @param {Boolean} [definition.withText=false] When set `true`, the label of the dropdown will be visible. See
|
|
455
|
+
* {@link module:ui/button/buttonview~ButtonView#withText} to learn more.
|
|
456
|
+
* @param {Boolean|String|Function} [definition.tooltip=true] A tooltip of the dropdown button. See
|
|
457
|
+
* {@link module:ui/button/buttonview~ButtonView#tooltip} to learn more.
|
|
458
|
+
* @param {module:ui/componentfactory~ComponentFactory} componentFactory Component factory used to create items
|
|
459
|
+
* of the nested toolbar.
|
|
460
|
+
* @returns {module:ui/dropdown/dropdownview~DropdownView}
|
|
461
|
+
*/
|
|
462
|
+
_createNestedToolbarDropdown( definition, componentFactory, removeItems ) {
|
|
463
|
+
let { label, icon, items, tooltip = true, withText = false } = definition;
|
|
464
|
+
|
|
465
|
+
items = this._cleanItemsConfiguration( items, componentFactory, removeItems );
|
|
466
|
+
|
|
467
|
+
// There is no point in rendering a dropdown without items.
|
|
468
|
+
if ( !items.length ) {
|
|
469
|
+
return null;
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
const locale = this.locale;
|
|
473
|
+
const dropdownView = createDropdown( locale );
|
|
474
|
+
|
|
475
|
+
if ( !label ) {
|
|
476
|
+
/**
|
|
477
|
+
* A dropdown definition in the toolbar configuration is missing a text label.
|
|
478
|
+
*
|
|
479
|
+
* Without a label, the dropdown becomes inaccessible to users relying on assistive technologies.
|
|
480
|
+
* Make sure the `label` property is set in your drop-down configuration:
|
|
481
|
+
*
|
|
482
|
+
* {
|
|
483
|
+
* label: 'A human-readable label',
|
|
484
|
+
* icon: '...',
|
|
485
|
+
* items: [ ... ]
|
|
486
|
+
* },
|
|
487
|
+
*
|
|
488
|
+
* Learn more about {@link module:core/editor/editorconfig~EditorConfig#toolbar toolbar configuration}.
|
|
489
|
+
*
|
|
490
|
+
* @error toolbarview-nested-toolbar-dropdown-missing-label
|
|
491
|
+
*/
|
|
492
|
+
logWarning( 'toolbarview-nested-toolbar-dropdown-missing-label', definition );
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
dropdownView.class = 'ck-toolbar__nested-toolbar-dropdown';
|
|
496
|
+
dropdownView.buttonView.set( {
|
|
497
|
+
label,
|
|
498
|
+
tooltip,
|
|
499
|
+
withText: !!withText
|
|
500
|
+
} );
|
|
501
|
+
|
|
502
|
+
// Allow disabling icon by passing false.
|
|
503
|
+
if ( icon !== false ) {
|
|
504
|
+
// A pre-defined icon picked by name, SVG string, a fallback (default) icon.
|
|
505
|
+
dropdownView.buttonView.icon = NESTED_TOOLBAR_ICONS[ icon ] || icon || NESTED_TOOLBAR_ICONS.threeVerticalDots;
|
|
506
|
+
}
|
|
507
|
+
// If the icon is disabled, display the label automatically.
|
|
508
|
+
else {
|
|
509
|
+
dropdownView.buttonView.withText = true;
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
addToolbarToDropdown( dropdownView, [] );
|
|
513
|
+
|
|
514
|
+
dropdownView.toolbarView.fillFromConfig( items, componentFactory, removeItems );
|
|
515
|
+
|
|
516
|
+
return dropdownView;
|
|
517
|
+
}
|
|
518
|
+
|
|
408
519
|
/**
|
|
409
520
|
* Fired when some toolbar {@link #items} were grouped or ungrouped as a result of some change
|
|
410
521
|
* in the toolbar geometry.
|