@progress/kendo-vue-editor 2.7.1-dev.202112201220 → 2.7.2
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/dist/es/Editor.d.ts +295 -0
- package/dist/es/Editor.js +697 -0
- package/dist/es/EditorProps.d.ts +176 -0
- package/dist/es/EditorProps.js +0 -0
- package/dist/es/additionalTypes.ts +3 -0
- package/dist/es/config/defaultStyles.d.ts +12 -0
- package/dist/es/config/defaultStyles.js +12 -0
- package/dist/es/config/pasteSettings.d.ts +6 -0
- package/dist/es/config/pasteSettings.js +0 -0
- package/dist/es/config/schema.d.ts +8 -0
- package/dist/es/config/schema.js +51 -0
- package/dist/es/config/shortcuts.d.ts +22 -0
- package/dist/es/config/shortcuts.js +70 -0
- package/dist/es/config/toolsSettings.d.ts +481 -0
- package/dist/es/config/toolsSettings.js +523 -0
- package/dist/es/dialogs/EditorDialogProps.d.ts +26 -0
- package/dist/es/dialogs/EditorDialogProps.js +0 -0
- package/dist/es/dialogs/FindReplace.d.ts +65 -0
- package/dist/es/dialogs/FindReplace.js +789 -0
- package/dist/es/dialogs/insertImage.d.ts +52 -0
- package/dist/es/dialogs/insertImage.js +282 -0
- package/dist/es/dialogs/insertLink.d.ts +50 -0
- package/dist/es/dialogs/insertLink.js +286 -0
- package/dist/es/dialogs/main.d.ts +1 -0
- package/dist/es/dialogs/main.js +42 -0
- package/dist/es/dialogs/viewHtml.d.ts +49 -0
- package/dist/es/dialogs/viewHtml.js +144 -0
- package/dist/es/main.d.ts +166 -1
- package/dist/es/main.js +110 -0
- package/dist/es/messages/index.d.ts +479 -0
- package/dist/es/messages/index.js +485 -0
- package/dist/es/package-metadata.d.ts +5 -0
- package/dist/es/package-metadata.js +11 -0
- package/dist/es/tools/Align.d.ts +37 -0
- package/dist/es/tools/Align.js +116 -0
- package/dist/es/tools/Indent.d.ts +42 -0
- package/dist/es/tools/Indent.js +127 -0
- package/dist/es/tools/InlineFormat.d.ts +72 -0
- package/dist/es/tools/InlineFormat.js +125 -0
- package/dist/es/tools/Outdent.d.ts +42 -0
- package/dist/es/tools/Outdent.js +129 -0
- package/dist/es/tools/ToolProps.d.ts +34 -0
- package/dist/es/tools/ToolProps.js +0 -0
- package/dist/es/tools/applyColor.d.ts +43 -0
- package/dist/es/tools/applyColor.js +92 -0
- package/dist/es/tools/cleanFormatting.d.ts +47 -0
- package/dist/es/tools/cleanFormatting.js +114 -0
- package/dist/es/tools/findReplace.d.ts +41 -0
- package/dist/es/tools/findReplace.js +119 -0
- package/dist/es/tools/fontStyle.d.ts +53 -0
- package/dist/es/tools/fontStyle.js +158 -0
- package/dist/es/tools/formatBlock.d.ts +43 -0
- package/dist/es/tools/formatBlock.js +150 -0
- package/dist/es/tools/history.d.ts +18 -0
- package/dist/es/tools/history.js +4 -0
- package/dist/es/tools/insertImage.d.ts +44 -0
- package/dist/es/tools/insertImage.js +130 -0
- package/dist/es/tools/insertLink.d.ts +44 -0
- package/dist/es/tools/insertLink.js +130 -0
- package/dist/es/tools/insertTable/index.d.ts +1 -0
- package/dist/es/tools/insertTable/index.js +6 -0
- package/dist/es/tools/insertTable/popup.d.ts +78 -0
- package/dist/es/tools/insertTable/popup.js +168 -0
- package/dist/es/tools/insertTable/popupGrid.d.ts +49 -0
- package/dist/es/tools/insertTable/popupGrid.js +131 -0
- package/dist/es/tools/insertTable/tool.d.ts +51 -0
- package/dist/es/tools/insertTable/tool.js +165 -0
- package/dist/es/tools/lists.d.ts +52 -0
- package/dist/es/tools/lists.js +132 -0
- package/dist/es/tools/main.d.ts +137 -0
- package/dist/es/tools/main.js +0 -0
- package/dist/es/tools/pdf.d.ts +56 -0
- package/dist/es/tools/pdf.js +105 -0
- package/dist/es/tools/print.d.ts +47 -0
- package/dist/es/tools/print.js +109 -0
- package/dist/es/tools/proseMirrorTool.d.ts +43 -0
- package/dist/es/tools/proseMirrorTool.js +110 -0
- package/dist/es/tools/selectAll.d.ts +47 -0
- package/dist/es/tools/selectAll.js +102 -0
- package/dist/es/tools/tableEdit.d.ts +51 -0
- package/dist/es/tools/tableEdit.js +42 -0
- package/dist/es/tools/unlink.d.ts +42 -0
- package/dist/es/tools/unlink.js +110 -0
- package/dist/es/tools/utils.d.ts +18 -0
- package/dist/es/tools/utils.js +36 -0
- package/dist/es/tools/viewHtml.d.ts +49 -0
- package/dist/es/tools/viewHtml.js +125 -0
- package/dist/es/utils/browser-detection.d.ts +4 -0
- package/dist/es/utils/browser-detection.js +5 -0
- package/dist/es/utils/controlled-value.d.ts +5 -0
- package/dist/es/utils/controlled-value.js +31 -0
- package/dist/es/utils/index.d.ts +358 -0
- package/dist/es/utils/index.js +422 -0
- package/dist/es/utils/props-key.d.ts +5 -0
- package/dist/es/utils/props-key.js +5 -0
- package/dist/npm/Editor.d.ts +295 -0
- package/dist/npm/Editor.js +738 -0
- package/dist/npm/EditorProps.d.ts +176 -0
- package/dist/npm/EditorProps.js +2 -0
- package/dist/npm/additionalTypes.ts +3 -0
- package/dist/npm/config/defaultStyles.d.ts +12 -0
- package/dist/npm/config/defaultStyles.js +15 -0
- package/dist/npm/config/pasteSettings.d.ts +6 -0
- package/dist/npm/config/pasteSettings.js +2 -0
- package/dist/npm/config/schema.d.ts +8 -0
- package/dist/npm/config/schema.js +55 -0
- package/dist/npm/config/shortcuts.d.ts +22 -0
- package/dist/npm/config/shortcuts.js +79 -0
- package/dist/npm/config/toolsSettings.d.ts +481 -0
- package/dist/npm/config/toolsSettings.js +526 -0
- package/dist/npm/dialogs/EditorDialogProps.d.ts +26 -0
- package/dist/npm/dialogs/EditorDialogProps.js +2 -0
- package/dist/npm/dialogs/FindReplace.d.ts +65 -0
- package/dist/npm/dialogs/FindReplace.js +805 -0
- package/dist/npm/dialogs/insertImage.d.ts +52 -0
- package/dist/npm/dialogs/insertImage.js +296 -0
- package/dist/npm/dialogs/insertLink.d.ts +50 -0
- package/dist/npm/dialogs/insertLink.js +300 -0
- package/dist/npm/dialogs/main.d.ts +1 -0
- package/dist/npm/dialogs/main.js +42 -0
- package/dist/npm/dialogs/viewHtml.d.ts +49 -0
- package/dist/npm/dialogs/viewHtml.js +159 -0
- package/dist/npm/main.d.ts +166 -1
- package/dist/npm/main.js +89 -0
- package/dist/npm/messages/index.d.ts +479 -0
- package/dist/npm/messages/index.js +488 -0
- package/dist/npm/package-metadata.d.ts +5 -0
- package/dist/npm/package-metadata.js +14 -0
- package/dist/npm/tools/Align.d.ts +37 -0
- package/dist/npm/tools/Align.js +130 -0
- package/dist/npm/tools/Indent.d.ts +42 -0
- package/dist/npm/tools/Indent.js +140 -0
- package/dist/npm/tools/InlineFormat.d.ts +72 -0
- package/dist/npm/tools/InlineFormat.js +138 -0
- package/dist/npm/tools/Outdent.d.ts +42 -0
- package/dist/npm/tools/Outdent.js +142 -0
- package/dist/npm/tools/ToolProps.d.ts +34 -0
- package/dist/npm/tools/ToolProps.js +2 -0
- package/dist/npm/tools/applyColor.d.ts +43 -0
- package/dist/npm/tools/applyColor.js +105 -0
- package/dist/npm/tools/cleanFormatting.d.ts +47 -0
- package/dist/npm/tools/cleanFormatting.js +128 -0
- package/dist/npm/tools/findReplace.d.ts +41 -0
- package/dist/npm/tools/findReplace.js +133 -0
- package/dist/npm/tools/fontStyle.d.ts +53 -0
- package/dist/npm/tools/fontStyle.js +172 -0
- package/dist/npm/tools/formatBlock.d.ts +43 -0
- package/dist/npm/tools/formatBlock.js +164 -0
- package/dist/npm/tools/history.d.ts +18 -0
- package/dist/npm/tools/history.js +10 -0
- package/dist/npm/tools/insertImage.d.ts +44 -0
- package/dist/npm/tools/insertImage.js +144 -0
- package/dist/npm/tools/insertLink.d.ts +44 -0
- package/dist/npm/tools/insertLink.js +144 -0
- package/dist/npm/tools/insertTable/index.d.ts +1 -0
- package/dist/npm/tools/insertTable/index.js +6 -0
- package/dist/npm/tools/insertTable/popup.d.ts +78 -0
- package/dist/npm/tools/insertTable/popup.js +179 -0
- package/dist/npm/tools/insertTable/popupGrid.d.ts +49 -0
- package/dist/npm/tools/insertTable/popupGrid.js +141 -0
- package/dist/npm/tools/insertTable/tool.d.ts +51 -0
- package/dist/npm/tools/insertTable/tool.js +180 -0
- package/dist/npm/tools/lists.d.ts +52 -0
- package/dist/npm/tools/lists.js +145 -0
- package/dist/npm/tools/main.d.ts +137 -0
- package/dist/npm/tools/main.js +5 -0
- package/dist/npm/tools/pdf.d.ts +56 -0
- package/dist/npm/tools/pdf.js +119 -0
- package/dist/npm/tools/print.d.ts +47 -0
- package/dist/npm/tools/print.js +122 -0
- package/dist/npm/tools/proseMirrorTool.d.ts +43 -0
- package/dist/npm/tools/proseMirrorTool.js +123 -0
- package/dist/npm/tools/selectAll.d.ts +47 -0
- package/dist/npm/tools/selectAll.js +116 -0
- package/dist/npm/tools/tableEdit.d.ts +51 -0
- package/dist/npm/tools/tableEdit.js +50 -0
- package/dist/npm/tools/unlink.d.ts +42 -0
- package/dist/npm/tools/unlink.js +123 -0
- package/dist/npm/tools/utils.d.ts +18 -0
- package/dist/npm/tools/utils.js +45 -0
- package/dist/npm/tools/viewHtml.d.ts +49 -0
- package/dist/npm/tools/viewHtml.js +138 -0
- package/dist/npm/utils/browser-detection.d.ts +4 -0
- package/dist/npm/utils/browser-detection.js +8 -0
- package/dist/npm/utils/controlled-value.d.ts +5 -0
- package/dist/npm/utils/controlled-value.js +34 -0
- package/dist/npm/utils/index.d.ts +358 -0
- package/dist/npm/utils/index.js +425 -0
- package/dist/npm/utils/props-key.d.ts +5 -0
- package/dist/npm/utils/props-key.js +8 -0
- package/package.json +20 -20
- package/dist/cdn/js/kendo-vue-editor.js +0 -1
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
// import { InsertLinkDialog as LinkDialog, InsertLinkDialogProps as LinkDialogProps } from './insertLink';
|
|
2
|
+
// import { InsertImageDialog as ImageDialog, InsertImageDialogProps as ImageDialogProps } from './insertImage';
|
|
3
|
+
// import { ViewHtmlDialog as ViewHtmlDialogX, ViewHtmlDialogProps as ViewHtmlDialogPropsX } from './viewHtml';
|
|
4
|
+
// import { FindAndReplaceDialog as FindAndReplaceDialogX,
|
|
5
|
+
// FindAndReplaceDialogProps as FindAndReplaceDialogPropsX } from './FindReplace';
|
|
6
|
+
// /**
|
|
7
|
+
// * Represents a wrapping namespace for the dialog components and props of the Editor.
|
|
8
|
+
// */
|
|
9
|
+
// export namespace EditorDialogs {
|
|
10
|
+
// /**
|
|
11
|
+
// * The InsertLinkDialog component.
|
|
12
|
+
// */
|
|
13
|
+
// export class InsertLinkDialog extends LinkDialog { }
|
|
14
|
+
// /**
|
|
15
|
+
// * The props for the InsertLinkDialog component.
|
|
16
|
+
// */
|
|
17
|
+
// export interface InsertLinkDialogProps extends LinkDialogProps { }
|
|
18
|
+
// /**
|
|
19
|
+
// * The InsertImageDialog component.
|
|
20
|
+
// */
|
|
21
|
+
// export class InsertImageDialog extends ImageDialog { }
|
|
22
|
+
// /**
|
|
23
|
+
// * The props for the InsertImageDialog component.
|
|
24
|
+
// */
|
|
25
|
+
// export interface InsertImageDialogProps extends ImageDialogProps { }
|
|
26
|
+
// /**
|
|
27
|
+
// * The ViewHtmlDialog component.
|
|
28
|
+
// */
|
|
29
|
+
// export class ViewHtmlDialog extends ViewHtmlDialogX { }
|
|
30
|
+
// /**
|
|
31
|
+
// * The props for the ViewHtmlDialog component.
|
|
32
|
+
// */
|
|
33
|
+
// export interface ViewHtmlDialogProps extends ViewHtmlDialogPropsX { }
|
|
34
|
+
// /**
|
|
35
|
+
// * The FindAndReplaceDialog component.
|
|
36
|
+
// */
|
|
37
|
+
// export class FindAndReplaceDialog extends FindAndReplaceDialogX { }
|
|
38
|
+
// /**
|
|
39
|
+
// * The props for the FindAndReplaceDialog component.
|
|
40
|
+
// */
|
|
41
|
+
// export interface FindAndReplaceDialogProps extends FindAndReplaceDialogPropsX { }
|
|
42
|
+
// }
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { DefineComponent } from '../additionalTypes';
|
|
2
|
+
import { RecordPropsDefinition, ComponentOptions } from 'vue/types/options';
|
|
3
|
+
declare type DefaultData<V> = object | ((this: V) => {});
|
|
4
|
+
declare type DefaultMethods<V> = {
|
|
5
|
+
[key: string]: (this: V, ...args: any[]) => any;
|
|
6
|
+
};
|
|
7
|
+
import { EditorToolsSettings } from '../config/toolsSettings';
|
|
8
|
+
import { EditorDialogProps } from './EditorDialogProps';
|
|
9
|
+
/**
|
|
10
|
+
* @hidden
|
|
11
|
+
*/
|
|
12
|
+
export interface ViewHtmlDialogProps extends EditorDialogProps {
|
|
13
|
+
/**
|
|
14
|
+
* The `ViewHtmlSettings` object.
|
|
15
|
+
*/
|
|
16
|
+
settings: EditorToolsSettings.ViewHtmlSettings;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* @hidden
|
|
20
|
+
*/
|
|
21
|
+
export interface ViewHtmlDialogState {
|
|
22
|
+
htmlArea: HTMLTextAreaElement | null;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* @hidden
|
|
26
|
+
*/
|
|
27
|
+
export interface ViewHtmlDialogComputed {
|
|
28
|
+
[key: string]: any;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* @hidden
|
|
32
|
+
*/
|
|
33
|
+
export interface ViewHtmlDialogMethods {
|
|
34
|
+
[key: string]: any;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* @hidden
|
|
38
|
+
*/
|
|
39
|
+
export interface ViewHtmlDialogData {
|
|
40
|
+
currentActive: boolean;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* @hidden
|
|
44
|
+
*/
|
|
45
|
+
export interface ViewHtmlDialogAll extends Vue, ViewHtmlDialogMethods, ViewHtmlDialogData, ViewHtmlDialogComputed, ViewHtmlDialogState {
|
|
46
|
+
}
|
|
47
|
+
declare let ViewHtmlDialog: ComponentOptions<ViewHtmlDialogAll, DefaultData<ViewHtmlDialogData>, DefaultMethods<ViewHtmlDialogAll>, ViewHtmlDialogComputed, RecordPropsDefinition<ViewHtmlDialogProps>>;
|
|
48
|
+
declare const ViewHtmlDialogVue3: DefineComponent<ViewHtmlDialogProps, any, ViewHtmlDialogData, ViewHtmlDialogComputed, ViewHtmlDialogMethods, {}, {}, {}, string, ViewHtmlDialogProps, ViewHtmlDialogProps, {}>;
|
|
49
|
+
export { ViewHtmlDialog, ViewHtmlDialogVue3 };
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
// @ts-ignore
|
|
2
|
+
import * as Vue from 'vue';
|
|
3
|
+
var allVue = Vue;
|
|
4
|
+
var gh = allVue.h;
|
|
5
|
+
import { Dialog, DialogActionsBar } from '@progress/kendo-vue-dialogs';
|
|
6
|
+
import { Button as KButton } from '@progress/kendo-vue-buttons';
|
|
7
|
+
import { getHtml, setHtml, indentHtml, trimWhitespace } from '@progress/kendo-editor-common';
|
|
8
|
+
import { provideLocalizationService } from '@progress/kendo-vue-intl';
|
|
9
|
+
import { messages } from './../messages';
|
|
10
|
+
import { editorPropsKey } from './../utils/props-key'; // tslint:enable:max-line-length
|
|
11
|
+
|
|
12
|
+
var ViewHtmlDialog = {
|
|
13
|
+
name: 'KendoViewHtmlDialog',
|
|
14
|
+
props: {
|
|
15
|
+
view: Object,
|
|
16
|
+
settings: Object,
|
|
17
|
+
dir: String
|
|
18
|
+
},
|
|
19
|
+
inject: {
|
|
20
|
+
kendoLocalizationService: {
|
|
21
|
+
default: null
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
mounted: function mounted() {
|
|
25
|
+
this.htmlArea = this.v3 ? this.htmlAreaRef : this.$refs.htmlArea;
|
|
26
|
+
},
|
|
27
|
+
// @ts-ignore
|
|
28
|
+
setup: !gh ? undefined : function () {
|
|
29
|
+
var v3 = !!gh;
|
|
30
|
+
return {
|
|
31
|
+
v3: v3
|
|
32
|
+
};
|
|
33
|
+
},
|
|
34
|
+
// @ts-ignore
|
|
35
|
+
render: function render(createElement) {
|
|
36
|
+
var _this2 = this;
|
|
37
|
+
|
|
38
|
+
var _this = this;
|
|
39
|
+
|
|
40
|
+
var h = gh || createElement;
|
|
41
|
+
var _a = this.$props,
|
|
42
|
+
view = _a.view,
|
|
43
|
+
settings = _a.settings,
|
|
44
|
+
dir = _a.dir;
|
|
45
|
+
var localization = provideLocalizationService(this);
|
|
46
|
+
var _b = settings.messages,
|
|
47
|
+
viewHtmlDialogTitle = _b.viewHtmlDialogTitle,
|
|
48
|
+
viewHtmlCancel = _b.viewHtmlCancel,
|
|
49
|
+
viewHtmlUpdate = _b.viewHtmlUpdate;
|
|
50
|
+
var content = h("textarea", {
|
|
51
|
+
"class": "k-textarea k-editor-textarea",
|
|
52
|
+
style: {
|
|
53
|
+
height: '280px',
|
|
54
|
+
width: '490px'
|
|
55
|
+
},
|
|
56
|
+
ref: this.v3 ? function (el) {
|
|
57
|
+
_this.htmlAreaRef = el;
|
|
58
|
+
} : 'htmlArea',
|
|
59
|
+
value: this.v3 ? indentHtml(getHtml(view.state)) : null,
|
|
60
|
+
domProps: this.v3 ? undefined : {
|
|
61
|
+
"value": indentHtml(getHtml(view.state))
|
|
62
|
+
},
|
|
63
|
+
autoFocus: true,
|
|
64
|
+
attrs: this.v3 ? undefined : {
|
|
65
|
+
autoFocus: true
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
var actionButtons = [// @ts-ignore function children
|
|
69
|
+
h(KButton, {
|
|
70
|
+
onClick: this.onClose,
|
|
71
|
+
on: this.v3 ? undefined : {
|
|
72
|
+
"click": this.onClose
|
|
73
|
+
},
|
|
74
|
+
dir: dir,
|
|
75
|
+
attrs: this.v3 ? undefined : {
|
|
76
|
+
dir: dir
|
|
77
|
+
},
|
|
78
|
+
key: "cancel"
|
|
79
|
+
}, this.v3 ? function () {
|
|
80
|
+
return [localization.toLanguageString(viewHtmlCancel, messages[viewHtmlCancel])];
|
|
81
|
+
} : [localization.toLanguageString(viewHtmlCancel, messages[viewHtmlCancel])]), // @ts-ignore function children
|
|
82
|
+
h(KButton, {
|
|
83
|
+
onClick: this.onUpdate,
|
|
84
|
+
on: this.v3 ? undefined : {
|
|
85
|
+
"click": this.onUpdate
|
|
86
|
+
},
|
|
87
|
+
themeColor: 'primary',
|
|
88
|
+
attrs: this.v3 ? undefined : {
|
|
89
|
+
themeColor: 'primary',
|
|
90
|
+
dir: dir
|
|
91
|
+
},
|
|
92
|
+
dir: dir,
|
|
93
|
+
key: "update"
|
|
94
|
+
}, this.v3 ? function () {
|
|
95
|
+
return [localization.toLanguageString(viewHtmlUpdate, messages[viewHtmlUpdate])];
|
|
96
|
+
} : [localization.toLanguageString(viewHtmlUpdate, messages[viewHtmlUpdate])])];
|
|
97
|
+
var dialog = // @ts-ignore function children
|
|
98
|
+
h(Dialog, {
|
|
99
|
+
title: localization.toLanguageString(viewHtmlDialogTitle, messages[viewHtmlDialogTitle]),
|
|
100
|
+
attrs: this.v3 ? undefined : {
|
|
101
|
+
title: localization.toLanguageString(viewHtmlDialogTitle, messages[viewHtmlDialogTitle]),
|
|
102
|
+
closeIcon: true,
|
|
103
|
+
dir: dir
|
|
104
|
+
},
|
|
105
|
+
onClose: this.onClose,
|
|
106
|
+
on: this.v3 ? undefined : {
|
|
107
|
+
"close": this.onClose
|
|
108
|
+
},
|
|
109
|
+
key: "dialog",
|
|
110
|
+
closeIcon: true,
|
|
111
|
+
dir: dir,
|
|
112
|
+
style: dir === 'rtl' ? {
|
|
113
|
+
textAlign: 'right'
|
|
114
|
+
} : undefined
|
|
115
|
+
}, this.v3 ? function () {
|
|
116
|
+
return [content, // @ts-ignore function children
|
|
117
|
+
h(DialogActionsBar, _this2.v3 ? function () {
|
|
118
|
+
return [actionButtons];
|
|
119
|
+
} : [actionButtons])];
|
|
120
|
+
} : [content, h(DialogActionsBar, _this2.v3 ? function () {
|
|
121
|
+
return [actionButtons];
|
|
122
|
+
} : [actionButtons])]);
|
|
123
|
+
return dialog;
|
|
124
|
+
},
|
|
125
|
+
methods: {
|
|
126
|
+
onUpdate: function onUpdate() {
|
|
127
|
+
var _a = this.$props,
|
|
128
|
+
view = _a.view,
|
|
129
|
+
settings = _a.settings;
|
|
130
|
+
var html = trimWhitespace(this.htmlArea ? this.htmlArea.value : '');
|
|
131
|
+
var preserveWhitespace = editorPropsKey.getState(view.state).preserveWhitespace;
|
|
132
|
+
setHtml(html, settings.commandName, {
|
|
133
|
+
preserveWhitespace: preserveWhitespace
|
|
134
|
+
})(view.state, view.dispatch);
|
|
135
|
+
this.onClose();
|
|
136
|
+
},
|
|
137
|
+
onClose: function onClose() {
|
|
138
|
+
this.$props.view.focus();
|
|
139
|
+
this.$emit('close');
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
};
|
|
143
|
+
var ViewHtmlDialogVue3 = ViewHtmlDialog;
|
|
144
|
+
export { ViewHtmlDialog, ViewHtmlDialogVue3 };
|
package/dist/es/main.d.ts
CHANGED
|
@@ -1 +1,166 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="prosemirror-model" />
|
|
2
|
+
import { Editor } from './Editor';
|
|
3
|
+
import { EditorProps, EditorMountEvent, EditorPasteEvent, EditorChangeEvent, EditorExecuteEvent, EditorFocusEvent, EditorBlurEvent } from './EditorProps';
|
|
4
|
+
import { EditorTools } from './tools/main';
|
|
5
|
+
import { EditorToolsSettings } from './config/toolsSettings';
|
|
6
|
+
import { EditorUtils } from './utils';
|
|
7
|
+
import { Selection, SelectionRange, TextSelection, NodeSelection, AllSelection, EditorState, Plugin, PluginKey, Transaction, Decoration, DecorationSet, EditorView, Node, ResolvedPos, NodeRange, Fragment, Slice, ReplaceError, Mark, Schema, NodeType, MarkType, ContentMatch, DOMParser, DOMSerializer, Transform, Step, StepResult, joinPoint, canJoin, canSplit, insertPoint, dropPoint, liftTarget, findWrapping, StepMap, MapResult, Mapping, AddMarkStep, RemoveMarkStep, ReplaceStep, ReplaceAroundStep, replaceStep, deleteSelection, joinBackward, selectNodeBackward, joinForward, selectNodeForward, joinUp, joinDown, lift, newlineInCode, exitCode, createParagraphNear, liftEmptyBlock, splitBlock, splitBlockKeepMarks, selectParentNode, selectAll, wrapIn, setBlockType, toggleMark, autoJoin, chainCommands, history, undo, redo, undoDepth, redoDepth, InputRule, inputRules, undoInputRule, wrappingInputRule, textblockTypeInputRule, keymap, keydownHandler, addListNodes, wrapInList, splitListItem, liftListItem, sinkListItem, dropCursor, gapCursor, tableEditing, fixTables, cellAround, isInTable, selectionCell, moveCellForward, inSameTable, findCell, colCount, nextCell, removeColSpan, addColSpan, columnIsHeader, tableNodes, tableNodeTypes, CellSelection, TableMap, columnResizing, updateColumnsOnResize, selectedRect, addColumn, addColumnBefore, addColumnAfter, deleteColumn, rowIsHeader, addRow, addRowBefore, addRowAfter, deleteRow, mergeCells, splitCell, splitCellWithType, setCellAttr, toggleHeader, toggleHeaderRow, toggleHeaderColumn, toggleHeaderCell, goToNextCell, deleteTable } from '@progress/kendo-editor-common';
|
|
8
|
+
export { Shortcuts } from './config/shortcuts';
|
|
9
|
+
export { PasteCleanupSettings } from './config/pasteSettings';
|
|
10
|
+
/**
|
|
11
|
+
* An object containing the content of ProseMirror packages used at the Editor component.
|
|
12
|
+
*
|
|
13
|
+
* "prosemirror-state",
|
|
14
|
+
* "prosemirror-view",
|
|
15
|
+
* "prosemirror-model",
|
|
16
|
+
* "prosemirror-transform",
|
|
17
|
+
* "prosemirror-commands",
|
|
18
|
+
* "prosemirror-keymap",
|
|
19
|
+
* "prosemirror-tables",
|
|
20
|
+
* "prosemirror-schema-list",
|
|
21
|
+
* "prosemirror-history",
|
|
22
|
+
* "prosemirror-inputrules",
|
|
23
|
+
* "prosemirror-dropcursor",
|
|
24
|
+
* "prosemirror-gapcursor"
|
|
25
|
+
*/
|
|
26
|
+
export declare const ProseMirror: {
|
|
27
|
+
Selection: typeof Selection;
|
|
28
|
+
SelectionRange: typeof SelectionRange;
|
|
29
|
+
TextSelection: typeof TextSelection;
|
|
30
|
+
NodeSelection: typeof NodeSelection;
|
|
31
|
+
AllSelection: typeof AllSelection;
|
|
32
|
+
EditorState: typeof EditorState;
|
|
33
|
+
Plugin: typeof Plugin;
|
|
34
|
+
PluginKey: typeof PluginKey;
|
|
35
|
+
Transaction: typeof Transaction;
|
|
36
|
+
Decoration: typeof Decoration;
|
|
37
|
+
DecorationSet: typeof DecorationSet;
|
|
38
|
+
EditorView: typeof EditorView;
|
|
39
|
+
Node: typeof Node;
|
|
40
|
+
ResolvedPos: typeof ResolvedPos;
|
|
41
|
+
NodeRange: typeof NodeRange;
|
|
42
|
+
Fragment: typeof Fragment;
|
|
43
|
+
Slice: typeof Slice;
|
|
44
|
+
ReplaceError: typeof ReplaceError;
|
|
45
|
+
Mark: typeof Mark;
|
|
46
|
+
Schema: typeof Schema;
|
|
47
|
+
NodeType: typeof NodeType;
|
|
48
|
+
MarkType: typeof MarkType;
|
|
49
|
+
ContentMatch: typeof ContentMatch;
|
|
50
|
+
DOMParser: typeof DOMParser;
|
|
51
|
+
DOMSerializer: typeof DOMSerializer;
|
|
52
|
+
Transform: typeof Transform;
|
|
53
|
+
Step: typeof Step;
|
|
54
|
+
StepResult: typeof StepResult;
|
|
55
|
+
joinPoint: typeof joinPoint;
|
|
56
|
+
canJoin: typeof canJoin;
|
|
57
|
+
canSplit: typeof canSplit;
|
|
58
|
+
insertPoint: typeof insertPoint;
|
|
59
|
+
dropPoint: typeof dropPoint;
|
|
60
|
+
liftTarget: typeof liftTarget;
|
|
61
|
+
findWrapping: typeof findWrapping;
|
|
62
|
+
StepMap: typeof StepMap;
|
|
63
|
+
MapResult: typeof MapResult;
|
|
64
|
+
Mapping: typeof Mapping;
|
|
65
|
+
AddMarkStep: typeof AddMarkStep;
|
|
66
|
+
RemoveMarkStep: typeof RemoveMarkStep;
|
|
67
|
+
ReplaceStep: typeof ReplaceStep;
|
|
68
|
+
ReplaceAroundStep: typeof ReplaceAroundStep;
|
|
69
|
+
replaceStep: typeof replaceStep;
|
|
70
|
+
deleteSelection: typeof deleteSelection;
|
|
71
|
+
joinBackward: typeof joinBackward;
|
|
72
|
+
selectNodeBackward: typeof selectNodeBackward;
|
|
73
|
+
joinForward: typeof joinForward;
|
|
74
|
+
selectNodeForward: typeof selectNodeForward;
|
|
75
|
+
joinUp: typeof joinUp;
|
|
76
|
+
joinDown: typeof joinDown;
|
|
77
|
+
lift: typeof lift;
|
|
78
|
+
newlineInCode: typeof newlineInCode;
|
|
79
|
+
exitCode: typeof exitCode;
|
|
80
|
+
createParagraphNear: typeof createParagraphNear;
|
|
81
|
+
liftEmptyBlock: typeof liftEmptyBlock;
|
|
82
|
+
splitBlock: typeof splitBlock;
|
|
83
|
+
splitBlockKeepMarks: typeof splitBlockKeepMarks;
|
|
84
|
+
selectParentNode: typeof selectParentNode;
|
|
85
|
+
selectAll: typeof selectAll;
|
|
86
|
+
wrapIn: typeof wrapIn;
|
|
87
|
+
setBlockType: typeof setBlockType;
|
|
88
|
+
toggleMark: typeof toggleMark;
|
|
89
|
+
autoJoin: typeof autoJoin;
|
|
90
|
+
chainCommands: typeof chainCommands;
|
|
91
|
+
pcBaseKeymap: import("prosemirror-commands").Keymap<any>;
|
|
92
|
+
macBaseKeymap: import("prosemirror-commands").Keymap<any>;
|
|
93
|
+
baseKeymap: import("prosemirror-commands").Keymap<any>;
|
|
94
|
+
history: typeof history;
|
|
95
|
+
undo: typeof undo;
|
|
96
|
+
redo: typeof redo;
|
|
97
|
+
undoDepth: typeof undoDepth;
|
|
98
|
+
redoDepth: typeof redoDepth;
|
|
99
|
+
InputRule: typeof InputRule;
|
|
100
|
+
inputRules: typeof inputRules;
|
|
101
|
+
undoInputRule: typeof undoInputRule;
|
|
102
|
+
emDash: InputRule<any>;
|
|
103
|
+
ellipsis: InputRule<any>;
|
|
104
|
+
openDoubleQuote: InputRule<any>;
|
|
105
|
+
closeDoubleQuote: InputRule<any>;
|
|
106
|
+
openSingleQuote: InputRule<any>;
|
|
107
|
+
closeSingleQuote: InputRule<any>;
|
|
108
|
+
smartQuotes: InputRule<any>[];
|
|
109
|
+
wrappingInputRule: typeof wrappingInputRule;
|
|
110
|
+
textblockTypeInputRule: typeof textblockTypeInputRule;
|
|
111
|
+
keymap: typeof keymap;
|
|
112
|
+
keydownHandler: typeof keydownHandler;
|
|
113
|
+
orderedList: import("prosemirror-model").NodeSpec;
|
|
114
|
+
bulletList: import("prosemirror-model").NodeSpec;
|
|
115
|
+
listItem: import("prosemirror-model").NodeSpec;
|
|
116
|
+
addListNodes: typeof addListNodes;
|
|
117
|
+
wrapInList: typeof wrapInList;
|
|
118
|
+
splitListItem: typeof splitListItem;
|
|
119
|
+
liftListItem: typeof liftListItem;
|
|
120
|
+
sinkListItem: typeof sinkListItem;
|
|
121
|
+
dropCursor: typeof dropCursor;
|
|
122
|
+
gapCursor: typeof gapCursor;
|
|
123
|
+
tableEditing: typeof tableEditing;
|
|
124
|
+
fixTables: typeof fixTables;
|
|
125
|
+
fixTablesKey: PluginKey<any, any>;
|
|
126
|
+
cellAround: typeof cellAround;
|
|
127
|
+
isInTable: typeof isInTable;
|
|
128
|
+
selectionCell: typeof selectionCell;
|
|
129
|
+
moveCellForward: typeof moveCellForward;
|
|
130
|
+
inSameTable: typeof inSameTable;
|
|
131
|
+
findCell: typeof findCell;
|
|
132
|
+
colCount: typeof colCount;
|
|
133
|
+
nextCell: typeof nextCell;
|
|
134
|
+
removeColSpan: typeof removeColSpan;
|
|
135
|
+
addColSpan: typeof addColSpan;
|
|
136
|
+
columnIsHeader: typeof columnIsHeader;
|
|
137
|
+
tableNodes: typeof tableNodes;
|
|
138
|
+
tableNodeTypes: typeof tableNodeTypes;
|
|
139
|
+
CellSelection: typeof CellSelection;
|
|
140
|
+
TableMap: typeof TableMap;
|
|
141
|
+
tableEditingKey: PluginKey<any, any>;
|
|
142
|
+
columnResizing: typeof columnResizing;
|
|
143
|
+
columnResizingPluginKey: PluginKey<any, any>;
|
|
144
|
+
updateColumnsOnResize: typeof updateColumnsOnResize;
|
|
145
|
+
selectedRect: typeof selectedRect;
|
|
146
|
+
addColumn: typeof addColumn;
|
|
147
|
+
addColumnBefore: typeof addColumnBefore;
|
|
148
|
+
addColumnAfter: typeof addColumnAfter;
|
|
149
|
+
deleteColumn: typeof deleteColumn;
|
|
150
|
+
rowIsHeader: typeof rowIsHeader;
|
|
151
|
+
addRow: typeof addRow;
|
|
152
|
+
addRowBefore: typeof addRowBefore;
|
|
153
|
+
addRowAfter: typeof addRowAfter;
|
|
154
|
+
deleteRow: typeof deleteRow;
|
|
155
|
+
mergeCells: typeof mergeCells;
|
|
156
|
+
splitCell: typeof splitCell;
|
|
157
|
+
splitCellWithType: typeof splitCellWithType;
|
|
158
|
+
setCellAttr: typeof setCellAttr;
|
|
159
|
+
toggleHeader: typeof toggleHeader;
|
|
160
|
+
toggleHeaderRow: typeof toggleHeaderRow;
|
|
161
|
+
toggleHeaderColumn: typeof toggleHeaderColumn;
|
|
162
|
+
toggleHeaderCell: typeof toggleHeaderCell;
|
|
163
|
+
goToNextCell: typeof goToNextCell;
|
|
164
|
+
deleteTable: typeof deleteTable;
|
|
165
|
+
};
|
|
166
|
+
export { Editor, EditorProps, EditorMountEvent, EditorPasteEvent, EditorChangeEvent, EditorExecuteEvent, EditorFocusEvent, EditorBlurEvent, EditorTools, EditorToolsSettings, EditorUtils };
|
package/dist/es/main.js
CHANGED
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { Editor } from './Editor';
|
|
2
|
+
import { EditorToolsSettings } from './config/toolsSettings';
|
|
3
|
+
import { EditorUtils } from './utils';
|
|
4
|
+
import {
|
|
5
|
+
// prosemirror-state
|
|
6
|
+
Selection, SelectionRange, TextSelection, NodeSelection, AllSelection, EditorState, Plugin, PluginKey, Transaction,
|
|
7
|
+
// prosemirror-view
|
|
8
|
+
Decoration, DecorationSet, EditorView,
|
|
9
|
+
// prosemirror-model
|
|
10
|
+
Node, ResolvedPos, NodeRange, Fragment, Slice, ReplaceError, Mark, Schema, NodeType, MarkType, ContentMatch, DOMParser, DOMSerializer,
|
|
11
|
+
// prosemirror-transform
|
|
12
|
+
Transform, Step, StepResult, joinPoint, canJoin, canSplit, insertPoint, dropPoint, liftTarget, findWrapping, StepMap, MapResult, Mapping, AddMarkStep, RemoveMarkStep, ReplaceStep, ReplaceAroundStep, replaceStep,
|
|
13
|
+
// prosemirror-commands
|
|
14
|
+
deleteSelection, joinBackward, selectNodeBackward, joinForward, selectNodeForward, joinUp, joinDown, lift, newlineInCode, exitCode, createParagraphNear, liftEmptyBlock, splitBlock, splitBlockKeepMarks, selectParentNode, selectAll, wrapIn, setBlockType, toggleMark, autoJoin, chainCommands, pcBaseKeymap, macBaseKeymap, baseKeymap,
|
|
15
|
+
// prosemirror-history
|
|
16
|
+
history, undo, redo, undoDepth, redoDepth,
|
|
17
|
+
// prosemirror-inputrules
|
|
18
|
+
InputRule, inputRules, undoInputRule, emDash, ellipsis, openDoubleQuote, closeDoubleQuote, openSingleQuote, closeSingleQuote, smartQuotes, wrappingInputRule, textblockTypeInputRule,
|
|
19
|
+
// prosemirror-keymap
|
|
20
|
+
keymap, keydownHandler,
|
|
21
|
+
// prosemirror-schema-list
|
|
22
|
+
orderedList, bulletList, listItem, addListNodes, wrapInList, splitListItem, liftListItem, sinkListItem,
|
|
23
|
+
// prosemirror-dropcursor
|
|
24
|
+
dropCursor,
|
|
25
|
+
// prosemirror-gapcursor
|
|
26
|
+
gapCursor,
|
|
27
|
+
// prosemirror-tables
|
|
28
|
+
tableEditing, fixTables, fixTablesKey, cellAround, isInTable, selectionCell, moveCellForward, inSameTable, findCell, colCount, nextCell, removeColSpan, addColSpan, columnIsHeader, tableNodes, tableNodeTypes, CellSelection, TableMap, tableEditingKey, columnResizing, columnResizingPluginKey, updateColumnsOnResize, selectedRect, addColumn, addColumnBefore, addColumnAfter, deleteColumn, rowIsHeader, addRow, addRowBefore, addRowAfter, deleteRow, mergeCells, splitCell, splitCellWithType, setCellAttr, toggleHeader, toggleHeaderRow, toggleHeaderColumn, toggleHeaderCell, goToNextCell, deleteTable } from '@progress/kendo-editor-common';
|
|
29
|
+
/**
|
|
30
|
+
* An object containing the content of ProseMirror packages used at the Editor component.
|
|
31
|
+
*
|
|
32
|
+
* "prosemirror-state",
|
|
33
|
+
* "prosemirror-view",
|
|
34
|
+
* "prosemirror-model",
|
|
35
|
+
* "prosemirror-transform",
|
|
36
|
+
* "prosemirror-commands",
|
|
37
|
+
* "prosemirror-keymap",
|
|
38
|
+
* "prosemirror-tables",
|
|
39
|
+
* "prosemirror-schema-list",
|
|
40
|
+
* "prosemirror-history",
|
|
41
|
+
* "prosemirror-inputrules",
|
|
42
|
+
* "prosemirror-dropcursor",
|
|
43
|
+
* "prosemirror-gapcursor"
|
|
44
|
+
*/
|
|
45
|
+
export var ProseMirror = {
|
|
46
|
+
// prosemirror-state
|
|
47
|
+
Selection: Selection, SelectionRange: SelectionRange, TextSelection: TextSelection, NodeSelection: NodeSelection, AllSelection: AllSelection,
|
|
48
|
+
EditorState: EditorState, Plugin: Plugin, PluginKey: PluginKey, Transaction: Transaction,
|
|
49
|
+
// prosemirror-view
|
|
50
|
+
Decoration: Decoration, DecorationSet: DecorationSet,
|
|
51
|
+
EditorView: EditorView,
|
|
52
|
+
// prosemirror-model
|
|
53
|
+
Node: Node, ResolvedPos: ResolvedPos, NodeRange: NodeRange, Fragment: Fragment, Slice: Slice, ReplaceError: ReplaceError, Mark: Mark,
|
|
54
|
+
Schema: Schema, NodeType: NodeType, MarkType: MarkType, ContentMatch: ContentMatch, DOMParser: DOMParser, DOMSerializer: DOMSerializer,
|
|
55
|
+
// prosemirror-transform
|
|
56
|
+
Transform: Transform, Step: Step, StepResult: StepResult,
|
|
57
|
+
joinPoint: joinPoint, canJoin: canJoin, canSplit: canSplit, insertPoint: insertPoint, dropPoint: dropPoint, liftTarget: liftTarget, findWrapping: findWrapping,
|
|
58
|
+
StepMap: StepMap, MapResult: MapResult, Mapping: Mapping,
|
|
59
|
+
AddMarkStep: AddMarkStep, RemoveMarkStep: RemoveMarkStep,
|
|
60
|
+
ReplaceStep: ReplaceStep, ReplaceAroundStep: ReplaceAroundStep, replaceStep: replaceStep,
|
|
61
|
+
// prosemirror-commands
|
|
62
|
+
deleteSelection: deleteSelection, joinBackward: joinBackward, selectNodeBackward: selectNodeBackward, joinForward: joinForward, selectNodeForward: selectNodeForward,
|
|
63
|
+
joinUp: joinUp, joinDown: joinDown, lift: lift, newlineInCode: newlineInCode, exitCode: exitCode, createParagraphNear: createParagraphNear, liftEmptyBlock: liftEmptyBlock,
|
|
64
|
+
splitBlock: splitBlock, splitBlockKeepMarks: splitBlockKeepMarks, selectParentNode: selectParentNode, selectAll: selectAll, wrapIn: wrapIn, setBlockType: setBlockType,
|
|
65
|
+
toggleMark: toggleMark, autoJoin: autoJoin, chainCommands: chainCommands, pcBaseKeymap: pcBaseKeymap, macBaseKeymap: macBaseKeymap, baseKeymap: baseKeymap,
|
|
66
|
+
// prosemirror-history
|
|
67
|
+
history: history, undo: undo, redo: redo, undoDepth: undoDepth, redoDepth: redoDepth,
|
|
68
|
+
// prosemirror-inputrules
|
|
69
|
+
InputRule: InputRule, inputRules: inputRules, undoInputRule: undoInputRule,
|
|
70
|
+
emDash: emDash, ellipsis: ellipsis, openDoubleQuote: openDoubleQuote, closeDoubleQuote: closeDoubleQuote, openSingleQuote: openSingleQuote, closeSingleQuote: closeSingleQuote, smartQuotes: smartQuotes,
|
|
71
|
+
wrappingInputRule: wrappingInputRule, textblockTypeInputRule: textblockTypeInputRule,
|
|
72
|
+
// prosemirror-keymap
|
|
73
|
+
keymap: keymap, keydownHandler: keydownHandler,
|
|
74
|
+
// prosemirror-schema-list
|
|
75
|
+
orderedList: orderedList, bulletList: bulletList, listItem: listItem, addListNodes: addListNodes,
|
|
76
|
+
wrapInList: wrapInList, splitListItem: splitListItem, liftListItem: liftListItem, sinkListItem: sinkListItem,
|
|
77
|
+
// prosemirror-dropcursor
|
|
78
|
+
dropCursor: dropCursor,
|
|
79
|
+
// prosemirror-gapcursor
|
|
80
|
+
gapCursor: gapCursor,
|
|
81
|
+
// prosemirror-tables
|
|
82
|
+
tableEditing: tableEditing, fixTables: fixTables, fixTablesKey: fixTablesKey,
|
|
83
|
+
cellAround: cellAround, isInTable: isInTable, selectionCell: selectionCell, moveCellForward: moveCellForward, inSameTable: inSameTable,
|
|
84
|
+
findCell: findCell, colCount: colCount, nextCell: nextCell, removeColSpan: removeColSpan, addColSpan: addColSpan, columnIsHeader: columnIsHeader,
|
|
85
|
+
tableNodes: tableNodes, tableNodeTypes: tableNodeTypes,
|
|
86
|
+
CellSelection: CellSelection,
|
|
87
|
+
TableMap: TableMap,
|
|
88
|
+
tableEditingKey: tableEditingKey,
|
|
89
|
+
columnResizing: columnResizing, columnResizingPluginKey: columnResizingPluginKey,
|
|
90
|
+
updateColumnsOnResize: updateColumnsOnResize,
|
|
91
|
+
selectedRect: selectedRect, addColumn: addColumn,
|
|
92
|
+
addColumnBefore: addColumnBefore, addColumnAfter: addColumnAfter,
|
|
93
|
+
deleteColumn: deleteColumn,
|
|
94
|
+
rowIsHeader: rowIsHeader,
|
|
95
|
+
addRow: addRow,
|
|
96
|
+
addRowBefore: addRowBefore,
|
|
97
|
+
addRowAfter: addRowAfter,
|
|
98
|
+
deleteRow: deleteRow,
|
|
99
|
+
mergeCells: mergeCells,
|
|
100
|
+
splitCell: splitCell,
|
|
101
|
+
splitCellWithType: splitCellWithType,
|
|
102
|
+
setCellAttr: setCellAttr,
|
|
103
|
+
toggleHeader: toggleHeader,
|
|
104
|
+
toggleHeaderRow: toggleHeaderRow,
|
|
105
|
+
toggleHeaderColumn: toggleHeaderColumn,
|
|
106
|
+
toggleHeaderCell: toggleHeaderCell,
|
|
107
|
+
goToNextCell: goToNextCell,
|
|
108
|
+
deleteTable: deleteTable
|
|
109
|
+
};
|
|
110
|
+
export { Editor, EditorToolsSettings, EditorUtils };
|