@ckeditor/ckeditor5-bookmark 45.0.0-alpha.0 → 45.0.0-alpha.10
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/build/bookmark.js +1 -1
- package/build/translations/ar.js +1 -1
- package/build/translations/bg.js +1 -1
- package/build/translations/bn.js +1 -1
- package/build/translations/ca.js +1 -1
- package/build/translations/cs.js +1 -1
- package/build/translations/da.js +1 -1
- package/build/translations/de.js +1 -1
- package/build/translations/el.js +1 -1
- package/build/translations/es.js +1 -1
- package/build/translations/et.js +1 -1
- package/build/translations/fi.js +1 -1
- package/build/translations/fr.js +1 -1
- package/build/translations/he.js +1 -1
- package/build/translations/hi.js +1 -1
- package/build/translations/hu.js +1 -1
- package/build/translations/id.js +1 -1
- package/build/translations/it.js +1 -1
- package/build/translations/ja.js +1 -1
- package/build/translations/ko.js +1 -1
- package/build/translations/lt.js +1 -1
- package/build/translations/lv.js +1 -1
- package/build/translations/ms.js +1 -1
- package/build/translations/nl.js +1 -1
- package/build/translations/no.js +1 -1
- package/build/translations/pl.js +1 -1
- package/build/translations/pt-br.js +1 -1
- package/build/translations/pt.js +1 -1
- package/build/translations/ro.js +1 -1
- package/build/translations/ru.js +1 -1
- package/build/translations/sk.js +1 -1
- package/build/translations/sr.js +1 -1
- package/build/translations/sv.js +1 -1
- package/build/translations/th.js +1 -1
- package/build/translations/tr.js +1 -1
- package/build/translations/uk.js +1 -1
- package/build/translations/vi.js +1 -1
- package/build/translations/zh-cn.js +1 -1
- package/build/translations/zh.js +1 -1
- package/dist/index.js +21 -7
- package/dist/index.js.map +1 -1
- package/dist/translations/ar.js +1 -1
- package/dist/translations/ar.umd.js +1 -1
- package/dist/translations/bg.js +1 -1
- package/dist/translations/bg.umd.js +1 -1
- package/dist/translations/bn.js +1 -1
- package/dist/translations/bn.umd.js +1 -1
- package/dist/translations/ca.js +1 -1
- package/dist/translations/ca.umd.js +1 -1
- package/dist/translations/cs.js +1 -1
- package/dist/translations/cs.umd.js +1 -1
- package/dist/translations/da.js +1 -1
- package/dist/translations/da.umd.js +1 -1
- package/dist/translations/de.js +1 -1
- package/dist/translations/de.umd.js +1 -1
- package/dist/translations/el.js +1 -1
- package/dist/translations/el.umd.js +1 -1
- package/dist/translations/es.js +1 -1
- package/dist/translations/es.umd.js +1 -1
- package/dist/translations/et.js +1 -1
- package/dist/translations/et.umd.js +1 -1
- package/dist/translations/fi.js +1 -1
- package/dist/translations/fi.umd.js +1 -1
- package/dist/translations/fr.js +1 -1
- package/dist/translations/fr.umd.js +1 -1
- package/dist/translations/he.js +1 -1
- package/dist/translations/he.umd.js +1 -1
- package/dist/translations/hi.js +1 -1
- package/dist/translations/hi.umd.js +1 -1
- package/dist/translations/hu.js +1 -1
- package/dist/translations/hu.umd.js +1 -1
- package/dist/translations/id.js +1 -1
- package/dist/translations/id.umd.js +1 -1
- package/dist/translations/it.js +1 -1
- package/dist/translations/it.umd.js +1 -1
- package/dist/translations/ja.js +1 -1
- package/dist/translations/ja.umd.js +1 -1
- package/dist/translations/ko.js +1 -1
- package/dist/translations/ko.umd.js +1 -1
- package/dist/translations/lt.js +1 -1
- package/dist/translations/lt.umd.js +1 -1
- package/dist/translations/lv.js +1 -1
- package/dist/translations/lv.umd.js +1 -1
- package/dist/translations/ms.js +1 -1
- package/dist/translations/ms.umd.js +1 -1
- package/dist/translations/nl.js +1 -1
- package/dist/translations/nl.umd.js +1 -1
- package/dist/translations/no.js +1 -1
- package/dist/translations/no.umd.js +1 -1
- package/dist/translations/pl.js +1 -1
- package/dist/translations/pl.umd.js +1 -1
- package/dist/translations/pt-br.js +1 -1
- package/dist/translations/pt-br.umd.js +1 -1
- package/dist/translations/pt.js +1 -1
- package/dist/translations/pt.umd.js +1 -1
- package/dist/translations/ro.js +1 -1
- package/dist/translations/ro.umd.js +1 -1
- package/dist/translations/ru.js +1 -1
- package/dist/translations/ru.umd.js +1 -1
- package/dist/translations/sk.js +1 -1
- package/dist/translations/sk.umd.js +1 -1
- package/dist/translations/sr.js +1 -1
- package/dist/translations/sr.umd.js +1 -1
- package/dist/translations/sv.js +1 -1
- package/dist/translations/sv.umd.js +1 -1
- package/dist/translations/th.js +1 -1
- package/dist/translations/th.umd.js +1 -1
- package/dist/translations/tr.js +1 -1
- package/dist/translations/tr.umd.js +1 -1
- package/dist/translations/uk.js +1 -1
- package/dist/translations/uk.umd.js +1 -1
- package/dist/translations/vi.js +1 -1
- package/dist/translations/vi.umd.js +1 -1
- package/dist/translations/zh-cn.js +1 -1
- package/dist/translations/zh-cn.umd.js +1 -1
- package/dist/translations/zh.js +1 -1
- package/dist/translations/zh.umd.js +1 -1
- package/lang/translations/ar.po +4 -4
- package/lang/translations/bg.po +4 -4
- package/lang/translations/bn.po +4 -4
- package/lang/translations/ca.po +4 -4
- package/lang/translations/cs.po +4 -4
- package/lang/translations/da.po +4 -4
- package/lang/translations/de.po +4 -4
- package/lang/translations/el.po +4 -4
- package/lang/translations/es.po +4 -4
- package/lang/translations/et.po +4 -4
- package/lang/translations/fi.po +4 -4
- package/lang/translations/fr.po +4 -4
- package/lang/translations/he.po +4 -4
- package/lang/translations/hi.po +4 -4
- package/lang/translations/hu.po +4 -4
- package/lang/translations/id.po +4 -4
- package/lang/translations/it.po +4 -4
- package/lang/translations/ja.po +4 -4
- package/lang/translations/ko.po +4 -4
- package/lang/translations/lt.po +4 -4
- package/lang/translations/lv.po +4 -4
- package/lang/translations/ms.po +4 -4
- package/lang/translations/nl.po +4 -4
- package/lang/translations/no.po +4 -4
- package/lang/translations/pl.po +4 -4
- package/lang/translations/pt-br.po +4 -4
- package/lang/translations/pt.po +4 -4
- package/lang/translations/ro.po +4 -4
- package/lang/translations/ru.po +4 -4
- package/lang/translations/sk.po +4 -4
- package/lang/translations/sr.po +4 -4
- package/lang/translations/sv.po +4 -4
- package/lang/translations/th.po +4 -4
- package/lang/translations/tr.po +4 -4
- package/lang/translations/uk.po +4 -4
- package/lang/translations/vi.po +4 -4
- package/lang/translations/zh-cn.po +4 -4
- package/lang/translations/zh.po +4 -4
- package/package.json +8 -8
- package/src/bookmarkui.js +21 -7
package/lang/translations/zh.po
CHANGED
|
@@ -49,16 +49,16 @@ msgstr "書籤小工具"
|
|
|
49
49
|
|
|
50
50
|
msgctxt "The label used by assistive technologies describing an bookmark toolbar attached to a bookmark widget."
|
|
51
51
|
msgid "Bookmark toolbar"
|
|
52
|
-
msgstr ""
|
|
52
|
+
msgstr "書籤工具列"
|
|
53
53
|
|
|
54
54
|
msgctxt "Title for a feature displaying a list of bookmarks."
|
|
55
55
|
msgid "Bookmarks"
|
|
56
|
-
msgstr ""
|
|
56
|
+
msgstr "書籤"
|
|
57
57
|
|
|
58
58
|
msgctxt "A message displayed instead of a list of bookmarks if it is empty."
|
|
59
59
|
msgid "No bookmarks available."
|
|
60
|
-
msgstr ""
|
|
60
|
+
msgstr "無可用書籤。"
|
|
61
61
|
|
|
62
62
|
msgctxt "Tooltip shown after hovering the bookmark link preview."
|
|
63
63
|
msgid "Scroll to bookmark"
|
|
64
|
-
msgstr ""
|
|
64
|
+
msgstr "捲動至書籤"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-bookmark",
|
|
3
|
-
"version": "45.0.0-alpha.
|
|
3
|
+
"version": "45.0.0-alpha.10",
|
|
4
4
|
"description": "Bookmark feature for CKEditor 5.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ckeditor",
|
|
@@ -13,13 +13,13 @@
|
|
|
13
13
|
"type": "module",
|
|
14
14
|
"main": "src/index.js",
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"ckeditor5": "45.0.0-alpha.
|
|
17
|
-
"@ckeditor/ckeditor5-core": "45.0.0-alpha.
|
|
18
|
-
"@ckeditor/ckeditor5-icons": "45.0.0-alpha.
|
|
19
|
-
"@ckeditor/ckeditor5-widget": "45.0.0-alpha.
|
|
20
|
-
"@ckeditor/ckeditor5-utils": "45.0.0-alpha.
|
|
21
|
-
"@ckeditor/ckeditor5-ui": "45.0.0-alpha.
|
|
22
|
-
"@ckeditor/ckeditor5-link": "45.0.0-alpha.
|
|
16
|
+
"ckeditor5": "45.0.0-alpha.10",
|
|
17
|
+
"@ckeditor/ckeditor5-core": "45.0.0-alpha.10",
|
|
18
|
+
"@ckeditor/ckeditor5-icons": "45.0.0-alpha.10",
|
|
19
|
+
"@ckeditor/ckeditor5-widget": "45.0.0-alpha.10",
|
|
20
|
+
"@ckeditor/ckeditor5-utils": "45.0.0-alpha.10",
|
|
21
|
+
"@ckeditor/ckeditor5-ui": "45.0.0-alpha.10",
|
|
22
|
+
"@ckeditor/ckeditor5-link": "45.0.0-alpha.10"
|
|
23
23
|
},
|
|
24
24
|
"author": "CKSource (http://cksource.com/)",
|
|
25
25
|
"license": "SEE LICENSE IN LICENSE.md",
|
package/src/bookmarkui.js
CHANGED
|
@@ -87,6 +87,7 @@ export default class BookmarkUI extends Plugin {
|
|
|
87
87
|
ariaLabel: t('Bookmark toolbar'),
|
|
88
88
|
items: editor.config.get('bookmark.toolbar'),
|
|
89
89
|
getRelatedElement: getSelectedBookmarkWidget,
|
|
90
|
+
balloonClassName: 'ck-bookmark-balloon ck-toolbar-container',
|
|
90
91
|
// Override positions to the same list as for balloon panel default
|
|
91
92
|
// so widget toolbar will try to use same position as form view.
|
|
92
93
|
positions: [
|
|
@@ -292,7 +293,10 @@ export default class BookmarkUI extends Plugin {
|
|
|
292
293
|
icon: IconBookmark
|
|
293
294
|
});
|
|
294
295
|
// Execute the command.
|
|
295
|
-
this.listenTo(view, 'execute', () =>
|
|
296
|
+
this.listenTo(view, 'execute', () => {
|
|
297
|
+
editor.editing.view.scrollToTheSelection();
|
|
298
|
+
this._showFormView();
|
|
299
|
+
});
|
|
296
300
|
view.bind('isEnabled').toMany([insertCommand, updateCommand], 'isEnabled', (...areEnabled) => areEnabled.some(isEnabled => isEnabled));
|
|
297
301
|
view.bind('isOn').to(updateCommand, 'value', value => !!value);
|
|
298
302
|
return view;
|
|
@@ -314,7 +318,13 @@ export default class BookmarkUI extends Plugin {
|
|
|
314
318
|
emitter: this.formView,
|
|
315
319
|
activator: () => this._isFormInPanel,
|
|
316
320
|
contextElements: () => [this._balloon.view.element],
|
|
317
|
-
callback: () =>
|
|
321
|
+
callback: () => {
|
|
322
|
+
// Focusing on the editable during a click outside the balloon panel might
|
|
323
|
+
// cause the selection to move to the beginning of the editable, so we avoid
|
|
324
|
+
// focusing on it during this action.
|
|
325
|
+
// See: https://github.com/ckeditor/ckeditor5/issues/18253
|
|
326
|
+
this._hideFormView(false);
|
|
327
|
+
}
|
|
318
328
|
});
|
|
319
329
|
}
|
|
320
330
|
/**
|
|
@@ -345,7 +355,7 @@ export default class BookmarkUI extends Plugin {
|
|
|
345
355
|
/**
|
|
346
356
|
* Removes the {@link #formView} from the {@link #_balloon}.
|
|
347
357
|
*/
|
|
348
|
-
_removeFormView() {
|
|
358
|
+
_removeFormView(updateFocus = true) {
|
|
349
359
|
// Blur the input element before removing it from DOM to prevent issues in some browsers.
|
|
350
360
|
// See https://github.com/ckeditor/ckeditor5/issues/1501.
|
|
351
361
|
this.formView.saveButtonView.focus();
|
|
@@ -354,7 +364,9 @@ export default class BookmarkUI extends Plugin {
|
|
|
354
364
|
this._balloon.remove(this.formView);
|
|
355
365
|
// Because the form has an input which has focus, the focus must be brought back
|
|
356
366
|
// to the editor. Otherwise, it would be lost.
|
|
357
|
-
|
|
367
|
+
if (updateFocus) {
|
|
368
|
+
this.editor.editing.view.focus();
|
|
369
|
+
}
|
|
358
370
|
this._hideFakeVisualSelection();
|
|
359
371
|
}
|
|
360
372
|
/**
|
|
@@ -376,7 +388,7 @@ export default class BookmarkUI extends Plugin {
|
|
|
376
388
|
/**
|
|
377
389
|
* Removes the {@link #formView} from the {@link #_balloon}.
|
|
378
390
|
*/
|
|
379
|
-
_hideFormView() {
|
|
391
|
+
_hideFormView(updateFocus = true) {
|
|
380
392
|
if (!this._isFormInPanel) {
|
|
381
393
|
return;
|
|
382
394
|
}
|
|
@@ -385,9 +397,11 @@ export default class BookmarkUI extends Plugin {
|
|
|
385
397
|
this.stopListening(this._balloon, 'change:visibleView');
|
|
386
398
|
// Make sure the focus always gets back to the editable _before_ removing the focused form view.
|
|
387
399
|
// Doing otherwise causes issues in some browsers. See https://github.com/ckeditor/ckeditor5-link/issues/193.
|
|
388
|
-
|
|
400
|
+
if (updateFocus) {
|
|
401
|
+
editor.editing.view.focus();
|
|
402
|
+
}
|
|
389
403
|
// Remove form first because it's on top of the stack.
|
|
390
|
-
this._removeFormView();
|
|
404
|
+
this._removeFormView(updateFocus);
|
|
391
405
|
this._hideFakeVisualSelection();
|
|
392
406
|
}
|
|
393
407
|
/**
|