@ckeditor/ckeditor5-link 44.1.0-alpha.5 → 44.2.0-alpha.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/LICENSE.md +1 -1
- package/build/link.js +2 -2
- package/dist/index-content.css +2 -2
- package/dist/index-editor.css +2 -2
- package/dist/index.css +9 -9
- package/dist/index.css.map +1 -1
- package/dist/index.js +16 -8
- package/dist/index.js.map +1 -1
- package/dist/translations/af.d.ts +2 -2
- package/dist/translations/af.js +2 -2
- package/dist/translations/af.umd.js +2 -2
- package/dist/translations/ar.d.ts +2 -2
- package/dist/translations/ar.js +2 -2
- package/dist/translations/ar.umd.js +2 -2
- package/dist/translations/ast.d.ts +2 -2
- package/dist/translations/ast.js +2 -2
- package/dist/translations/ast.umd.js +2 -2
- package/dist/translations/az.d.ts +2 -2
- package/dist/translations/az.js +2 -2
- package/dist/translations/az.umd.js +2 -2
- package/dist/translations/bg.d.ts +2 -2
- package/dist/translations/bg.js +2 -2
- package/dist/translations/bg.umd.js +2 -2
- package/dist/translations/bn.d.ts +2 -2
- package/dist/translations/bn.js +2 -2
- package/dist/translations/bn.umd.js +2 -2
- package/dist/translations/bs.d.ts +2 -2
- package/dist/translations/bs.js +2 -2
- package/dist/translations/bs.umd.js +2 -2
- package/dist/translations/ca.d.ts +2 -2
- package/dist/translations/ca.js +2 -2
- package/dist/translations/ca.umd.js +2 -2
- package/dist/translations/cs.d.ts +2 -2
- package/dist/translations/cs.js +2 -2
- package/dist/translations/cs.umd.js +2 -2
- package/dist/translations/da.d.ts +2 -2
- package/dist/translations/da.js +2 -2
- package/dist/translations/da.umd.js +2 -2
- package/dist/translations/de-ch.d.ts +2 -2
- package/dist/translations/de-ch.js +2 -2
- package/dist/translations/de-ch.umd.js +2 -2
- package/dist/translations/de.d.ts +2 -2
- package/dist/translations/de.js +2 -2
- package/dist/translations/de.umd.js +2 -2
- package/dist/translations/el.d.ts +2 -2
- package/dist/translations/el.js +2 -2
- package/dist/translations/el.umd.js +2 -2
- package/dist/translations/en-au.d.ts +2 -2
- package/dist/translations/en-au.js +2 -2
- package/dist/translations/en-au.umd.js +2 -2
- package/dist/translations/en-gb.d.ts +2 -2
- package/dist/translations/en-gb.js +2 -2
- package/dist/translations/en-gb.umd.js +2 -2
- package/dist/translations/en.d.ts +2 -2
- package/dist/translations/en.js +2 -2
- package/dist/translations/en.umd.js +2 -2
- package/dist/translations/eo.d.ts +2 -2
- package/dist/translations/eo.js +2 -2
- package/dist/translations/eo.umd.js +2 -2
- package/dist/translations/es-co.d.ts +2 -2
- package/dist/translations/es-co.js +2 -2
- package/dist/translations/es-co.umd.js +2 -2
- package/dist/translations/es.d.ts +2 -2
- package/dist/translations/es.js +2 -2
- package/dist/translations/es.umd.js +2 -2
- package/dist/translations/et.d.ts +2 -2
- package/dist/translations/et.js +2 -2
- package/dist/translations/et.umd.js +2 -2
- package/dist/translations/eu.d.ts +2 -2
- package/dist/translations/eu.js +2 -2
- package/dist/translations/eu.umd.js +2 -2
- package/dist/translations/fa.d.ts +2 -2
- package/dist/translations/fa.js +2 -2
- package/dist/translations/fa.umd.js +2 -2
- package/dist/translations/fi.d.ts +2 -2
- package/dist/translations/fi.js +2 -2
- package/dist/translations/fi.umd.js +2 -2
- package/dist/translations/fr.d.ts +2 -2
- package/dist/translations/fr.js +2 -2
- package/dist/translations/fr.umd.js +2 -2
- package/dist/translations/gl.d.ts +2 -2
- package/dist/translations/gl.js +2 -2
- package/dist/translations/gl.umd.js +2 -2
- package/dist/translations/gu.d.ts +2 -2
- package/dist/translations/gu.js +2 -2
- package/dist/translations/gu.umd.js +2 -2
- package/dist/translations/he.d.ts +2 -2
- package/dist/translations/he.js +2 -2
- package/dist/translations/he.umd.js +2 -2
- package/dist/translations/hi.d.ts +2 -2
- package/dist/translations/hi.js +2 -2
- package/dist/translations/hi.umd.js +2 -2
- package/dist/translations/hr.d.ts +2 -2
- package/dist/translations/hr.js +2 -2
- package/dist/translations/hr.umd.js +2 -2
- package/dist/translations/hu.d.ts +2 -2
- package/dist/translations/hu.js +2 -2
- package/dist/translations/hu.umd.js +2 -2
- package/dist/translations/hy.d.ts +2 -2
- package/dist/translations/hy.js +2 -2
- package/dist/translations/hy.umd.js +2 -2
- package/dist/translations/id.d.ts +2 -2
- package/dist/translations/id.js +2 -2
- package/dist/translations/id.umd.js +2 -2
- package/dist/translations/it.d.ts +2 -2
- package/dist/translations/it.js +2 -2
- package/dist/translations/it.umd.js +2 -2
- package/dist/translations/ja.d.ts +2 -2
- package/dist/translations/ja.js +2 -2
- package/dist/translations/ja.umd.js +2 -2
- package/dist/translations/jv.d.ts +2 -2
- package/dist/translations/jv.js +2 -2
- package/dist/translations/jv.umd.js +2 -2
- package/dist/translations/kk.d.ts +2 -2
- package/dist/translations/kk.js +2 -2
- package/dist/translations/kk.umd.js +2 -2
- package/dist/translations/km.d.ts +2 -2
- package/dist/translations/km.js +2 -2
- package/dist/translations/km.umd.js +2 -2
- package/dist/translations/kn.d.ts +2 -2
- package/dist/translations/kn.js +2 -2
- package/dist/translations/kn.umd.js +2 -2
- package/dist/translations/ko.d.ts +2 -2
- package/dist/translations/ko.js +2 -2
- package/dist/translations/ko.umd.js +2 -2
- package/dist/translations/ku.d.ts +2 -2
- package/dist/translations/ku.js +2 -2
- package/dist/translations/ku.umd.js +2 -2
- package/dist/translations/lt.d.ts +2 -2
- package/dist/translations/lt.js +2 -2
- package/dist/translations/lt.umd.js +2 -2
- package/dist/translations/lv.d.ts +2 -2
- package/dist/translations/lv.js +2 -2
- package/dist/translations/lv.umd.js +2 -2
- package/dist/translations/ms.d.ts +2 -2
- package/dist/translations/ms.js +2 -2
- package/dist/translations/ms.umd.js +2 -2
- package/dist/translations/nb.d.ts +2 -2
- package/dist/translations/nb.js +2 -2
- package/dist/translations/nb.umd.js +2 -2
- package/dist/translations/ne.d.ts +2 -2
- package/dist/translations/ne.js +2 -2
- package/dist/translations/ne.umd.js +2 -2
- package/dist/translations/nl.d.ts +2 -2
- package/dist/translations/nl.js +2 -2
- package/dist/translations/nl.umd.js +2 -2
- package/dist/translations/no.d.ts +2 -2
- package/dist/translations/no.js +2 -2
- package/dist/translations/no.umd.js +2 -2
- package/dist/translations/oc.d.ts +2 -2
- package/dist/translations/oc.js +2 -2
- package/dist/translations/oc.umd.js +2 -2
- package/dist/translations/pl.d.ts +2 -2
- package/dist/translations/pl.js +2 -2
- package/dist/translations/pl.umd.js +2 -2
- package/dist/translations/pt-br.d.ts +2 -2
- package/dist/translations/pt-br.js +2 -2
- package/dist/translations/pt-br.umd.js +2 -2
- package/dist/translations/pt.d.ts +2 -2
- package/dist/translations/pt.js +2 -2
- package/dist/translations/pt.umd.js +2 -2
- package/dist/translations/ro.d.ts +2 -2
- package/dist/translations/ro.js +2 -2
- package/dist/translations/ro.umd.js +2 -2
- package/dist/translations/ru.d.ts +2 -2
- package/dist/translations/ru.js +2 -2
- package/dist/translations/ru.umd.js +2 -2
- package/dist/translations/si.d.ts +2 -2
- package/dist/translations/si.js +2 -2
- package/dist/translations/si.umd.js +2 -2
- package/dist/translations/sk.d.ts +2 -2
- package/dist/translations/sk.js +2 -2
- package/dist/translations/sk.umd.js +2 -2
- package/dist/translations/sl.d.ts +2 -2
- package/dist/translations/sl.js +2 -2
- package/dist/translations/sl.umd.js +2 -2
- package/dist/translations/sq.d.ts +2 -2
- package/dist/translations/sq.js +2 -2
- package/dist/translations/sq.umd.js +2 -2
- package/dist/translations/sr-latn.d.ts +2 -2
- package/dist/translations/sr-latn.js +2 -2
- package/dist/translations/sr-latn.umd.js +2 -2
- package/dist/translations/sr.d.ts +2 -2
- package/dist/translations/sr.js +2 -2
- package/dist/translations/sr.umd.js +2 -2
- package/dist/translations/sv.d.ts +2 -2
- package/dist/translations/sv.js +2 -2
- package/dist/translations/sv.umd.js +2 -2
- package/dist/translations/th.d.ts +2 -2
- package/dist/translations/th.js +2 -2
- package/dist/translations/th.umd.js +2 -2
- package/dist/translations/ti.d.ts +2 -2
- package/dist/translations/ti.js +2 -2
- package/dist/translations/ti.umd.js +2 -2
- package/dist/translations/tk.d.ts +2 -2
- package/dist/translations/tk.js +2 -2
- package/dist/translations/tk.umd.js +2 -2
- package/dist/translations/tr.d.ts +2 -2
- package/dist/translations/tr.js +2 -2
- package/dist/translations/tr.umd.js +2 -2
- package/dist/translations/tt.d.ts +2 -2
- package/dist/translations/tt.js +2 -2
- package/dist/translations/tt.umd.js +2 -2
- package/dist/translations/ug.d.ts +2 -2
- package/dist/translations/ug.js +2 -2
- package/dist/translations/ug.umd.js +2 -2
- package/dist/translations/uk.d.ts +2 -2
- package/dist/translations/uk.js +2 -2
- package/dist/translations/uk.umd.js +2 -2
- package/dist/translations/ur.d.ts +2 -2
- package/dist/translations/ur.js +2 -2
- package/dist/translations/ur.umd.js +2 -2
- package/dist/translations/uz.d.ts +2 -2
- package/dist/translations/uz.js +2 -2
- package/dist/translations/uz.umd.js +2 -2
- package/dist/translations/vi.d.ts +2 -2
- package/dist/translations/vi.js +2 -2
- package/dist/translations/vi.umd.js +2 -2
- package/dist/translations/zh-cn.d.ts +2 -2
- package/dist/translations/zh-cn.js +2 -2
- package/dist/translations/zh-cn.umd.js +2 -2
- package/dist/translations/zh.d.ts +2 -2
- package/dist/translations/zh.js +2 -2
- package/dist/translations/zh.umd.js +2 -2
- package/lang/translations/af.po +1 -1
- package/lang/translations/ar.po +1 -1
- package/lang/translations/ast.po +1 -1
- package/lang/translations/az.po +1 -1
- package/lang/translations/bg.po +1 -1
- package/lang/translations/bn.po +1 -1
- package/lang/translations/bs.po +1 -1
- package/lang/translations/ca.po +1 -1
- package/lang/translations/cs.po +1 -1
- package/lang/translations/da.po +1 -1
- package/lang/translations/de-ch.po +1 -1
- package/lang/translations/de.po +1 -1
- package/lang/translations/el.po +1 -1
- package/lang/translations/en-au.po +1 -1
- package/lang/translations/en-gb.po +1 -1
- package/lang/translations/en.po +1 -1
- package/lang/translations/eo.po +1 -1
- package/lang/translations/es-co.po +1 -1
- package/lang/translations/es.po +1 -1
- package/lang/translations/et.po +1 -1
- package/lang/translations/eu.po +1 -1
- package/lang/translations/fa.po +1 -1
- package/lang/translations/fi.po +1 -1
- package/lang/translations/fr.po +1 -1
- package/lang/translations/gl.po +1 -1
- package/lang/translations/gu.po +1 -1
- package/lang/translations/he.po +1 -1
- package/lang/translations/hi.po +1 -1
- package/lang/translations/hr.po +1 -1
- package/lang/translations/hu.po +1 -1
- package/lang/translations/hy.po +1 -1
- package/lang/translations/id.po +1 -1
- package/lang/translations/it.po +1 -1
- package/lang/translations/ja.po +1 -1
- package/lang/translations/jv.po +1 -1
- package/lang/translations/kk.po +1 -1
- package/lang/translations/km.po +1 -1
- package/lang/translations/kn.po +1 -1
- package/lang/translations/ko.po +1 -1
- package/lang/translations/ku.po +1 -1
- package/lang/translations/lt.po +1 -1
- package/lang/translations/lv.po +1 -1
- package/lang/translations/ms.po +1 -1
- package/lang/translations/nb.po +1 -1
- package/lang/translations/ne.po +1 -1
- package/lang/translations/nl.po +1 -1
- package/lang/translations/no.po +1 -1
- package/lang/translations/oc.po +1 -1
- package/lang/translations/pl.po +1 -1
- package/lang/translations/pt-br.po +1 -1
- package/lang/translations/pt.po +1 -1
- package/lang/translations/ro.po +1 -1
- package/lang/translations/ru.po +1 -1
- package/lang/translations/si.po +1 -1
- package/lang/translations/sk.po +1 -1
- package/lang/translations/sl.po +1 -1
- package/lang/translations/sq.po +1 -1
- package/lang/translations/sr-latn.po +1 -1
- package/lang/translations/sr.po +1 -1
- package/lang/translations/sv.po +1 -1
- package/lang/translations/th.po +1 -1
- package/lang/translations/ti.po +1 -1
- package/lang/translations/tk.po +1 -1
- package/lang/translations/tr.po +1 -1
- package/lang/translations/tt.po +1 -1
- package/lang/translations/ug.po +1 -1
- package/lang/translations/uk.po +1 -1
- package/lang/translations/ur.po +1 -1
- package/lang/translations/uz.po +1 -1
- package/lang/translations/vi.po +1 -1
- package/lang/translations/zh-cn.po +1 -1
- package/lang/translations/zh.po +1 -1
- package/package.json +34 -10
- package/src/augmentation.d.ts +1 -1
- package/src/augmentation.js +1 -1
- package/src/autolink.d.ts +1 -1
- package/src/autolink.js +17 -7
- package/src/index.d.ts +1 -1
- package/src/index.js +1 -1
- package/src/link.d.ts +1 -1
- package/src/link.js +1 -1
- package/src/linkcommand.d.ts +1 -1
- package/src/linkcommand.js +1 -1
- package/src/linkconfig.d.ts +1 -1
- package/src/linkconfig.js +1 -1
- package/src/linkediting.d.ts +1 -1
- package/src/linkediting.js +1 -1
- package/src/linkimage.d.ts +1 -1
- package/src/linkimage.js +1 -1
- package/src/linkimageediting.d.ts +1 -1
- package/src/linkimageediting.js +1 -1
- package/src/linkimageui.d.ts +1 -1
- package/src/linkimageui.js +1 -1
- package/src/linkui.d.ts +1 -1
- package/src/linkui.js +1 -1
- package/src/ui/linkactionsview.d.ts +1 -1
- package/src/ui/linkactionsview.js +1 -1
- package/src/ui/linkformview.d.ts +1 -1
- package/src/ui/linkformview.js +1 -1
- package/src/unlinkcommand.d.ts +1 -1
- package/src/unlinkcommand.js +1 -1
- package/src/utils/automaticdecorators.d.ts +1 -1
- package/src/utils/automaticdecorators.js +1 -1
- package/src/utils/manualdecorator.d.ts +1 -1
- package/src/utils/manualdecorator.js +1 -1
- package/src/utils.d.ts +1 -1
- package/src/utils.js +1 -1
- package/theme/link.css +1 -1
- package/theme/linkactions.css +1 -1
- package/theme/linkform.css +1 -1
- package/theme/linkimage.css +1 -1
- package/dist/augmentation.d.ts +0 -34
- package/dist/autolink.d.ts +0 -83
- package/dist/index.d.ts +0 -25
- package/dist/link.d.ts +0 -35
- package/dist/linkcommand.d.ts +0 -136
- package/dist/linkconfig.d.ts +0 -294
- package/dist/linkediting.d.ts +0 -78
- package/dist/linkimage.d.ts +0 -35
- package/dist/linkimageediting.d.ts +0 -47
- package/dist/linkimageui.d.ts +0 -48
- package/dist/linkui.d.ts +0 -177
- package/dist/ui/linkactionsview.d.ts +0 -121
- package/dist/ui/linkformview.d.ts +0 -175
- package/dist/unlinkcommand.d.ts +0 -35
- package/dist/utils/automaticdecorators.d.ts +0 -49
- package/dist/utils/manualdecorator.d.ts +0 -76
- package/dist/utils.d.ts +0 -90
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
8
|
-
*/
|
|
9
|
-
/**
|
|
10
|
-
* @module link/ui/linkactionsview
|
|
11
|
-
*/
|
|
12
|
-
import { ButtonView, View } from 'ckeditor5/src/ui.js';
|
|
13
|
-
import { FocusTracker, KeystrokeHandler, type LocaleTranslate, type Locale } from 'ckeditor5/src/utils.js';
|
|
14
|
-
import '@ckeditor/ckeditor5-ui/theme/components/responsive-form/responsiveform.css';
|
|
15
|
-
import '../../theme/linkactions.css';
|
|
16
|
-
import type { LinkConfig } from '../linkconfig.js';
|
|
17
|
-
/**
|
|
18
|
-
* The link actions view class. This view displays the link preview, allows
|
|
19
|
-
* unlinking or editing the link.
|
|
20
|
-
*/
|
|
21
|
-
export default class LinkActionsView extends View {
|
|
22
|
-
/**
|
|
23
|
-
* Tracks information about DOM focus in the actions.
|
|
24
|
-
*/
|
|
25
|
-
readonly focusTracker: FocusTracker;
|
|
26
|
-
/**
|
|
27
|
-
* An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.
|
|
28
|
-
*/
|
|
29
|
-
readonly keystrokes: KeystrokeHandler;
|
|
30
|
-
/**
|
|
31
|
-
* The href preview view.
|
|
32
|
-
*/
|
|
33
|
-
previewButtonView: ButtonView;
|
|
34
|
-
/**
|
|
35
|
-
* The unlink button view.
|
|
36
|
-
*/
|
|
37
|
-
unlinkButtonView: ButtonView;
|
|
38
|
-
/**
|
|
39
|
-
* The edit link button view.
|
|
40
|
-
*/
|
|
41
|
-
editButtonView: ButtonView;
|
|
42
|
-
/**
|
|
43
|
-
* The value of the "href" attribute of the link to use in the {@link #previewButtonView}.
|
|
44
|
-
*
|
|
45
|
-
* @observable
|
|
46
|
-
*/
|
|
47
|
-
href: string | undefined;
|
|
48
|
-
/**
|
|
49
|
-
* A collection of views that can be focused in the view.
|
|
50
|
-
*/
|
|
51
|
-
private readonly _focusables;
|
|
52
|
-
/**
|
|
53
|
-
* Helps cycling over {@link #_focusables} in the view.
|
|
54
|
-
*/
|
|
55
|
-
private readonly _focusCycler;
|
|
56
|
-
private readonly _linkConfig;
|
|
57
|
-
private readonly _options?;
|
|
58
|
-
t: LocaleTranslate;
|
|
59
|
-
/**
|
|
60
|
-
* @inheritDoc
|
|
61
|
-
*/
|
|
62
|
-
constructor(locale: Locale, linkConfig?: LinkConfig, options?: LinkActionsViewOptions);
|
|
63
|
-
/**
|
|
64
|
-
* @inheritDoc
|
|
65
|
-
*/
|
|
66
|
-
render(): void;
|
|
67
|
-
/**
|
|
68
|
-
* @inheritDoc
|
|
69
|
-
*/
|
|
70
|
-
destroy(): void;
|
|
71
|
-
/**
|
|
72
|
-
* Focuses the fist {@link #_focusables} in the actions.
|
|
73
|
-
*/
|
|
74
|
-
focus(): void;
|
|
75
|
-
/**
|
|
76
|
-
* Creates a button view.
|
|
77
|
-
*
|
|
78
|
-
* @param label The button label.
|
|
79
|
-
* @param icon The button icon.
|
|
80
|
-
* @param eventName An event name that the `ButtonView#execute` event will be delegated to.
|
|
81
|
-
* @returns The button view instance.
|
|
82
|
-
*/
|
|
83
|
-
private _createButton;
|
|
84
|
-
/**
|
|
85
|
-
* Creates a link href preview button.
|
|
86
|
-
*
|
|
87
|
-
* @returns The button view instance.
|
|
88
|
-
*/
|
|
89
|
-
private _createPreviewButton;
|
|
90
|
-
}
|
|
91
|
-
/**
|
|
92
|
-
* Fired when the {@link ~LinkActionsView#editButtonView} is clicked.
|
|
93
|
-
*
|
|
94
|
-
* @eventName ~LinkActionsView#edit
|
|
95
|
-
*/
|
|
96
|
-
export type EditEvent = {
|
|
97
|
-
name: 'edit';
|
|
98
|
-
args: [];
|
|
99
|
-
};
|
|
100
|
-
/**
|
|
101
|
-
* Fired when the {@link ~LinkActionsView#unlinkButtonView} is clicked.
|
|
102
|
-
*
|
|
103
|
-
* @eventName ~LinkActionsView#unlink
|
|
104
|
-
*/
|
|
105
|
-
export type UnlinkEvent = {
|
|
106
|
-
name: 'unlink';
|
|
107
|
-
args: [];
|
|
108
|
-
};
|
|
109
|
-
/**
|
|
110
|
-
* The options that are passed to the {@link ~LinkActionsView#constructor} constructor.
|
|
111
|
-
*/
|
|
112
|
-
export type LinkActionsViewOptions = {
|
|
113
|
-
/**
|
|
114
|
-
* Returns `true` when bookmark `id` matches the hash from `link`.
|
|
115
|
-
*/
|
|
116
|
-
isScrollableToTarget: (href: string | undefined) => boolean;
|
|
117
|
-
/**
|
|
118
|
-
* Scrolls the view to the desired bookmark or open a link in new window.
|
|
119
|
-
*/
|
|
120
|
-
scrollToTarget: (href: string) => void;
|
|
121
|
-
};
|
|
@@ -1,175 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
8
|
-
*/
|
|
9
|
-
/**
|
|
10
|
-
* @module link/ui/linkformview
|
|
11
|
-
*/
|
|
12
|
-
import { ButtonView, LabeledFieldView, View, ViewCollection, type InputTextView } from 'ckeditor5/src/ui.js';
|
|
13
|
-
import { FocusTracker, KeystrokeHandler, type Locale } from 'ckeditor5/src/utils.js';
|
|
14
|
-
import type LinkCommand from '../linkcommand.js';
|
|
15
|
-
import '@ckeditor/ckeditor5-ui/theme/components/responsive-form/responsiveform.css';
|
|
16
|
-
import '../../theme/linkform.css';
|
|
17
|
-
/**
|
|
18
|
-
* The link form view controller class.
|
|
19
|
-
*
|
|
20
|
-
* See {@link module:link/ui/linkformview~LinkFormView}.
|
|
21
|
-
*/
|
|
22
|
-
export default class LinkFormView extends View {
|
|
23
|
-
/**
|
|
24
|
-
* Tracks information about DOM focus in the form.
|
|
25
|
-
*/
|
|
26
|
-
readonly focusTracker: FocusTracker;
|
|
27
|
-
/**
|
|
28
|
-
* An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.
|
|
29
|
-
*/
|
|
30
|
-
readonly keystrokes: KeystrokeHandler;
|
|
31
|
-
/**
|
|
32
|
-
* The URL input view.
|
|
33
|
-
*/
|
|
34
|
-
urlInputView: LabeledFieldView<InputTextView>;
|
|
35
|
-
/**
|
|
36
|
-
* The Save button view.
|
|
37
|
-
*/
|
|
38
|
-
saveButtonView: ButtonView;
|
|
39
|
-
/**
|
|
40
|
-
* The Cancel button view.
|
|
41
|
-
*/
|
|
42
|
-
cancelButtonView: ButtonView;
|
|
43
|
-
/**
|
|
44
|
-
* A collection of {@link module:ui/button/switchbuttonview~SwitchButtonView},
|
|
45
|
-
* which corresponds to {@link module:link/linkcommand~LinkCommand#manualDecorators manual decorators}
|
|
46
|
-
* configured in the editor.
|
|
47
|
-
*/
|
|
48
|
-
private readonly _manualDecoratorSwitches;
|
|
49
|
-
/**
|
|
50
|
-
* A collection of child views in the form.
|
|
51
|
-
*/
|
|
52
|
-
readonly children: ViewCollection;
|
|
53
|
-
/**
|
|
54
|
-
* An array of form validators used by {@link #isValid}.
|
|
55
|
-
*/
|
|
56
|
-
private readonly _validators;
|
|
57
|
-
/**
|
|
58
|
-
* A collection of views that can be focused in the form.
|
|
59
|
-
*/
|
|
60
|
-
private readonly _focusables;
|
|
61
|
-
/**
|
|
62
|
-
* Helps cycling over {@link #_focusables} in the form.
|
|
63
|
-
*/
|
|
64
|
-
private readonly _focusCycler;
|
|
65
|
-
/**
|
|
66
|
-
* Creates an instance of the {@link module:link/ui/linkformview~LinkFormView} class.
|
|
67
|
-
*
|
|
68
|
-
* Also see {@link #render}.
|
|
69
|
-
*
|
|
70
|
-
* @param locale The localization services instance.
|
|
71
|
-
* @param linkCommand Reference to {@link module:link/linkcommand~LinkCommand}.
|
|
72
|
-
* @param validators Form validators used by {@link #isValid}.
|
|
73
|
-
*/
|
|
74
|
-
constructor(locale: Locale, linkCommand: LinkCommand, validators: Array<LinkFormValidatorCallback>);
|
|
75
|
-
/**
|
|
76
|
-
* Obtains the state of the {@link module:ui/button/switchbuttonview~SwitchButtonView switch buttons} representing
|
|
77
|
-
* {@link module:link/linkcommand~LinkCommand#manualDecorators manual link decorators}
|
|
78
|
-
* in the {@link module:link/ui/linkformview~LinkFormView}.
|
|
79
|
-
*
|
|
80
|
-
* @returns Key-value pairs, where the key is the name of the decorator and the value is its state.
|
|
81
|
-
*/
|
|
82
|
-
getDecoratorSwitchesState(): Record<string, boolean>;
|
|
83
|
-
/**
|
|
84
|
-
* @inheritDoc
|
|
85
|
-
*/
|
|
86
|
-
render(): void;
|
|
87
|
-
/**
|
|
88
|
-
* @inheritDoc
|
|
89
|
-
*/
|
|
90
|
-
destroy(): void;
|
|
91
|
-
/**
|
|
92
|
-
* Focuses the fist {@link #_focusables} in the form.
|
|
93
|
-
*/
|
|
94
|
-
focus(): void;
|
|
95
|
-
/**
|
|
96
|
-
* Validates the form and returns `false` when some fields are invalid.
|
|
97
|
-
*/
|
|
98
|
-
isValid(): boolean;
|
|
99
|
-
/**
|
|
100
|
-
* Cleans up the supplementary error and information text of the {@link #urlInputView}
|
|
101
|
-
* bringing them back to the state when the form has been displayed for the first time.
|
|
102
|
-
*
|
|
103
|
-
* See {@link #isValid}.
|
|
104
|
-
*/
|
|
105
|
-
resetFormStatus(): void;
|
|
106
|
-
/**
|
|
107
|
-
* Creates a labeled input view.
|
|
108
|
-
*
|
|
109
|
-
* @returns Labeled field view instance.
|
|
110
|
-
*/
|
|
111
|
-
private _createUrlInput;
|
|
112
|
-
/**
|
|
113
|
-
* Creates a button view.
|
|
114
|
-
*
|
|
115
|
-
* @param label The button label.
|
|
116
|
-
* @param icon The button icon.
|
|
117
|
-
* @param className The additional button CSS class name.
|
|
118
|
-
* @param eventName An event name that the `ButtonView#execute` event will be delegated to.
|
|
119
|
-
* @returns The button view instance.
|
|
120
|
-
*/
|
|
121
|
-
private _createButton;
|
|
122
|
-
/**
|
|
123
|
-
* Populates {@link module:ui/viewcollection~ViewCollection} of {@link module:ui/button/switchbuttonview~SwitchButtonView}
|
|
124
|
-
* made based on {@link module:link/linkcommand~LinkCommand#manualDecorators}.
|
|
125
|
-
*
|
|
126
|
-
* @param linkCommand A reference to the link command.
|
|
127
|
-
* @returns ViewCollection of switch buttons.
|
|
128
|
-
*/
|
|
129
|
-
private _createManualDecoratorSwitches;
|
|
130
|
-
/**
|
|
131
|
-
* Populates the {@link #children} collection of the form.
|
|
132
|
-
*
|
|
133
|
-
* If {@link module:link/linkcommand~LinkCommand#manualDecorators manual decorators} are configured in the editor, it creates an
|
|
134
|
-
* additional `View` wrapping all {@link #_manualDecoratorSwitches} switch buttons corresponding
|
|
135
|
-
* to these decorators.
|
|
136
|
-
*
|
|
137
|
-
* @param manualDecorators A reference to
|
|
138
|
-
* the collection of manual decorators stored in the link command.
|
|
139
|
-
* @returns The children of link form view.
|
|
140
|
-
*/
|
|
141
|
-
private _createFormChildren;
|
|
142
|
-
/**
|
|
143
|
-
* The native DOM `value` of the {@link #urlInputView} element.
|
|
144
|
-
*
|
|
145
|
-
* **Note**: Do not confuse it with the {@link module:ui/inputtext/inputtextview~InputTextView#value}
|
|
146
|
-
* which works one way only and may not represent the actual state of the component in the DOM.
|
|
147
|
-
*/
|
|
148
|
-
get url(): string | null;
|
|
149
|
-
}
|
|
150
|
-
/**
|
|
151
|
-
* Callback used by {@link ~LinkFormView} to check if passed form value is valid.
|
|
152
|
-
*
|
|
153
|
-
* * If `undefined` is returned, it is assumed that the form value is correct and there is no error.
|
|
154
|
-
* * If string is returned, it is assumed that the form value is incorrect and the returned string is displayed in the error label
|
|
155
|
-
*/
|
|
156
|
-
export type LinkFormValidatorCallback = (form: LinkFormView) => string | undefined;
|
|
157
|
-
/**
|
|
158
|
-
* Fired when the form view is submitted (when one of the children triggered the submit event),
|
|
159
|
-
* for example with a click on {@link ~LinkFormView#saveButtonView}.
|
|
160
|
-
*
|
|
161
|
-
* @eventName ~LinkFormView#submit
|
|
162
|
-
*/
|
|
163
|
-
export type SubmitEvent = {
|
|
164
|
-
name: 'submit';
|
|
165
|
-
args: [];
|
|
166
|
-
};
|
|
167
|
-
/**
|
|
168
|
-
* Fired when the form view is canceled, for example with a click on {@link ~LinkFormView#cancelButtonView}.
|
|
169
|
-
*
|
|
170
|
-
* @eventName ~LinkFormView#cancel
|
|
171
|
-
*/
|
|
172
|
-
export type CancelEvent = {
|
|
173
|
-
name: 'cancel';
|
|
174
|
-
args: [];
|
|
175
|
-
};
|
package/dist/unlinkcommand.d.ts
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
8
|
-
*/
|
|
9
|
-
/**
|
|
10
|
-
* @module link/unlinkcommand
|
|
11
|
-
*/
|
|
12
|
-
import { Command } from 'ckeditor5/src/core.js';
|
|
13
|
-
/**
|
|
14
|
-
* The unlink command. It is used by the {@link module:link/link~Link link plugin}.
|
|
15
|
-
*/
|
|
16
|
-
export default class UnlinkCommand extends Command {
|
|
17
|
-
/**
|
|
18
|
-
* @inheritDoc
|
|
19
|
-
*/
|
|
20
|
-
refresh(): void;
|
|
21
|
-
/**
|
|
22
|
-
* Executes the command.
|
|
23
|
-
*
|
|
24
|
-
* When the selection is collapsed, it removes the `linkHref` attribute from each node with the same `linkHref` attribute value.
|
|
25
|
-
* When the selection is non-collapsed, it removes the `linkHref` attribute from each node in selected ranges.
|
|
26
|
-
*
|
|
27
|
-
* # Decorators
|
|
28
|
-
*
|
|
29
|
-
* If {@link module:link/linkconfig~LinkConfig#decorators `config.link.decorators`} is specified,
|
|
30
|
-
* all configured decorators are removed together with the `linkHref` attribute.
|
|
31
|
-
*
|
|
32
|
-
* @fires execute
|
|
33
|
-
*/
|
|
34
|
-
execute(): void;
|
|
35
|
-
}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
8
|
-
*/
|
|
9
|
-
/**
|
|
10
|
-
* @module link/utils/automaticdecorators
|
|
11
|
-
*/
|
|
12
|
-
import { type ArrayOrItem } from 'ckeditor5/src/utils.js';
|
|
13
|
-
import type { DowncastDispatcher } from 'ckeditor5/src/engine.js';
|
|
14
|
-
import type { NormalizedLinkDecoratorAutomaticDefinition } from '../utils.js';
|
|
15
|
-
/**
|
|
16
|
-
* Helper class that ties together all {@link module:link/linkconfig~LinkDecoratorAutomaticDefinition} and provides
|
|
17
|
-
* the {@link module:engine/conversion/downcasthelpers~DowncastHelpers#attributeToElement downcast dispatchers} for them.
|
|
18
|
-
*/
|
|
19
|
-
export default class AutomaticDecorators {
|
|
20
|
-
/**
|
|
21
|
-
* Stores the definition of {@link module:link/linkconfig~LinkDecoratorAutomaticDefinition automatic decorators}.
|
|
22
|
-
* This data is used as a source for a downcast dispatcher to create a proper conversion to output data.
|
|
23
|
-
*/
|
|
24
|
-
private _definitions;
|
|
25
|
-
/**
|
|
26
|
-
* Gives information about the number of decorators stored in the {@link module:link/utils/automaticdecorators~AutomaticDecorators}
|
|
27
|
-
* instance.
|
|
28
|
-
*/
|
|
29
|
-
get length(): number;
|
|
30
|
-
/**
|
|
31
|
-
* Adds automatic decorator objects or an array with them to be used during downcasting.
|
|
32
|
-
*
|
|
33
|
-
* @param item A configuration object of automatic rules for decorating links. It might also be an array of such objects.
|
|
34
|
-
*/
|
|
35
|
-
add(item: ArrayOrItem<NormalizedLinkDecoratorAutomaticDefinition>): void;
|
|
36
|
-
/**
|
|
37
|
-
* Provides the conversion helper used in the {@link module:engine/conversion/downcasthelpers~DowncastHelpers#add} method.
|
|
38
|
-
*
|
|
39
|
-
* @returns A dispatcher function used as conversion helper in {@link module:engine/conversion/downcasthelpers~DowncastHelpers#add}.
|
|
40
|
-
*/
|
|
41
|
-
getDispatcher(): (dispatcher: DowncastDispatcher) => void;
|
|
42
|
-
/**
|
|
43
|
-
* Provides the conversion helper used in the {@link module:engine/conversion/downcasthelpers~DowncastHelpers#add} method
|
|
44
|
-
* when linking images.
|
|
45
|
-
*
|
|
46
|
-
* @returns A dispatcher function used as conversion helper in {@link module:engine/conversion/downcasthelpers~DowncastHelpers#add}.
|
|
47
|
-
*/
|
|
48
|
-
getDispatcherForLinkedImage(): (dispatcher: DowncastDispatcher) => void;
|
|
49
|
-
}
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
8
|
-
*/
|
|
9
|
-
/**
|
|
10
|
-
* @module link/utils/manualdecorator
|
|
11
|
-
*/
|
|
12
|
-
import { type ArrayOrItem } from 'ckeditor5/src/utils.js';
|
|
13
|
-
import type { MatcherObjectPattern } from 'ckeditor5/src/engine.js';
|
|
14
|
-
import type { NormalizedLinkDecoratorManualDefinition } from '../utils.js';
|
|
15
|
-
declare const ManualDecorator_base: {
|
|
16
|
-
new (): import("ckeditor5/src/utils.js").Observable;
|
|
17
|
-
prototype: import("ckeditor5/src/utils.js").Observable;
|
|
18
|
-
};
|
|
19
|
-
/**
|
|
20
|
-
* Helper class that stores manual decorators with observable {@link module:link/utils/manualdecorator~ManualDecorator#value}
|
|
21
|
-
* to support integration with the UI state. An instance of this class is a model with the state of individual manual decorators.
|
|
22
|
-
* These decorators are kept as collections in {@link module:link/linkcommand~LinkCommand#manualDecorators}.
|
|
23
|
-
*/
|
|
24
|
-
export default class ManualDecorator extends /* #__PURE__ */ ManualDecorator_base {
|
|
25
|
-
/**
|
|
26
|
-
* An ID of a manual decorator which is the name of the attribute in the model, for example: 'linkManualDecorator0'.
|
|
27
|
-
*/
|
|
28
|
-
id: string;
|
|
29
|
-
/**
|
|
30
|
-
* The value of the current manual decorator. It reflects its state from the UI.
|
|
31
|
-
*
|
|
32
|
-
* @observable
|
|
33
|
-
*/
|
|
34
|
-
value: boolean | undefined;
|
|
35
|
-
/**
|
|
36
|
-
* The default value of manual decorator.
|
|
37
|
-
*/
|
|
38
|
-
defaultValue?: boolean;
|
|
39
|
-
/**
|
|
40
|
-
* The label used in the user interface to toggle the manual decorator.
|
|
41
|
-
*/
|
|
42
|
-
label: string;
|
|
43
|
-
/**
|
|
44
|
-
* A set of attributes added to downcasted data when the decorator is activated for a specific link.
|
|
45
|
-
* Attributes should be added in a form of attributes defined in {@link module:engine/view/elementdefinition~ElementDefinition}.
|
|
46
|
-
*/
|
|
47
|
-
attributes?: Record<string, string>;
|
|
48
|
-
/**
|
|
49
|
-
* A set of classes added to downcasted data when the decorator is activated for a specific link.
|
|
50
|
-
* Classes should be added in a form of classes defined in {@link module:engine/view/elementdefinition~ElementDefinition}.
|
|
51
|
-
*/
|
|
52
|
-
classes?: ArrayOrItem<string>;
|
|
53
|
-
/**
|
|
54
|
-
* A set of styles added to downcasted data when the decorator is activated for a specific link.
|
|
55
|
-
* Styles should be added in a form of styles defined in {@link module:engine/view/elementdefinition~ElementDefinition}.
|
|
56
|
-
*/
|
|
57
|
-
styles?: Record<string, string>;
|
|
58
|
-
/**
|
|
59
|
-
* Creates a new instance of {@link module:link/utils/manualdecorator~ManualDecorator}.
|
|
60
|
-
*
|
|
61
|
-
* @param config.id The name of the attribute used in the model that represents a given manual decorator.
|
|
62
|
-
* For example: `'linkIsExternal'`.
|
|
63
|
-
* @param config.label The label used in the user interface to toggle the manual decorator.
|
|
64
|
-
* @param config.attributes A set of attributes added to output data when the decorator is active for a specific link.
|
|
65
|
-
* Attributes should keep the format of attributes defined in {@link module:engine/view/elementdefinition~ElementDefinition}.
|
|
66
|
-
* @param [config.defaultValue] Controls whether the decorator is "on" by default.
|
|
67
|
-
*/
|
|
68
|
-
constructor({ id, label, attributes, classes, styles, defaultValue }: NormalizedLinkDecoratorManualDefinition);
|
|
69
|
-
/**
|
|
70
|
-
* Returns {@link module:engine/view/matcher~MatcherPattern} with decorator attributes.
|
|
71
|
-
*
|
|
72
|
-
* @internal
|
|
73
|
-
*/
|
|
74
|
-
_createPattern(): MatcherObjectPattern;
|
|
75
|
-
}
|
|
76
|
-
export {};
|
package/dist/utils.d.ts
DELETED
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
8
|
-
*/
|
|
9
|
-
/**
|
|
10
|
-
* @module link/utils
|
|
11
|
-
*/
|
|
12
|
-
import type { DowncastConversionApi, Element, Schema, ViewAttributeElement, ViewNode, ViewDocumentFragment } from 'ckeditor5/src/engine.js';
|
|
13
|
-
import type { Editor } from 'ckeditor5/src/core.js';
|
|
14
|
-
import type { LocaleTranslate } from 'ckeditor5/src/utils.js';
|
|
15
|
-
import type { LinkDecoratorAutomaticDefinition, LinkDecoratorDefinition, LinkDecoratorManualDefinition } from './linkconfig.js';
|
|
16
|
-
import type { LinkActionsViewOptions } from './ui/linkactionsview.js';
|
|
17
|
-
/**
|
|
18
|
-
* A keystroke used by the {@link module:link/linkui~LinkUI link UI feature}.
|
|
19
|
-
*/
|
|
20
|
-
export declare const LINK_KEYSTROKE = "Ctrl+K";
|
|
21
|
-
/**
|
|
22
|
-
* Returns `true` if a given view node is the link element.
|
|
23
|
-
*/
|
|
24
|
-
export declare function isLinkElement(node: ViewNode | ViewDocumentFragment): boolean;
|
|
25
|
-
/**
|
|
26
|
-
* Creates a link {@link module:engine/view/attributeelement~AttributeElement} with the provided `href` attribute.
|
|
27
|
-
*/
|
|
28
|
-
export declare function createLinkElement(href: string, { writer }: DowncastConversionApi): ViewAttributeElement;
|
|
29
|
-
/**
|
|
30
|
-
* Returns a safe URL based on a given value.
|
|
31
|
-
*
|
|
32
|
-
* A URL is considered safe if it is safe for the user (does not contain any malicious code).
|
|
33
|
-
*
|
|
34
|
-
* If a URL is considered unsafe, a simple `"#"` is returned.
|
|
35
|
-
*
|
|
36
|
-
* @internal
|
|
37
|
-
*/
|
|
38
|
-
export declare function ensureSafeUrl(url: unknown, allowedProtocols?: Array<string>): string;
|
|
39
|
-
/**
|
|
40
|
-
* Returns the {@link module:link/linkconfig~LinkConfig#decorators `config.link.decorators`} configuration processed
|
|
41
|
-
* to respect the locale of the editor, i.e. to display the {@link module:link/linkconfig~LinkDecoratorManualDefinition label}
|
|
42
|
-
* in the correct language.
|
|
43
|
-
*
|
|
44
|
-
* **Note**: Only the few most commonly used labels are translated automatically. Other labels should be manually
|
|
45
|
-
* translated in the {@link module:link/linkconfig~LinkConfig#decorators `config.link.decorators`} configuration.
|
|
46
|
-
*
|
|
47
|
-
* @param t Shorthand for {@link module:utils/locale~Locale#t Locale#t}.
|
|
48
|
-
* @param decorators The decorator reference where the label values should be localized.
|
|
49
|
-
*/
|
|
50
|
-
export declare function getLocalizedDecorators(t: LocaleTranslate, decorators: Array<NormalizedLinkDecoratorDefinition>): Array<NormalizedLinkDecoratorDefinition>;
|
|
51
|
-
/**
|
|
52
|
-
* Converts an object with defined decorators to a normalized array of decorators. The `id` key is added for each decorator and
|
|
53
|
-
* is used as the attribute's name in the model.
|
|
54
|
-
*/
|
|
55
|
-
export declare function normalizeDecorators(decorators?: Record<string, LinkDecoratorDefinition>): Array<NormalizedLinkDecoratorDefinition>;
|
|
56
|
-
/**
|
|
57
|
-
* Returns `true` if the specified `element` can be linked (the element allows the `linkHref` attribute).
|
|
58
|
-
*/
|
|
59
|
-
export declare function isLinkableElement(element: Element | null, schema: Schema): element is Element;
|
|
60
|
-
/**
|
|
61
|
-
* Returns `true` if the specified `value` is an email.
|
|
62
|
-
*/
|
|
63
|
-
export declare function isEmail(value: string): boolean;
|
|
64
|
-
/**
|
|
65
|
-
* Adds the protocol prefix to the specified `link` when:
|
|
66
|
-
*
|
|
67
|
-
* * it does not contain it already, and there is a {@link module:link/linkconfig~LinkConfig#defaultProtocol `defaultProtocol` }
|
|
68
|
-
* configuration value provided,
|
|
69
|
-
* * or the link is an email address.
|
|
70
|
-
*/
|
|
71
|
-
export declare function addLinkProtocolIfApplicable(link: string, defaultProtocol?: string): string;
|
|
72
|
-
/**
|
|
73
|
-
* Checks if protocol is already included in the link.
|
|
74
|
-
*/
|
|
75
|
-
export declare function linkHasProtocol(link: string): boolean;
|
|
76
|
-
/**
|
|
77
|
-
* Opens the link in a new browser tab.
|
|
78
|
-
*/
|
|
79
|
-
export declare function openLink(link: string): void;
|
|
80
|
-
/**
|
|
81
|
-
* Creates the bookmark callbacks for handling link opening experience.
|
|
82
|
-
*/
|
|
83
|
-
export declare function createBookmarkCallbacks(editor: Editor): LinkActionsViewOptions;
|
|
84
|
-
export type NormalizedLinkDecoratorAutomaticDefinition = LinkDecoratorAutomaticDefinition & {
|
|
85
|
-
id: string;
|
|
86
|
-
};
|
|
87
|
-
export type NormalizedLinkDecoratorManualDefinition = LinkDecoratorManualDefinition & {
|
|
88
|
-
id: string;
|
|
89
|
-
};
|
|
90
|
-
export type NormalizedLinkDecoratorDefinition = NormalizedLinkDecoratorAutomaticDefinition | NormalizedLinkDecoratorManualDefinition;
|