@ckeditor/ckeditor5-bookmark 44.3.0 → 45.0.0-alpha.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/build/bookmark.js +2 -2
- package/build/translations/af.js +1 -1
- package/build/translations/ar.js +1 -1
- package/build/translations/ast.js +1 -1
- package/build/translations/az.js +1 -1
- package/build/translations/be.js +1 -0
- package/build/translations/bg.js +1 -1
- package/build/translations/bn.js +1 -1
- package/build/translations/bs.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-ch.js +1 -1
- package/build/translations/de.js +1 -1
- package/build/translations/el.js +1 -1
- package/build/translations/en-au.js +1 -1
- package/build/translations/en-gb.js +1 -1
- package/build/translations/eo.js +1 -1
- package/build/translations/es-co.js +1 -1
- package/build/translations/es.js +1 -1
- package/build/translations/et.js +1 -1
- package/build/translations/eu.js +1 -1
- package/build/translations/fa.js +1 -1
- package/build/translations/fi.js +1 -1
- package/build/translations/fr.js +1 -1
- package/build/translations/gl.js +1 -1
- package/build/translations/gu.js +1 -1
- package/build/translations/he.js +1 -1
- package/build/translations/hi.js +1 -1
- package/build/translations/hr.js +1 -1
- package/build/translations/hu.js +1 -1
- package/build/translations/hy.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/jv.js +1 -1
- package/build/translations/kk.js +1 -1
- package/build/translations/km.js +1 -1
- package/build/translations/kn.js +1 -1
- package/build/translations/ko.js +1 -1
- package/build/translations/ku.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/nb.js +1 -1
- package/build/translations/ne.js +1 -1
- package/build/translations/nl.js +1 -1
- package/build/translations/no.js +1 -1
- package/build/translations/oc.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/si.js +1 -1
- package/build/translations/sk.js +1 -1
- package/build/translations/sl.js +1 -1
- package/build/translations/sq.js +1 -1
- package/build/translations/sr-latn.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/ti.js +1 -1
- package/build/translations/tk.js +1 -1
- package/build/translations/tr.js +1 -1
- package/build/translations/tt.js +1 -1
- package/build/translations/ug.js +1 -1
- package/build/translations/uk.js +1 -1
- package/build/translations/ur.js +1 -1
- package/build/translations/uz.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/ckeditor5-metadata.json +1 -1
- package/dist/index-editor.css +56 -101
- package/dist/index.css +59 -119
- package/dist/index.css.map +1 -1
- package/dist/index.js +283 -389
- package/dist/index.js.map +1 -1
- package/dist/translations/af.js +1 -1
- package/dist/translations/af.umd.js +1 -1
- package/dist/translations/ar.js +1 -1
- package/dist/translations/ar.umd.js +1 -1
- package/dist/translations/ast.js +1 -1
- package/dist/translations/ast.umd.js +1 -1
- package/dist/translations/az.js +1 -1
- package/dist/translations/az.umd.js +1 -1
- package/dist/translations/be.d.ts +8 -0
- package/dist/translations/be.js +5 -0
- package/dist/translations/be.umd.js +11 -0
- 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/bs.js +1 -1
- package/dist/translations/bs.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-ch.js +1 -1
- package/dist/translations/de-ch.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/en-au.js +1 -1
- package/dist/translations/en-au.umd.js +1 -1
- package/dist/translations/en-gb.js +1 -1
- package/dist/translations/en-gb.umd.js +1 -1
- package/dist/translations/en.js +1 -1
- package/dist/translations/en.umd.js +1 -1
- package/dist/translations/eo.js +1 -1
- package/dist/translations/eo.umd.js +1 -1
- package/dist/translations/es-co.js +1 -1
- package/dist/translations/es-co.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/eu.js +1 -1
- package/dist/translations/eu.umd.js +1 -1
- package/dist/translations/fa.js +1 -1
- package/dist/translations/fa.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/gl.js +1 -1
- package/dist/translations/gl.umd.js +1 -1
- package/dist/translations/gu.js +1 -1
- package/dist/translations/gu.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/hr.js +1 -1
- package/dist/translations/hr.umd.js +1 -1
- package/dist/translations/hu.js +1 -1
- package/dist/translations/hu.umd.js +1 -1
- package/dist/translations/hy.js +1 -1
- package/dist/translations/hy.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/jv.js +1 -1
- package/dist/translations/jv.umd.js +1 -1
- package/dist/translations/kk.js +1 -1
- package/dist/translations/kk.umd.js +1 -1
- package/dist/translations/km.js +1 -1
- package/dist/translations/km.umd.js +1 -1
- package/dist/translations/kn.js +1 -1
- package/dist/translations/kn.umd.js +1 -1
- package/dist/translations/ko.js +1 -1
- package/dist/translations/ko.umd.js +1 -1
- package/dist/translations/ku.js +1 -1
- package/dist/translations/ku.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/nb.js +1 -1
- package/dist/translations/nb.umd.js +1 -1
- package/dist/translations/ne.js +1 -1
- package/dist/translations/ne.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/oc.js +1 -1
- package/dist/translations/oc.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/si.js +1 -1
- package/dist/translations/si.umd.js +1 -1
- package/dist/translations/sk.js +1 -1
- package/dist/translations/sk.umd.js +1 -1
- package/dist/translations/sl.js +1 -1
- package/dist/translations/sl.umd.js +1 -1
- package/dist/translations/sq.js +1 -1
- package/dist/translations/sq.umd.js +1 -1
- package/dist/translations/sr-latn.js +1 -1
- package/dist/translations/sr-latn.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/ti.js +1 -1
- package/dist/translations/ti.umd.js +1 -1
- package/dist/translations/tk.js +1 -1
- package/dist/translations/tk.umd.js +1 -1
- package/dist/translations/tr.js +1 -1
- package/dist/translations/tr.umd.js +1 -1
- package/dist/translations/tt.js +1 -1
- package/dist/translations/tt.umd.js +1 -1
- package/dist/translations/ug.js +1 -1
- package/dist/translations/ug.umd.js +1 -1
- package/dist/translations/uk.js +1 -1
- package/dist/translations/uk.umd.js +1 -1
- package/dist/translations/ur.js +1 -1
- package/dist/translations/ur.umd.js +1 -1
- package/dist/translations/uz.js +1 -1
- package/dist/translations/uz.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/contexts.json +5 -3
- package/lang/translations/af.po +16 -8
- package/lang/translations/ar.po +16 -8
- package/lang/translations/ast.po +16 -8
- package/lang/translations/az.po +16 -8
- package/lang/translations/be.po +64 -0
- package/lang/translations/bg.po +16 -8
- package/lang/translations/bn.po +16 -8
- package/lang/translations/bs.po +16 -8
- package/lang/translations/ca.po +16 -8
- package/lang/translations/cs.po +16 -8
- package/lang/translations/da.po +16 -8
- package/lang/translations/de-ch.po +16 -8
- package/lang/translations/de.po +16 -8
- package/lang/translations/el.po +16 -8
- package/lang/translations/en-au.po +16 -8
- package/lang/translations/en-gb.po +16 -8
- package/lang/translations/en.po +16 -8
- package/lang/translations/eo.po +16 -8
- package/lang/translations/es-co.po +16 -8
- package/lang/translations/es.po +16 -8
- package/lang/translations/et.po +16 -8
- package/lang/translations/eu.po +16 -8
- package/lang/translations/fa.po +16 -8
- package/lang/translations/fi.po +16 -8
- package/lang/translations/fr.po +16 -8
- package/lang/translations/gl.po +16 -8
- package/lang/translations/gu.po +16 -8
- package/lang/translations/he.po +16 -8
- package/lang/translations/hi.po +16 -8
- package/lang/translations/hr.po +16 -8
- package/lang/translations/hu.po +16 -8
- package/lang/translations/hy.po +16 -8
- package/lang/translations/id.po +16 -8
- package/lang/translations/it.po +16 -8
- package/lang/translations/ja.po +16 -8
- package/lang/translations/jv.po +16 -8
- package/lang/translations/kk.po +16 -8
- package/lang/translations/km.po +16 -8
- package/lang/translations/kn.po +16 -8
- package/lang/translations/ko.po +16 -8
- package/lang/translations/ku.po +16 -8
- package/lang/translations/lt.po +16 -8
- package/lang/translations/lv.po +16 -8
- package/lang/translations/ms.po +16 -8
- package/lang/translations/nb.po +16 -8
- package/lang/translations/ne.po +16 -8
- package/lang/translations/nl.po +16 -8
- package/lang/translations/no.po +16 -8
- package/lang/translations/oc.po +16 -8
- package/lang/translations/pl.po +16 -8
- package/lang/translations/pt-br.po +16 -8
- package/lang/translations/pt.po +16 -8
- package/lang/translations/ro.po +16 -8
- package/lang/translations/ru.po +16 -8
- package/lang/translations/si.po +16 -8
- package/lang/translations/sk.po +16 -8
- package/lang/translations/sl.po +16 -8
- package/lang/translations/sq.po +16 -8
- package/lang/translations/sr-latn.po +16 -8
- package/lang/translations/sr.po +16 -8
- package/lang/translations/sv.po +16 -8
- package/lang/translations/th.po +16 -8
- package/lang/translations/ti.po +16 -8
- package/lang/translations/tk.po +16 -8
- package/lang/translations/tr.po +16 -8
- package/lang/translations/tt.po +16 -8
- package/lang/translations/ug.po +16 -8
- package/lang/translations/uk.po +16 -8
- package/lang/translations/ur.po +16 -8
- package/lang/translations/uz.po +16 -8
- package/lang/translations/vi.po +16 -8
- package/lang/translations/zh-cn.po +16 -8
- package/lang/translations/zh.po +16 -8
- package/package.json +8 -7
- package/src/bookmarkconfig.d.ts +24 -0
- package/src/bookmarkediting.d.ts +9 -1
- package/src/bookmarkediting.js +23 -9
- package/src/bookmarkui.d.ts +24 -57
- package/src/bookmarkui.js +208 -212
- package/src/ui/bookmarkformview.d.ts +24 -14
- package/src/ui/bookmarkformview.js +103 -62
- package/theme/bookmark.css +0 -46
- package/theme/bookmarkform.css +0 -38
- package/theme/bookmarktoolbar.css +4 -0
- package/src/ui/bookmarkactionsview.d.ts +0 -102
- package/src/ui/bookmarkactionsview.js +0 -154
- package/theme/bookmarkactions.css +0 -44
package/src/bookmarkconfig.d.ts
CHANGED
|
@@ -45,4 +45,28 @@ export interface BookmarkConfig {
|
|
|
45
45
|
* @default true
|
|
46
46
|
*/
|
|
47
47
|
enableNonEmptyAnchorConversion?: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Items to be placed in the bookmark contextual toolbar.
|
|
50
|
+
*
|
|
51
|
+
* Assuming that you use the {@link module:bookmark/bookmarkui~BookmarkUI} feature, the following toolbar items will be available
|
|
52
|
+
* in {@link module:ui/componentfactory~ComponentFactory}:
|
|
53
|
+
*
|
|
54
|
+
* * `'bookmarkPreview'`,
|
|
55
|
+
* * `'editBookmark'`,
|
|
56
|
+
* * `'removeBookmark'`.
|
|
57
|
+
*
|
|
58
|
+
* The default configuration for bookmark toolbar is:
|
|
59
|
+
*
|
|
60
|
+
* ```ts
|
|
61
|
+
* const bookmarkConfig = {
|
|
62
|
+
* toolbar: [ 'bookmarkPreview', '|', 'editBookmark', 'removeBookmark' ]
|
|
63
|
+
* };
|
|
64
|
+
* ```
|
|
65
|
+
*
|
|
66
|
+
* Of course, the same buttons can also be used in the
|
|
67
|
+
* {@link module:core/editor/editorconfig~EditorConfig#toolbar main editor toolbar}.
|
|
68
|
+
*
|
|
69
|
+
* Read more about configuring the toolbar in {@link module:core/editor/editorconfig~EditorConfig#toolbar}.
|
|
70
|
+
*/
|
|
71
|
+
toolbar?: Array<string>;
|
|
48
72
|
}
|
package/src/bookmarkediting.d.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
/**
|
|
6
6
|
* @module bookmark/bookmarkediting
|
|
7
7
|
*/
|
|
8
|
-
import { Plugin } from 'ckeditor5/src/core.js';
|
|
8
|
+
import { type Editor, Plugin } from 'ckeditor5/src/core.js';
|
|
9
9
|
import type { Element } from 'ckeditor5/src/engine.js';
|
|
10
10
|
import '../theme/bookmark.css';
|
|
11
11
|
/**
|
|
@@ -24,6 +24,10 @@ export default class BookmarkEditing extends Plugin {
|
|
|
24
24
|
* @inheritDoc
|
|
25
25
|
*/
|
|
26
26
|
static get isOfficialPlugin(): true;
|
|
27
|
+
/**
|
|
28
|
+
* @inheritDoc
|
|
29
|
+
*/
|
|
30
|
+
constructor(editor: Editor);
|
|
27
31
|
/**
|
|
28
32
|
* @inheritDoc
|
|
29
33
|
*/
|
|
@@ -32,6 +36,10 @@ export default class BookmarkEditing extends Plugin {
|
|
|
32
36
|
* Returns the model element for the given bookmark ID if it exists.
|
|
33
37
|
*/
|
|
34
38
|
getElementForBookmarkId(bookmarkId: string): Element | null;
|
|
39
|
+
/**
|
|
40
|
+
* Returns all unique bookmark names existing in the content.
|
|
41
|
+
*/
|
|
42
|
+
getAllBookmarkNames(): Set<string>;
|
|
35
43
|
/**
|
|
36
44
|
* Defines the schema for the bookmark feature.
|
|
37
45
|
*/
|
package/src/bookmarkediting.js
CHANGED
|
@@ -5,9 +5,10 @@
|
|
|
5
5
|
/**
|
|
6
6
|
* @module bookmark/bookmarkediting
|
|
7
7
|
*/
|
|
8
|
-
import { Plugin
|
|
8
|
+
import { Plugin } from 'ckeditor5/src/core.js';
|
|
9
9
|
import { toWidget } from 'ckeditor5/src/widget.js';
|
|
10
10
|
import { IconView } from 'ckeditor5/src/ui.js';
|
|
11
|
+
import { IconBookmarkInline } from 'ckeditor5/src/icons.js';
|
|
11
12
|
import InsertBookmarkCommand from './insertbookmarkcommand.js';
|
|
12
13
|
import UpdateBookmarkCommand from './updatebookmarkcommand.js';
|
|
13
14
|
import '../theme/bookmark.css';
|
|
@@ -15,13 +16,10 @@ import '../theme/bookmark.css';
|
|
|
15
16
|
* The bookmark editing plugin.
|
|
16
17
|
*/
|
|
17
18
|
export default class BookmarkEditing extends Plugin {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
*/
|
|
23
|
-
this._bookmarkElements = new Map();
|
|
24
|
-
}
|
|
19
|
+
/**
|
|
20
|
+
* A collection of bookmarks elements in the document.
|
|
21
|
+
*/
|
|
22
|
+
_bookmarkElements = new Map();
|
|
25
23
|
/**
|
|
26
24
|
* @inheritDoc
|
|
27
25
|
*/
|
|
@@ -34,6 +32,15 @@ export default class BookmarkEditing extends Plugin {
|
|
|
34
32
|
static get isOfficialPlugin() {
|
|
35
33
|
return true;
|
|
36
34
|
}
|
|
35
|
+
/**
|
|
36
|
+
* @inheritDoc
|
|
37
|
+
*/
|
|
38
|
+
constructor(editor) {
|
|
39
|
+
super(editor);
|
|
40
|
+
editor.config.define('bookmark', {
|
|
41
|
+
toolbar: ['bookmarkPreview', '|', 'editBookmark', 'removeBookmark']
|
|
42
|
+
});
|
|
43
|
+
}
|
|
37
44
|
/**
|
|
38
45
|
* @inheritDoc
|
|
39
46
|
*/
|
|
@@ -58,6 +65,12 @@ export default class BookmarkEditing extends Plugin {
|
|
|
58
65
|
}
|
|
59
66
|
return null;
|
|
60
67
|
}
|
|
68
|
+
/**
|
|
69
|
+
* Returns all unique bookmark names existing in the content.
|
|
70
|
+
*/
|
|
71
|
+
getAllBookmarkNames() {
|
|
72
|
+
return new Set(this._bookmarkElements.values());
|
|
73
|
+
}
|
|
61
74
|
/**
|
|
62
75
|
* Defines the schema for the bookmark feature.
|
|
63
76
|
*/
|
|
@@ -103,6 +116,7 @@ export default class BookmarkEditing extends Plugin {
|
|
|
103
116
|
id,
|
|
104
117
|
class: 'ck-bookmark'
|
|
105
118
|
}, [this._createBookmarkUIElement(writer)]);
|
|
119
|
+
writer.setCustomProperty('bookmark', true, containerElement);
|
|
106
120
|
this._bookmarkElements.set(modelElement, id);
|
|
107
121
|
// `getFillerOffset` is not needed to set here, because `toWidget` has already covered it.
|
|
108
122
|
const labelCreator = () => `${id} ${t('bookmark widget')}`;
|
|
@@ -119,7 +133,7 @@ export default class BookmarkEditing extends Plugin {
|
|
|
119
133
|
const domElement = this.toDomElement(domDocument);
|
|
120
134
|
const icon = new IconView();
|
|
121
135
|
icon.set({
|
|
122
|
-
content:
|
|
136
|
+
content: IconBookmarkInline,
|
|
123
137
|
isColorInherited: false
|
|
124
138
|
});
|
|
125
139
|
icon.render();
|
package/src/bookmarkui.d.ts
CHANGED
|
@@ -2,14 +2,12 @@
|
|
|
2
2
|
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
4
|
*/
|
|
5
|
-
/**
|
|
6
|
-
* @module bookmark/bookmarkui
|
|
7
|
-
*/
|
|
8
5
|
import { Plugin } from 'ckeditor5/src/core.js';
|
|
9
6
|
import { ContextualBalloon, type ViewWithCssTransitionDisabler } from 'ckeditor5/src/ui.js';
|
|
7
|
+
import { WidgetToolbarRepository } from 'ckeditor5/src/widget.js';
|
|
10
8
|
import BookmarkFormView from './ui/bookmarkformview.js';
|
|
11
|
-
import BookmarkActionsView from './ui/bookmarkactionsview.js';
|
|
12
9
|
import BookmarkEditing from './bookmarkediting.js';
|
|
10
|
+
import '../theme/bookmarktoolbar.css';
|
|
13
11
|
/**
|
|
14
12
|
* The UI plugin of the bookmark feature.
|
|
15
13
|
*
|
|
@@ -17,10 +15,6 @@ import BookmarkEditing from './bookmarkediting.js';
|
|
|
17
15
|
* which inserts the `bookmark` element upon selection.
|
|
18
16
|
*/
|
|
19
17
|
export default class BookmarkUI extends Plugin {
|
|
20
|
-
/**
|
|
21
|
-
* The actions view displayed inside of the balloon.
|
|
22
|
-
*/
|
|
23
|
-
actionsView: BookmarkActionsView | null;
|
|
24
18
|
/**
|
|
25
19
|
* The form view displayed inside the balloon.
|
|
26
20
|
*/
|
|
@@ -32,7 +26,7 @@ export default class BookmarkUI extends Plugin {
|
|
|
32
26
|
/**
|
|
33
27
|
* @inheritDoc
|
|
34
28
|
*/
|
|
35
|
-
static get requires(): readonly [typeof BookmarkEditing, typeof ContextualBalloon];
|
|
29
|
+
static get requires(): readonly [typeof BookmarkEditing, typeof ContextualBalloon, typeof WidgetToolbarRepository];
|
|
36
30
|
/**
|
|
37
31
|
* @inheritDoc
|
|
38
32
|
*/
|
|
@@ -45,6 +39,10 @@ export default class BookmarkUI extends Plugin {
|
|
|
45
39
|
* @inheritDoc
|
|
46
40
|
*/
|
|
47
41
|
init(): void;
|
|
42
|
+
/**
|
|
43
|
+
* @inheritDoc
|
|
44
|
+
*/
|
|
45
|
+
afterInit(): void;
|
|
48
46
|
/**
|
|
49
47
|
* @inheritDoc
|
|
50
48
|
*/
|
|
@@ -53,71 +51,54 @@ export default class BookmarkUI extends Plugin {
|
|
|
53
51
|
* Creates views.
|
|
54
52
|
*/
|
|
55
53
|
private _createViews;
|
|
56
|
-
/**
|
|
57
|
-
* Creates the {@link module:bookmark/ui/bookmarkactionsview~BookmarkActionsView} instance.
|
|
58
|
-
*/
|
|
59
|
-
private _createActionsView;
|
|
60
54
|
/**
|
|
61
55
|
* Creates the {@link module:bookmark/ui/bookmarkformview~BookmarkFormView} instance.
|
|
62
56
|
*/
|
|
63
57
|
private _createFormView;
|
|
58
|
+
/**
|
|
59
|
+
* Creates link form menu list entry, so it'll be possible to access
|
|
60
|
+
* the list of the bookmarks from the link form.
|
|
61
|
+
*/
|
|
62
|
+
private _registerLinkProvider;
|
|
63
|
+
/**
|
|
64
|
+
* Scrolls the editor to the bookmark with the given id.
|
|
65
|
+
*/
|
|
66
|
+
private _scrollToBookmark;
|
|
64
67
|
/**
|
|
65
68
|
* Creates a toolbar Bookmark button. Clicking this button will show
|
|
66
69
|
* a {@link #_balloon} attached to the selection.
|
|
67
70
|
*/
|
|
68
|
-
private
|
|
71
|
+
private _registerComponents;
|
|
69
72
|
/**
|
|
70
73
|
* Creates a button for `bookmark` command to use either in toolbar or in menu bar.
|
|
71
74
|
*/
|
|
72
|
-
private
|
|
73
|
-
/**
|
|
74
|
-
* Attaches actions that control whether the balloon panel containing the
|
|
75
|
-
* {@link #formView} should be displayed.
|
|
76
|
-
*/
|
|
77
|
-
private _enableBalloonActivators;
|
|
75
|
+
private _createBookmarkButton;
|
|
78
76
|
/**
|
|
79
77
|
* Attaches actions that control whether the balloon panel containing the
|
|
80
78
|
* {@link #formView} is visible or not.
|
|
81
79
|
*/
|
|
82
80
|
private _enableUserBalloonInteractions;
|
|
83
|
-
/**
|
|
84
|
-
* Updates the button label. If bookmark is selected label is set to 'Update' otherwise
|
|
85
|
-
* it is 'Insert'.
|
|
86
|
-
*/
|
|
87
|
-
private _updateFormButtonLabel;
|
|
88
|
-
/**
|
|
89
|
-
* Adds the {@link #actionsView} to the {@link #_balloon}.
|
|
90
|
-
*
|
|
91
|
-
* @internal
|
|
92
|
-
*/
|
|
93
|
-
_addActionsView(): void;
|
|
94
81
|
/**
|
|
95
82
|
* Adds the {@link #formView} to the {@link #_balloon}.
|
|
96
83
|
*/
|
|
97
84
|
private _addFormView;
|
|
98
|
-
/**
|
|
99
|
-
* Closes the form view. Decides whether the balloon should be hidden completely.
|
|
100
|
-
*/
|
|
101
|
-
private _closeFormView;
|
|
102
85
|
/**
|
|
103
86
|
* Removes the {@link #formView} from the {@link #_balloon}.
|
|
104
87
|
*/
|
|
105
88
|
private _removeFormView;
|
|
106
89
|
/**
|
|
107
|
-
* Shows the
|
|
90
|
+
* Shows the {@link #formView}.
|
|
108
91
|
*/
|
|
109
|
-
private
|
|
92
|
+
private _showFormView;
|
|
110
93
|
/**
|
|
111
94
|
* Removes the {@link #formView} from the {@link #_balloon}.
|
|
112
|
-
*
|
|
113
|
-
* See {@link #_addFormView}, {@link #_addActionsView}.
|
|
114
95
|
*/
|
|
115
|
-
private
|
|
96
|
+
private _hideFormView;
|
|
116
97
|
/**
|
|
117
98
|
* Makes the UI react to the {@link module:ui/editorui/editorui~EditorUI#event:update} event to
|
|
118
99
|
* reposition itself when the editor UI should be refreshed.
|
|
119
100
|
*
|
|
120
|
-
* See: {@link #
|
|
101
|
+
* See: {@link #_hideFormView} to learn when the UI stops reacting to the `update` event.
|
|
121
102
|
*/
|
|
122
103
|
private _startUpdatingUI;
|
|
123
104
|
/**
|
|
@@ -125,23 +106,9 @@ export default class BookmarkUI extends Plugin {
|
|
|
125
106
|
*/
|
|
126
107
|
private get _isFormInPanel();
|
|
127
108
|
/**
|
|
128
|
-
* Returns `true` when {@link #
|
|
129
|
-
*/
|
|
130
|
-
private get _areActionsInPanel();
|
|
131
|
-
/**
|
|
132
|
-
* Returns `true` when {@link #actionsView} is in the {@link #_balloon} and it is
|
|
133
|
-
* currently visible.
|
|
134
|
-
*/
|
|
135
|
-
private get _areActionsVisible();
|
|
136
|
-
/**
|
|
137
|
-
* Returns `true` when {@link #actionsView} or {@link #formView} is in the {@link #_balloon}.
|
|
138
|
-
*/
|
|
139
|
-
private get _isUIInPanel();
|
|
140
|
-
/**
|
|
141
|
-
* Returns `true` when {@link #actionsView} or {@link #formView} is in the {@link #_balloon} and it is
|
|
142
|
-
* currently visible.
|
|
109
|
+
* Returns `true` when {@link #formView} is in the {@link #_balloon} and it is currently visible.
|
|
143
110
|
*/
|
|
144
|
-
private get
|
|
111
|
+
private get _isFormVisible();
|
|
145
112
|
/**
|
|
146
113
|
* Returns positioning options for the {@link #_balloon}. They control the way the balloon is attached
|
|
147
114
|
* to the target element or selection.
|