@ckeditor/ckeditor5-bookmark 45.0.0-alpha.1 → 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 -8
- 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 -8
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,7 +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',
|
|
90
|
+
balloonClassName: 'ck-bookmark-balloon ck-toolbar-container',
|
|
91
91
|
// Override positions to the same list as for balloon panel default
|
|
92
92
|
// so widget toolbar will try to use same position as form view.
|
|
93
93
|
positions: [
|
|
@@ -293,7 +293,10 @@ export default class BookmarkUI extends Plugin {
|
|
|
293
293
|
icon: IconBookmark
|
|
294
294
|
});
|
|
295
295
|
// Execute the command.
|
|
296
|
-
this.listenTo(view, 'execute', () =>
|
|
296
|
+
this.listenTo(view, 'execute', () => {
|
|
297
|
+
editor.editing.view.scrollToTheSelection();
|
|
298
|
+
this._showFormView();
|
|
299
|
+
});
|
|
297
300
|
view.bind('isEnabled').toMany([insertCommand, updateCommand], 'isEnabled', (...areEnabled) => areEnabled.some(isEnabled => isEnabled));
|
|
298
301
|
view.bind('isOn').to(updateCommand, 'value', value => !!value);
|
|
299
302
|
return view;
|
|
@@ -315,7 +318,13 @@ export default class BookmarkUI extends Plugin {
|
|
|
315
318
|
emitter: this.formView,
|
|
316
319
|
activator: () => this._isFormInPanel,
|
|
317
320
|
contextElements: () => [this._balloon.view.element],
|
|
318
|
-
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
|
+
}
|
|
319
328
|
});
|
|
320
329
|
}
|
|
321
330
|
/**
|
|
@@ -346,7 +355,7 @@ export default class BookmarkUI extends Plugin {
|
|
|
346
355
|
/**
|
|
347
356
|
* Removes the {@link #formView} from the {@link #_balloon}.
|
|
348
357
|
*/
|
|
349
|
-
_removeFormView() {
|
|
358
|
+
_removeFormView(updateFocus = true) {
|
|
350
359
|
// Blur the input element before removing it from DOM to prevent issues in some browsers.
|
|
351
360
|
// See https://github.com/ckeditor/ckeditor5/issues/1501.
|
|
352
361
|
this.formView.saveButtonView.focus();
|
|
@@ -355,7 +364,9 @@ export default class BookmarkUI extends Plugin {
|
|
|
355
364
|
this._balloon.remove(this.formView);
|
|
356
365
|
// Because the form has an input which has focus, the focus must be brought back
|
|
357
366
|
// to the editor. Otherwise, it would be lost.
|
|
358
|
-
|
|
367
|
+
if (updateFocus) {
|
|
368
|
+
this.editor.editing.view.focus();
|
|
369
|
+
}
|
|
359
370
|
this._hideFakeVisualSelection();
|
|
360
371
|
}
|
|
361
372
|
/**
|
|
@@ -377,7 +388,7 @@ export default class BookmarkUI extends Plugin {
|
|
|
377
388
|
/**
|
|
378
389
|
* Removes the {@link #formView} from the {@link #_balloon}.
|
|
379
390
|
*/
|
|
380
|
-
_hideFormView() {
|
|
391
|
+
_hideFormView(updateFocus = true) {
|
|
381
392
|
if (!this._isFormInPanel) {
|
|
382
393
|
return;
|
|
383
394
|
}
|
|
@@ -386,9 +397,11 @@ export default class BookmarkUI extends Plugin {
|
|
|
386
397
|
this.stopListening(this._balloon, 'change:visibleView');
|
|
387
398
|
// Make sure the focus always gets back to the editable _before_ removing the focused form view.
|
|
388
399
|
// Doing otherwise causes issues in some browsers. See https://github.com/ckeditor/ckeditor5-link/issues/193.
|
|
389
|
-
|
|
400
|
+
if (updateFocus) {
|
|
401
|
+
editor.editing.view.focus();
|
|
402
|
+
}
|
|
390
403
|
// Remove form first because it's on top of the stack.
|
|
391
|
-
this._removeFormView();
|
|
404
|
+
this._removeFormView(updateFocus);
|
|
392
405
|
this._hideFakeVisualSelection();
|
|
393
406
|
}
|
|
394
407
|
/**
|