@progress/kendo-react-editor 5.4.0-dev.202205180853 → 5.4.0-dev.202205271059
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/cdn/js/kendo-react-editor.js +1 -1
- package/dist/es/Editor.d.ts +5 -5
- package/dist/es/Editor.js +16 -9
- package/dist/es/EditorProps.d.ts +1 -1
- package/dist/es/EditorProps.js +1 -0
- package/dist/es/config/pasteSettings.js +1 -0
- package/dist/es/config/shortcuts.js +1 -1
- package/dist/es/config/toolsSettings.js +19 -14
- package/dist/es/dialogs/EditorDialogProps.js +1 -0
- package/dist/es/dialogs/FindReplace.d.ts +1 -1
- package/dist/es/dialogs/FindReplace.js +6 -5
- package/dist/es/dialogs/insertImage.d.ts +1 -1
- package/dist/es/dialogs/insertImage.js +3 -1
- package/dist/es/dialogs/insertLink.d.ts +1 -1
- package/dist/es/dialogs/insertLink.js +3 -1
- package/dist/es/dialogs/main.js +3 -1
- package/dist/es/dialogs/viewHtml.d.ts +1 -1
- package/dist/es/dialogs/viewHtml.js +3 -1
- package/dist/es/main.d.ts +1 -1
- package/dist/es/main.js +116 -29
- package/dist/es/messages/index.d.ts +78 -391
- package/dist/es/package-metadata.js +1 -1
- package/dist/es/tools/ToolProps.d.ts +4 -1
- package/dist/es/tools/ToolProps.js +1 -0
- package/dist/es/tools/align.js +7 -3
- package/dist/es/tools/cleanFormatting.js +4 -2
- package/dist/es/tools/findReplace.js +7 -3
- package/dist/es/tools/fontStyle.js +7 -3
- package/dist/es/tools/formatBlock.js +7 -3
- package/dist/es/tools/indent.js +7 -3
- package/dist/es/tools/inlineFormat.js +7 -3
- package/dist/es/tools/insertImage.js +7 -3
- package/dist/es/tools/insertLink.js +7 -3
- package/dist/es/tools/insertTable/popup.js +3 -1
- package/dist/es/tools/insertTable/popupGrid.js +3 -1
- package/dist/es/tools/insertTable/tool.js +7 -3
- package/dist/es/tools/lists-styled.js +9 -4
- package/dist/es/tools/lists.js +7 -3
- package/dist/es/tools/main.d.ts +113 -112
- package/dist/es/tools/main.js +3 -1
- package/dist/es/tools/outdent.js +7 -3
- package/dist/es/tools/pdf.js +5 -3
- package/dist/es/tools/print.js +4 -2
- package/dist/es/tools/proseMirrorTool.js +7 -3
- package/dist/es/tools/selectAll.js +4 -2
- package/dist/es/tools/tableEdit.d.ts +8 -8
- package/dist/es/tools/unlink.js +7 -3
- package/dist/es/tools/utils.d.ts +1 -1
- package/dist/es/tools/viewHtml.js +7 -3
- package/dist/es/utils/controlled-value.d.ts +1 -2
- package/dist/npm/Editor.d.ts +5 -5
- package/dist/npm/Editor.js +17 -9
- package/dist/npm/EditorProps.d.ts +1 -1
- package/dist/npm/config/defaultStyles.js +1 -0
- package/dist/npm/config/schema.js +3 -2
- package/dist/npm/config/shortcuts.js +4 -2
- package/dist/npm/config/toolsSettings.js +20 -14
- package/dist/npm/dialogs/FindReplace.d.ts +1 -1
- package/dist/npm/dialogs/FindReplace.js +7 -5
- package/dist/npm/dialogs/insertImage.d.ts +1 -1
- package/dist/npm/dialogs/insertImage.js +4 -1
- package/dist/npm/dialogs/insertLink.d.ts +1 -1
- package/dist/npm/dialogs/insertLink.js +4 -1
- package/dist/npm/dialogs/main.js +4 -1
- package/dist/npm/dialogs/viewHtml.d.ts +1 -1
- package/dist/npm/dialogs/viewHtml.js +4 -1
- package/dist/npm/main.d.ts +1 -1
- package/dist/npm/main.js +121 -33
- package/dist/npm/messages/index.d.ts +78 -391
- package/dist/npm/messages/index.js +2 -1
- package/dist/npm/package-metadata.js +2 -1
- package/dist/npm/tools/ToolProps.d.ts +4 -1
- package/dist/npm/tools/align.js +10 -4
- package/dist/npm/tools/applyColor.js +3 -1
- package/dist/npm/tools/cleanFormatting.js +7 -3
- package/dist/npm/tools/findReplace.js +8 -3
- package/dist/npm/tools/fontStyle.js +8 -3
- package/dist/npm/tools/formatBlock.js +8 -3
- package/dist/npm/tools/history.js +1 -0
- package/dist/npm/tools/indent.js +8 -3
- package/dist/npm/tools/inlineFormat.js +8 -3
- package/dist/npm/tools/insertImage.js +10 -4
- package/dist/npm/tools/insertLink.js +8 -3
- package/dist/npm/tools/insertTable/index.js +3 -2
- package/dist/npm/tools/insertTable/popup.js +4 -1
- package/dist/npm/tools/insertTable/popupGrid.js +3 -1
- package/dist/npm/tools/insertTable/tool.js +8 -3
- package/dist/npm/tools/lists-styled.js +12 -5
- package/dist/npm/tools/lists.js +8 -3
- package/dist/npm/tools/main.d.ts +113 -112
- package/dist/npm/tools/main.js +4 -1
- package/dist/npm/tools/outdent.js +8 -3
- package/dist/npm/tools/pdf.js +8 -4
- package/dist/npm/tools/print.js +7 -3
- package/dist/npm/tools/proseMirrorTool.js +10 -4
- package/dist/npm/tools/selectAll.js +7 -3
- package/dist/npm/tools/tableEdit.d.ts +8 -8
- package/dist/npm/tools/tableEdit.js +1 -0
- package/dist/npm/tools/unlink.js +8 -3
- package/dist/npm/tools/utils.d.ts +1 -1
- package/dist/npm/tools/utils.js +1 -0
- package/dist/npm/tools/viewHtml.js +8 -3
- package/dist/npm/utils/browser-detection.js +1 -0
- package/dist/npm/utils/controlled-value.d.ts +1 -2
- package/dist/npm/utils/controlled-value.js +3 -1
- package/dist/npm/utils/index.js +1 -0
- package/dist/npm/utils/props-key.js +1 -0
- package/dist/systemjs/kendo-react-editor.js +1 -1
- package/package.json +12 -12
package/dist/es/Editor.d.ts
CHANGED
|
@@ -30,7 +30,7 @@ interface EditorStateInterface {
|
|
|
30
30
|
* ReactDOM.render(<App />, document.querySelector('my-app'));
|
|
31
31
|
* ```
|
|
32
32
|
*/
|
|
33
|
-
export
|
|
33
|
+
export declare class Editor extends React.Component<EditorProps, EditorStateInterface> {
|
|
34
34
|
/**
|
|
35
35
|
* @hidden
|
|
36
36
|
*/
|
|
@@ -60,19 +60,19 @@ export default class Editor extends React.Component<EditorProps, EditorStateInte
|
|
|
60
60
|
/**
|
|
61
61
|
* The value of the Editor.
|
|
62
62
|
*/
|
|
63
|
-
|
|
63
|
+
get value(): Node | string;
|
|
64
64
|
/**
|
|
65
65
|
* Returns the DOM element of the Editor.
|
|
66
66
|
*/
|
|
67
|
-
|
|
67
|
+
get element(): HTMLElement;
|
|
68
68
|
/**
|
|
69
69
|
* Returns the content-editable DOM element of the Editor.
|
|
70
70
|
*/
|
|
71
|
-
|
|
71
|
+
get contentElement(): HTMLDivElement;
|
|
72
72
|
/**
|
|
73
73
|
* Returns the `view` object of the Editor.
|
|
74
74
|
*/
|
|
75
|
-
|
|
75
|
+
get view(): EditorView<any>;
|
|
76
76
|
private _element;
|
|
77
77
|
private _view?;
|
|
78
78
|
private _contentElement;
|
package/dist/es/Editor.js
CHANGED
|
@@ -2,10 +2,12 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
2
2
|
var extendStatics = function (d, b) {
|
|
3
3
|
extendStatics = Object.setPrototypeOf ||
|
|
4
4
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
-
function (d, b) { for (var p in b) if (
|
|
5
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
6
|
return extendStatics(d, b);
|
|
7
7
|
};
|
|
8
8
|
return function (d, b) {
|
|
9
|
+
if (typeof b !== "function" && b !== null)
|
|
10
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
9
11
|
extendStatics(d, b);
|
|
10
12
|
function __() { this.constructor = d; }
|
|
11
13
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
@@ -22,6 +24,11 @@ var __assign = (this && this.__assign) || function () {
|
|
|
22
24
|
};
|
|
23
25
|
return __assign.apply(this, arguments);
|
|
24
26
|
};
|
|
27
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
|
|
28
|
+
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
|
|
29
|
+
to[j] = from[i];
|
|
30
|
+
return to;
|
|
31
|
+
};
|
|
25
32
|
import * as React from 'react';
|
|
26
33
|
import * as PropTypes from 'prop-types';
|
|
27
34
|
import { ButtonGroup, Toolbar, ToolbarSeparator } from '@progress/kendo-react-buttons';
|
|
@@ -187,7 +194,7 @@ var Editor = /** @class */ (function (_super) {
|
|
|
187
194
|
}
|
|
188
195
|
return this.props.defaultContent || '';
|
|
189
196
|
},
|
|
190
|
-
enumerable:
|
|
197
|
+
enumerable: false,
|
|
191
198
|
configurable: true
|
|
192
199
|
});
|
|
193
200
|
Object.defineProperty(Editor.prototype, "element", {
|
|
@@ -197,7 +204,7 @@ var Editor = /** @class */ (function (_super) {
|
|
|
197
204
|
get: function () {
|
|
198
205
|
return this._element;
|
|
199
206
|
},
|
|
200
|
-
enumerable:
|
|
207
|
+
enumerable: false,
|
|
201
208
|
configurable: true
|
|
202
209
|
});
|
|
203
210
|
Object.defineProperty(Editor.prototype, "contentElement", {
|
|
@@ -207,7 +214,7 @@ var Editor = /** @class */ (function (_super) {
|
|
|
207
214
|
get: function () {
|
|
208
215
|
return this._contentElement;
|
|
209
216
|
},
|
|
210
|
-
enumerable:
|
|
217
|
+
enumerable: false,
|
|
211
218
|
configurable: true
|
|
212
219
|
});
|
|
213
220
|
Object.defineProperty(Editor.prototype, "view", {
|
|
@@ -217,7 +224,7 @@ var Editor = /** @class */ (function (_super) {
|
|
|
217
224
|
get: function () {
|
|
218
225
|
return this._view;
|
|
219
226
|
},
|
|
220
|
-
enumerable:
|
|
227
|
+
enumerable: false,
|
|
221
228
|
configurable: true
|
|
222
229
|
});
|
|
223
230
|
/**
|
|
@@ -330,10 +337,10 @@ var Editor = /** @class */ (function (_super) {
|
|
|
330
337
|
gapCursor(),
|
|
331
338
|
tableEditing()
|
|
332
339
|
];
|
|
333
|
-
var shortcuts = __assign({}, EditorUtils.getShortcuts({
|
|
340
|
+
var shortcuts = __assign(__assign({}, EditorUtils.getShortcuts({
|
|
334
341
|
types: { listItem: 'list_item', hardBreak: 'hard_break' },
|
|
335
342
|
toolsSettings: { bold: bold, italic: italic, underline: underline }
|
|
336
|
-
}), { 'Mod-k': function () {
|
|
343
|
+
})), { 'Mod-k': function () {
|
|
337
344
|
var linkDialog = _this.state.linkDialog;
|
|
338
345
|
var editorView = _this.view;
|
|
339
346
|
if (editorView) {
|
|
@@ -352,7 +359,7 @@ var Editor = /** @class */ (function (_super) {
|
|
|
352
359
|
EditorUtils.createDocument(new Schema({ nodes: nodes, marks: marks }), value || defaultContent, { preserveWhitespace: preserveWhitespace });
|
|
353
360
|
var viewProps = {
|
|
354
361
|
state: EditorState.create({
|
|
355
|
-
plugins:
|
|
362
|
+
plugins: __spreadArray(__spreadArray([], plugins), [keymap(shortcuts), keymap(baseKeymap)]),
|
|
356
363
|
doc: doc
|
|
357
364
|
}),
|
|
358
365
|
transformPastedHTML: this.onPasteHtml,
|
|
@@ -393,4 +400,4 @@ var Editor = /** @class */ (function (_super) {
|
|
|
393
400
|
};
|
|
394
401
|
return Editor;
|
|
395
402
|
}(React.Component));
|
|
396
|
-
export
|
|
403
|
+
export { Editor };
|
package/dist/es/EditorProps.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// <reference types="react" />
|
|
3
3
|
import { EditorState, Plugin, Transaction, EditorView, Schema, Node } from '@progress/kendo-editor-common';
|
|
4
4
|
import { EditorUtils } from './utils';
|
|
5
|
-
import Editor from './Editor';
|
|
5
|
+
import { Editor } from './Editor';
|
|
6
6
|
interface EditorEvent {
|
|
7
7
|
/**
|
|
8
8
|
* An event target.
|
package/dist/es/EditorProps.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -27,7 +27,7 @@ export var getShortcuts = function (settings) {
|
|
|
27
27
|
});
|
|
28
28
|
var listItem = settings && settings.types && settings.types.listItem || 'list_item';
|
|
29
29
|
var toolsSettings = settings && settings.toolsSettings || {};
|
|
30
|
-
var shortcutsSettings = __assign({ 'Mod-b': function (state, dispatch) { return toggleInlineFormat(toolsSettings.bold || bold)(state, dispatch); }, 'Mod-i': function (state, dispatch) { return toggleInlineFormat(toolsSettings.italic || italic)(state, dispatch); }, 'Mod-u': function (state, dispatch) { return toggleInlineFormat(toolsSettings.underline || underline)(state, dispatch); }, 'Mod-z': undo, 'Shift-Mod-z': redo }, __assign({}, !mac ? { 'Mod-y': redo } : {}), { 'Backspace': undoInputRule, 'Mod-Enter': insertBr, 'Shift-Enter': insertBr }, __assign({}, mac ? { 'Ctrl-Enter': insertBr } : {}), { 'Enter': function (state, dispatch) {
|
|
30
|
+
var shortcutsSettings = __assign(__assign(__assign(__assign({ 'Mod-b': function (state, dispatch) { return toggleInlineFormat(toolsSettings.bold || bold)(state, dispatch); }, 'Mod-i': function (state, dispatch) { return toggleInlineFormat(toolsSettings.italic || italic)(state, dispatch); }, 'Mod-u': function (state, dispatch) { return toggleInlineFormat(toolsSettings.underline || underline)(state, dispatch); }, 'Mod-z': undo, 'Shift-Mod-z': redo }, __assign({}, !mac ? { 'Mod-y': redo } : {})), { 'Backspace': undoInputRule, 'Mod-Enter': insertBr, 'Shift-Enter': insertBr }), __assign({}, mac ? { 'Ctrl-Enter': insertBr } : {})), { 'Enter': function (state, dispatch) {
|
|
31
31
|
return splitListItem(state.schema.nodes[listItem])(state, dispatch);
|
|
32
32
|
}, 'Tab': goToNextCell(1), 'Shift-Tab': goToNextCell(-1) });
|
|
33
33
|
return shortcutsSettings;
|
|
@@ -9,6 +9,11 @@ var __assign = (this && this.__assign) || function () {
|
|
|
9
9
|
};
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
|
|
13
|
+
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
|
|
14
|
+
to[j] = from[i];
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
12
17
|
import { keys, messages } from './../messages';
|
|
13
18
|
import { bold as boldSettings, italic as italicSettings, underline as underlineSettings, strikethrough as strikethroughSettings, subscript as subscriptSettings, superscript as superscriptSettings, link as linkSettings, alignLeftRules, alignRightRules, alignCenterRules, alignJustifyRules, alignRemoveRules, indentRules, outdentRules } from '@progress/kendo-editor-common';
|
|
14
19
|
/**
|
|
@@ -29,43 +34,43 @@ export var EditorToolsSettings;
|
|
|
29
34
|
/**
|
|
30
35
|
* The object of the Bold tool settings.
|
|
31
36
|
*/
|
|
32
|
-
EditorToolsSettings.bold = __assign({}, boldSettings, { props: __assign({ icon: 'bold' }, buttonCommonProps), messages: {
|
|
37
|
+
EditorToolsSettings.bold = __assign(__assign({}, boldSettings), { props: __assign({ icon: 'bold' }, buttonCommonProps), messages: {
|
|
33
38
|
title: keys.bold
|
|
34
39
|
}, commandName: 'Bold' });
|
|
35
40
|
/**
|
|
36
41
|
* The object of the Italic tool settings.
|
|
37
42
|
*/
|
|
38
|
-
EditorToolsSettings.italic = __assign({}, italicSettings, { props: __assign({ icon: 'italic' }, buttonCommonProps), messages: {
|
|
43
|
+
EditorToolsSettings.italic = __assign(__assign({}, italicSettings), { props: __assign({ icon: 'italic' }, buttonCommonProps), messages: {
|
|
39
44
|
title: keys.italic
|
|
40
45
|
}, commandName: 'Italic' });
|
|
41
46
|
/**
|
|
42
47
|
* The object of the Underline tool settings.
|
|
43
48
|
*/
|
|
44
|
-
EditorToolsSettings.underline = __assign({}, underlineSettings, { props: __assign({ icon: 'underline' }, buttonCommonProps), messages: {
|
|
49
|
+
EditorToolsSettings.underline = __assign(__assign({}, underlineSettings), { props: __assign({ icon: 'underline' }, buttonCommonProps), messages: {
|
|
45
50
|
title: keys.underline
|
|
46
51
|
}, commandName: 'Underline' });
|
|
47
52
|
/**
|
|
48
53
|
* The object of the Strikethrough tool settings.
|
|
49
54
|
*/
|
|
50
|
-
EditorToolsSettings.strikethrough = __assign({}, strikethroughSettings, { props: __assign({ icon: 'strikethrough' }, buttonCommonProps), messages: {
|
|
55
|
+
EditorToolsSettings.strikethrough = __assign(__assign({}, strikethroughSettings), { props: __assign({ icon: 'strikethrough' }, buttonCommonProps), messages: {
|
|
51
56
|
title: keys.strikethrough
|
|
52
57
|
}, commandName: 'Strikethrough' });
|
|
53
58
|
/**
|
|
54
59
|
* The object of the Subscript tool settings.
|
|
55
60
|
*/
|
|
56
|
-
EditorToolsSettings.subscript = __assign({}, subscriptSettings, { props: __assign({ icon: 'subscript' }, buttonCommonProps), messages: {
|
|
61
|
+
EditorToolsSettings.subscript = __assign(__assign({}, subscriptSettings), { props: __assign({ icon: 'subscript' }, buttonCommonProps), messages: {
|
|
57
62
|
title: keys.subscript
|
|
58
63
|
}, commandName: 'Subscript' });
|
|
59
64
|
/**
|
|
60
65
|
* The object of the Superscript tool settings.
|
|
61
66
|
*/
|
|
62
|
-
EditorToolsSettings.superscript = __assign({}, superscriptSettings, { props: __assign({ icon: 'superscript' }, buttonCommonProps), messages: {
|
|
67
|
+
EditorToolsSettings.superscript = __assign(__assign({}, superscriptSettings), { props: __assign({ icon: 'superscript' }, buttonCommonProps), messages: {
|
|
63
68
|
title: keys.superscript
|
|
64
69
|
}, commandName: 'Superscript' });
|
|
65
70
|
/**
|
|
66
71
|
* The object of the Link tool settings.
|
|
67
72
|
*/
|
|
68
|
-
EditorToolsSettings.link = __assign({}, linkSettings, { props: __assign({ icon: 'link-horizontal' }, buttonCommonProps), messages: {
|
|
73
|
+
EditorToolsSettings.link = __assign(__assign({}, linkSettings), { props: __assign({ icon: 'link-horizontal' }, buttonCommonProps), messages: {
|
|
69
74
|
insertHyperlink: keys.insertHyperlink,
|
|
70
75
|
insertHyperlinkDialogTitle: keys.insertHyperlinkDialogTitle,
|
|
71
76
|
insertHyperlinkAddress: keys.insertHyperlinkAddress,
|
|
@@ -77,7 +82,7 @@ export var EditorToolsSettings;
|
|
|
77
82
|
/**
|
|
78
83
|
* The object of the Link tool settings.
|
|
79
84
|
*/
|
|
80
|
-
EditorToolsSettings.insertFile = __assign({}, linkSettings, { props: __assign({ icon: 'file-add' }, buttonCommonProps), messages: {
|
|
85
|
+
EditorToolsSettings.insertFile = __assign(__assign({}, linkSettings), { props: __assign({ icon: 'file-add' }, buttonCommonProps), messages: {
|
|
81
86
|
insertHyperlink: keys.insertFile,
|
|
82
87
|
insertHyperlinkDialogTitle: keys.insertFileDialogTitle,
|
|
83
88
|
insertHyperlinkAddress: keys.insertFileAddress,
|
|
@@ -296,7 +301,7 @@ export var EditorToolsSettings;
|
|
|
296
301
|
/**
|
|
297
302
|
* The object of the Unlink tool settings.
|
|
298
303
|
*/
|
|
299
|
-
EditorToolsSettings.unlink = __assign({}, linkSettings, { props: __assign({ icon: 'unlink-horizontal' }, buttonCommonProps), messages: {
|
|
304
|
+
EditorToolsSettings.unlink = __assign(__assign({}, linkSettings), { props: __assign({ icon: 'unlink-horizontal' }, buttonCommonProps), messages: {
|
|
300
305
|
title: keys.unlink
|
|
301
306
|
}, commandName: 'Unlink' });
|
|
302
307
|
/**
|
|
@@ -408,7 +413,7 @@ export var EditorToolsSettings;
|
|
|
408
413
|
* The object of the AlignLeft tool settings.
|
|
409
414
|
*/
|
|
410
415
|
EditorToolsSettings.alignLeft = {
|
|
411
|
-
actions: alignLeftRules
|
|
416
|
+
actions: __spreadArray([], alignLeftRules),
|
|
412
417
|
props: __assign({ icon: 'align-left' }, buttonCommonProps),
|
|
413
418
|
messages: {
|
|
414
419
|
title: keys.alignLeft
|
|
@@ -419,7 +424,7 @@ export var EditorToolsSettings;
|
|
|
419
424
|
* The object of the AlignRight tool settings.
|
|
420
425
|
*/
|
|
421
426
|
EditorToolsSettings.alignRight = {
|
|
422
|
-
actions: alignRightRules
|
|
427
|
+
actions: __spreadArray([], alignRightRules),
|
|
423
428
|
props: __assign({ icon: 'align-right' }, buttonCommonProps),
|
|
424
429
|
messages: {
|
|
425
430
|
title: keys.alignRight
|
|
@@ -430,7 +435,7 @@ export var EditorToolsSettings;
|
|
|
430
435
|
* The object of the AlignCenter tool settings.
|
|
431
436
|
*/
|
|
432
437
|
EditorToolsSettings.alignCenter = {
|
|
433
|
-
actions: alignCenterRules
|
|
438
|
+
actions: __spreadArray([], alignCenterRules),
|
|
434
439
|
props: __assign({ icon: 'align-center' }, buttonCommonProps),
|
|
435
440
|
messages: {
|
|
436
441
|
title: keys.alignCenter
|
|
@@ -441,7 +446,7 @@ export var EditorToolsSettings;
|
|
|
441
446
|
* The object of the AlignJustify tool settings.
|
|
442
447
|
*/
|
|
443
448
|
EditorToolsSettings.alignJustify = {
|
|
444
|
-
actions: alignJustifyRules
|
|
449
|
+
actions: __spreadArray([], alignJustifyRules),
|
|
445
450
|
props: __assign({ icon: 'align-justify' }, buttonCommonProps),
|
|
446
451
|
messages: {
|
|
447
452
|
title: keys.alignJustify
|
|
@@ -452,7 +457,7 @@ export var EditorToolsSettings;
|
|
|
452
457
|
* The object of the AlignRemove tool settings.
|
|
453
458
|
*/
|
|
454
459
|
EditorToolsSettings.alignRemove = {
|
|
455
|
-
actions: alignRemoveRules
|
|
460
|
+
actions: __spreadArray([], alignRemoveRules),
|
|
456
461
|
props: __assign({ icon: 'align-remove' }, buttonCommonProps),
|
|
457
462
|
messages: {},
|
|
458
463
|
commandName: 'AlignRemove'
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -41,7 +41,7 @@ export declare class FindAndReplaceDialog extends React.Component<FindAndReplace
|
|
|
41
41
|
* @hidden
|
|
42
42
|
*/
|
|
43
43
|
state: FindAndReplaceDialogState;
|
|
44
|
-
private
|
|
44
|
+
private get settings();
|
|
45
45
|
constructor(props: FindAndReplaceDialogProps);
|
|
46
46
|
/**
|
|
47
47
|
* @hidden
|
|
@@ -2,10 +2,12 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
2
2
|
var extendStatics = function (d, b) {
|
|
3
3
|
extendStatics = Object.setPrototypeOf ||
|
|
4
4
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
-
function (d, b) { for (var p in b) if (
|
|
5
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
6
|
return extendStatics(d, b);
|
|
7
7
|
};
|
|
8
8
|
return function (d, b) {
|
|
9
|
+
if (typeof b !== "function" && b !== null)
|
|
10
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
9
11
|
extendStatics(d, b);
|
|
10
12
|
function __() { this.constructor = d; }
|
|
11
13
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
@@ -118,7 +120,7 @@ var FindAndReplaceDialog = /** @class */ (function (_super) {
|
|
|
118
120
|
_this.onSearchChange = function (e) { return _this.setNextState({ searchText: e.target.value }); };
|
|
119
121
|
_this.onReplaceChange = function (e) { return _this.setNextState({ replaceText: e.target.value }); };
|
|
120
122
|
_this.setNextState = function (next) {
|
|
121
|
-
var nextState = __assign({}, _this.state, next, { matches: undefined, nextMatch: undefined });
|
|
123
|
+
var nextState = __assign(__assign(__assign({}, _this.state), next), { matches: undefined, nextMatch: undefined });
|
|
122
124
|
var view = _this.props.view;
|
|
123
125
|
if (nextState.searchText) {
|
|
124
126
|
var text = nextState.searchText, matchWord = nextState.matchWord, matchCase = nextState.matchCase, useRegExp = nextState.useRegExp, matchCyclic = nextState.matchCyclic;
|
|
@@ -129,8 +131,7 @@ var FindAndReplaceDialog = /** @class */ (function (_super) {
|
|
|
129
131
|
matches.find(function (match) { return match.from >= selection_1.from; }) ||
|
|
130
132
|
(matchCyclic && matches[0]) ||
|
|
131
133
|
undefined;
|
|
132
|
-
_this.setState(__assign({}, nextState, { matches: matches,
|
|
133
|
-
nextMatch: nextMatch }));
|
|
134
|
+
_this.setState(__assign(__assign({}, nextState), { matches: matches, nextMatch: nextMatch }));
|
|
134
135
|
}
|
|
135
136
|
else {
|
|
136
137
|
_this.setState(nextState);
|
|
@@ -151,7 +152,7 @@ var FindAndReplaceDialog = /** @class */ (function (_super) {
|
|
|
151
152
|
get: function () {
|
|
152
153
|
return this.props.settings || settings;
|
|
153
154
|
},
|
|
154
|
-
enumerable:
|
|
155
|
+
enumerable: false,
|
|
155
156
|
configurable: true
|
|
156
157
|
});
|
|
157
158
|
/**
|
|
@@ -2,10 +2,12 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
2
2
|
var extendStatics = function (d, b) {
|
|
3
3
|
extendStatics = Object.setPrototypeOf ||
|
|
4
4
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
-
function (d, b) { for (var p in b) if (
|
|
5
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
6
|
return extendStatics(d, b);
|
|
7
7
|
};
|
|
8
8
|
return function (d, b) {
|
|
9
|
+
if (typeof b !== "function" && b !== null)
|
|
10
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
9
11
|
extendStatics(d, b);
|
|
10
12
|
function __() { this.constructor = d; }
|
|
11
13
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
@@ -2,10 +2,12 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
2
2
|
var extendStatics = function (d, b) {
|
|
3
3
|
extendStatics = Object.setPrototypeOf ||
|
|
4
4
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
-
function (d, b) { for (var p in b) if (
|
|
5
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
6
|
return extendStatics(d, b);
|
|
7
7
|
};
|
|
8
8
|
return function (d, b) {
|
|
9
|
+
if (typeof b !== "function" && b !== null)
|
|
10
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
9
11
|
extendStatics(d, b);
|
|
10
12
|
function __() { this.constructor = d; }
|
|
11
13
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
package/dist/es/dialogs/main.js
CHANGED
|
@@ -2,10 +2,12 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
2
2
|
var extendStatics = function (d, b) {
|
|
3
3
|
extendStatics = Object.setPrototypeOf ||
|
|
4
4
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
-
function (d, b) { for (var p in b) if (
|
|
5
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
6
|
return extendStatics(d, b);
|
|
7
7
|
};
|
|
8
8
|
return function (d, b) {
|
|
9
|
+
if (typeof b !== "function" && b !== null)
|
|
10
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
9
11
|
extendStatics(d, b);
|
|
10
12
|
function __() { this.constructor = d; }
|
|
11
13
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
@@ -2,10 +2,12 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
2
2
|
var extendStatics = function (d, b) {
|
|
3
3
|
extendStatics = Object.setPrototypeOf ||
|
|
4
4
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
-
function (d, b) { for (var p in b) if (
|
|
5
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
6
|
return extendStatics(d, b);
|
|
7
7
|
};
|
|
8
8
|
return function (d, b) {
|
|
9
|
+
if (typeof b !== "function" && b !== null)
|
|
10
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
9
11
|
extendStatics(d, b);
|
|
10
12
|
function __() { this.constructor = d; }
|
|
11
13
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
package/dist/es/main.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="prosemirror-model" />
|
|
2
|
-
import Editor from './Editor';
|
|
2
|
+
import { Editor } from './Editor';
|
|
3
3
|
import { EditorProps, EditorMountEvent, EditorPasteEvent, EditorChangeEvent, EditorExecuteEvent, EditorFocusEvent, EditorBlurEvent } from './EditorProps';
|
|
4
4
|
import { EditorTools } from './tools/main';
|
|
5
5
|
import { EditorToolsSettings } from './config/toolsSettings';
|
package/dist/es/main.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import Editor from './Editor';
|
|
1
|
+
import { Editor } from './Editor';
|
|
2
2
|
import { EditorTools } from './tools/main';
|
|
3
3
|
import { EditorToolsSettings } from './config/toolsSettings';
|
|
4
4
|
import { EditorUtils } from './utils';
|
|
@@ -46,52 +46,139 @@ tableEditing, fixTables, fixTablesKey, cellAround, isInTable, selectionCell, mov
|
|
|
46
46
|
*/
|
|
47
47
|
export var ProseMirror = {
|
|
48
48
|
// prosemirror-state
|
|
49
|
-
Selection: Selection,
|
|
50
|
-
|
|
49
|
+
Selection: Selection,
|
|
50
|
+
SelectionRange: SelectionRange,
|
|
51
|
+
TextSelection: TextSelection,
|
|
52
|
+
NodeSelection: NodeSelection,
|
|
53
|
+
AllSelection: AllSelection,
|
|
54
|
+
EditorState: EditorState,
|
|
55
|
+
Plugin: Plugin,
|
|
56
|
+
PluginKey: PluginKey,
|
|
57
|
+
Transaction: Transaction,
|
|
51
58
|
// prosemirror-view
|
|
52
|
-
Decoration: Decoration,
|
|
59
|
+
Decoration: Decoration,
|
|
60
|
+
DecorationSet: DecorationSet,
|
|
53
61
|
EditorView: EditorView,
|
|
54
62
|
// prosemirror-model
|
|
55
|
-
Node: Node,
|
|
56
|
-
|
|
63
|
+
Node: Node,
|
|
64
|
+
ResolvedPos: ResolvedPos,
|
|
65
|
+
NodeRange: NodeRange,
|
|
66
|
+
Fragment: Fragment,
|
|
67
|
+
Slice: Slice,
|
|
68
|
+
ReplaceError: ReplaceError,
|
|
69
|
+
Mark: Mark,
|
|
70
|
+
Schema: Schema,
|
|
71
|
+
NodeType: NodeType,
|
|
72
|
+
MarkType: MarkType,
|
|
73
|
+
ContentMatch: ContentMatch,
|
|
74
|
+
DOMParser: DOMParser,
|
|
75
|
+
DOMSerializer: DOMSerializer,
|
|
57
76
|
// prosemirror-transform
|
|
58
|
-
Transform: Transform,
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
77
|
+
Transform: Transform,
|
|
78
|
+
Step: Step,
|
|
79
|
+
StepResult: StepResult,
|
|
80
|
+
joinPoint: joinPoint,
|
|
81
|
+
canJoin: canJoin,
|
|
82
|
+
canSplit: canSplit,
|
|
83
|
+
insertPoint: insertPoint,
|
|
84
|
+
dropPoint: dropPoint,
|
|
85
|
+
liftTarget: liftTarget,
|
|
86
|
+
findWrapping: findWrapping,
|
|
87
|
+
StepMap: StepMap,
|
|
88
|
+
MapResult: MapResult,
|
|
89
|
+
Mapping: Mapping,
|
|
90
|
+
AddMarkStep: AddMarkStep,
|
|
91
|
+
RemoveMarkStep: RemoveMarkStep,
|
|
92
|
+
ReplaceStep: ReplaceStep,
|
|
93
|
+
ReplaceAroundStep: ReplaceAroundStep,
|
|
94
|
+
replaceStep: replaceStep,
|
|
63
95
|
// prosemirror-commands
|
|
64
|
-
deleteSelection: deleteSelection,
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
96
|
+
deleteSelection: deleteSelection,
|
|
97
|
+
joinBackward: joinBackward,
|
|
98
|
+
selectNodeBackward: selectNodeBackward,
|
|
99
|
+
joinForward: joinForward,
|
|
100
|
+
selectNodeForward: selectNodeForward,
|
|
101
|
+
joinUp: joinUp,
|
|
102
|
+
joinDown: joinDown,
|
|
103
|
+
lift: lift,
|
|
104
|
+
newlineInCode: newlineInCode,
|
|
105
|
+
exitCode: exitCode,
|
|
106
|
+
createParagraphNear: createParagraphNear,
|
|
107
|
+
liftEmptyBlock: liftEmptyBlock,
|
|
108
|
+
splitBlock: splitBlock,
|
|
109
|
+
splitBlockKeepMarks: splitBlockKeepMarks,
|
|
110
|
+
selectParentNode: selectParentNode,
|
|
111
|
+
selectAll: selectAll,
|
|
112
|
+
wrapIn: wrapIn,
|
|
113
|
+
setBlockType: setBlockType,
|
|
114
|
+
toggleMark: toggleMark,
|
|
115
|
+
autoJoin: autoJoin,
|
|
116
|
+
chainCommands: chainCommands,
|
|
117
|
+
pcBaseKeymap: pcBaseKeymap,
|
|
118
|
+
macBaseKeymap: macBaseKeymap,
|
|
119
|
+
baseKeymap: baseKeymap,
|
|
68
120
|
// prosemirror-history
|
|
69
|
-
history: history,
|
|
121
|
+
history: history,
|
|
122
|
+
undo: undo,
|
|
123
|
+
redo: redo,
|
|
124
|
+
undoDepth: undoDepth,
|
|
125
|
+
redoDepth: redoDepth,
|
|
70
126
|
// prosemirror-inputrules
|
|
71
|
-
InputRule: InputRule,
|
|
72
|
-
|
|
73
|
-
|
|
127
|
+
InputRule: InputRule,
|
|
128
|
+
inputRules: inputRules,
|
|
129
|
+
undoInputRule: undoInputRule,
|
|
130
|
+
emDash: emDash,
|
|
131
|
+
ellipsis: ellipsis,
|
|
132
|
+
openDoubleQuote: openDoubleQuote,
|
|
133
|
+
closeDoubleQuote: closeDoubleQuote,
|
|
134
|
+
openSingleQuote: openSingleQuote,
|
|
135
|
+
closeSingleQuote: closeSingleQuote,
|
|
136
|
+
smartQuotes: smartQuotes,
|
|
137
|
+
wrappingInputRule: wrappingInputRule,
|
|
138
|
+
textblockTypeInputRule: textblockTypeInputRule,
|
|
74
139
|
// prosemirror-keymap
|
|
75
|
-
keymap: keymap,
|
|
140
|
+
keymap: keymap,
|
|
141
|
+
keydownHandler: keydownHandler,
|
|
76
142
|
// prosemirror-schema-list
|
|
77
|
-
orderedList: orderedList,
|
|
78
|
-
|
|
143
|
+
orderedList: orderedList,
|
|
144
|
+
bulletList: bulletList,
|
|
145
|
+
listItem: listItem,
|
|
146
|
+
addListNodes: addListNodes,
|
|
147
|
+
wrapInList: wrapInList,
|
|
148
|
+
splitListItem: splitListItem,
|
|
149
|
+
liftListItem: liftListItem,
|
|
150
|
+
sinkListItem: sinkListItem,
|
|
79
151
|
// prosemirror-dropcursor
|
|
80
152
|
dropCursor: dropCursor,
|
|
81
153
|
// prosemirror-gapcursor
|
|
82
154
|
gapCursor: gapCursor,
|
|
83
155
|
// prosemirror-tables
|
|
84
|
-
tableEditing: tableEditing,
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
156
|
+
tableEditing: tableEditing,
|
|
157
|
+
fixTables: fixTables,
|
|
158
|
+
fixTablesKey: fixTablesKey,
|
|
159
|
+
cellAround: cellAround,
|
|
160
|
+
isInTable: isInTable,
|
|
161
|
+
selectionCell: selectionCell,
|
|
162
|
+
moveCellForward: moveCellForward,
|
|
163
|
+
inSameTable: inSameTable,
|
|
164
|
+
findCell: findCell,
|
|
165
|
+
colCount: colCount,
|
|
166
|
+
nextCell: nextCell,
|
|
167
|
+
removeColSpan: removeColSpan,
|
|
168
|
+
addColSpan: addColSpan,
|
|
169
|
+
columnIsHeader: columnIsHeader,
|
|
170
|
+
tableNodes: tableNodes,
|
|
171
|
+
tableNodeTypes: tableNodeTypes,
|
|
88
172
|
CellSelection: CellSelection,
|
|
89
173
|
TableMap: TableMap,
|
|
90
174
|
tableEditingKey: tableEditingKey,
|
|
91
|
-
columnResizing: columnResizing,
|
|
175
|
+
columnResizing: columnResizing,
|
|
176
|
+
columnResizingPluginKey: columnResizingPluginKey,
|
|
92
177
|
updateColumnsOnResize: updateColumnsOnResize,
|
|
93
|
-
selectedRect: selectedRect,
|
|
94
|
-
|
|
178
|
+
selectedRect: selectedRect,
|
|
179
|
+
addColumn: addColumn,
|
|
180
|
+
addColumnBefore: addColumnBefore,
|
|
181
|
+
addColumnAfter: addColumnAfter,
|
|
95
182
|
deleteColumn: deleteColumn,
|
|
96
183
|
rowIsHeader: rowIsHeader,
|
|
97
184
|
addRow: addRow,
|