@ckeditor/ckeditor5-link 0.0.0-nightly-20240627.0 → 0.0.0-nightly-20240629.0
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/link.js +1 -1
- package/dist/index.js +9 -6
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
- package/src/linkui.js +9 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-link",
|
|
3
|
-
"version": "0.0.0-nightly-
|
|
3
|
+
"version": "0.0.0-nightly-20240629.0",
|
|
4
4
|
"description": "Link feature for CKEditor 5.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ckeditor",
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
"type": "module",
|
|
14
14
|
"main": "src/index.js",
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@ckeditor/ckeditor5-ui": "0.0.0-nightly-
|
|
17
|
-
"ckeditor5": "0.0.0-nightly-
|
|
16
|
+
"@ckeditor/ckeditor5-ui": "0.0.0-nightly-20240629.0",
|
|
17
|
+
"ckeditor5": "0.0.0-nightly-20240629.0",
|
|
18
18
|
"lodash-es": "4.17.21"
|
|
19
19
|
},
|
|
20
20
|
"author": "CKSource (http://cksource.com/)",
|
package/src/linkui.js
CHANGED
|
@@ -184,18 +184,19 @@ export default class LinkUI extends Plugin {
|
|
|
184
184
|
*/
|
|
185
185
|
_createToolbarLinkButton() {
|
|
186
186
|
const editor = this.editor;
|
|
187
|
-
const linkCommand = editor.commands.get('link');
|
|
188
187
|
editor.ui.componentFactory.add('link', () => {
|
|
189
188
|
const button = this._createButton(ButtonView);
|
|
190
189
|
button.set({
|
|
191
|
-
tooltip: true
|
|
192
|
-
isToggleable: true
|
|
190
|
+
tooltip: true
|
|
193
191
|
});
|
|
194
|
-
button.bind('isOn').to(linkCommand, 'value', value => !!value);
|
|
195
192
|
return button;
|
|
196
193
|
});
|
|
197
194
|
editor.ui.componentFactory.add('menuBar:link', () => {
|
|
198
|
-
|
|
195
|
+
const button = this._createButton(MenuBarMenuListItemButtonView);
|
|
196
|
+
button.set({
|
|
197
|
+
role: 'menuitemcheckbox'
|
|
198
|
+
});
|
|
199
|
+
return button;
|
|
199
200
|
});
|
|
200
201
|
}
|
|
201
202
|
/**
|
|
@@ -210,9 +211,11 @@ export default class LinkUI extends Plugin {
|
|
|
210
211
|
view.set({
|
|
211
212
|
label: t('Link'),
|
|
212
213
|
icon: linkIcon,
|
|
213
|
-
keystroke: LINK_KEYSTROKE
|
|
214
|
+
keystroke: LINK_KEYSTROKE,
|
|
215
|
+
isToggleable: true
|
|
214
216
|
});
|
|
215
217
|
view.bind('isEnabled').to(command, 'isEnabled');
|
|
218
|
+
view.bind('isOn').to(command, 'value', value => !!value);
|
|
216
219
|
// Show the panel on button click.
|
|
217
220
|
this.listenTo(view, 'execute', () => this._showUI(true));
|
|
218
221
|
return view;
|