@progress/kendo-react-editor 4.12.0 → 4.13.0-dev.202111230848

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.
@@ -44,6 +44,7 @@ export default class Editor extends React.Component<EditorProps, EditorStateInte
44
44
  style: PropTypes.Requireable<object>;
45
45
  tools: PropTypes.Requireable<any[]>;
46
46
  keyboardNavigation: PropTypes.Requireable<boolean>;
47
+ resizable: PropTypes.Requireable<boolean>;
47
48
  preserveWhitespace: PropTypes.Requireable<string | boolean>;
48
49
  onMount: PropTypes.Requireable<(...args: any[]) => any>;
49
50
  onFocus: PropTypes.Requireable<(...args: any[]) => any>;
package/dist/es/Editor.js CHANGED
@@ -25,6 +25,7 @@ var __assign = (this && this.__assign) || function () {
25
25
  import * as React from 'react';
26
26
  import * as PropTypes from 'prop-types';
27
27
  import { ButtonGroup, Toolbar, ToolbarSeparator } from '@progress/kendo-react-buttons';
28
+ import { classNames } from '@progress/kendo-react-common';
28
29
  import { EditorState, Plugin, PluginKey, EditorView, Schema, baseKeymap, keymap, history, dropCursor, gapCursor, getMark, spacesFix, tableEditing } from '@progress/kendo-editor-common';
29
30
  import { marks, nodes } from './config/schema';
30
31
  import { defaultStyle, tablesStyles, rtlStyles } from './config/defaultStyles';
@@ -268,7 +269,7 @@ var Editor = /** @class */ (function (_super) {
268
269
  React.createElement(ButtonGroup, { key: index }, item.map(_this.renderTool, index)) :
269
270
  _this.renderTool(item, index);
270
271
  });
271
- return (React.createElement("div", { ref: function (e) { return _this._element = e; }, className: 'k-widget k-editor' + (className ? " " + className : ''), dir: this.props.dir, style: style },
272
+ return (React.createElement("div", { ref: function (e) { return _this._element = e; }, className: classNames('k-widget k-editor', className, { 'k-editor-resizable': this.props.resizable }), dir: this.props.dir, style: style },
272
273
  buttons.length > 0 && (React.createElement(Toolbar, { keyboardNavigation: this.props.keyboardNavigation }, buttons)),
273
274
  defaultEditMode === 'iframe' ?
274
275
  (React.createElement("div", { className: "k-editor-content" },
@@ -380,6 +381,7 @@ var Editor = /** @class */ (function (_super) {
380
381
  style: PropTypes.object,
381
382
  tools: PropTypes.arrayOf(PropTypes.any),
382
383
  keyboardNavigation: PropTypes.bool,
384
+ resizable: PropTypes.bool,
383
385
  preserveWhitespace: PropTypes.oneOf([true, false, 'full']),
384
386
  onMount: PropTypes.func,
385
387
  onFocus: PropTypes.func,
@@ -129,6 +129,10 @@ export interface EditorProps {
129
129
  * Sets styles to the Editor.
130
130
  */
131
131
  style?: React.CSSProperties;
132
+ /**
133
+ * Specifies if the Editor will be resizable.
134
+ */
135
+ resizable?: boolean;
132
136
  /**
133
137
  * Sets the tools of the Editor. By default, the Editor renders no tools.
134
138
  */
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * @hidden
3
3
  */
4
- export declare const defaultStyle = "\nhtml, body {\n margin: 0;\n height: 100%;\n padding: 0;\n}\n\nhtml {\n min-height: 100%;\n}\n\nbody {\n box-sizing: border-box;\n position: relative;\n word-wrap: break-word;\n padding: 8px;\n}\n\nbody > .k-content {\n outline: 0;\n height: 100%;\n white-space: pre-wrap;\n}\n\n.k-content > p {\n margin: 0 0 1em;\n}\n\n.k-content table {\n white-space: pre-wrap;\n}\n\n.k-content .k-text-selected, .k-content::selection {\n color: HighlightText;\n background-color: Highlight;\n}\n\n.k-content .k-text-highlighted {\n background-color: #bbdefb;\n}\n\n.k-content .ProseMirror-selectednode {\n outline: 2px solid #8cf;\n}\n\n.ProseMirror-hideselection *::selection { background: transparent; }\n.ProseMirror-hideselection *::-moz-selection { background: transparent; }\n.ProseMirror-hideselection { caret-color: transparent; }\n\n.ProseMirror-gapcursor {\n display: none;\n pointer-events: none;\n position: absolute;\n}\n\n.ProseMirror-gapcursor:after {\n content: \"\";\n display: block;\n position: absolute;\n top: -2px;\n width: 20px;\n border-top: 1px solid black;\n animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;\n}\n\n@keyframes ProseMirror-cursor-blink {\n to {\n visibility: hidden;\n }\n}\n\n.ProseMirror-focused .ProseMirror-gapcursor {\n display: block;\n}\n";
4
+ export declare const defaultStyle = "\nhtml, body {\n margin: 0;\n height: 100%;\n padding: 0;\n}\n\nhtml {\n min-height: 100%;\n}\n\nbody {\n box-sizing: border-box;\n position: relative;\n word-wrap: break-word;\n padding: 8px;\n}\n\nbody > .k-content {\n outline: 0;\n height: 100%;\n white-space: pre-wrap;\n}\n\n.k-content > p {\n margin: 0 0 1em;\n}\n\n.k-content table {\n white-space: pre-wrap;\n}\n\n.k-content .k-text-selected, .k-content::selection {\n color: HighlightText;\n background-color: Highlight;\n}\n\n.k-content .k-text-highlighted {\n background-color: #bbdefb;\n}\n\n.k-content .ProseMirror-selectednode {\n outline: 2px solid #8cf;\n}\n\n.ProseMirror-hideselection *::selection { background: transparent; }\n.ProseMirror-hideselection *::-moz-selection { background: transparent; }\n.ProseMirror-hideselection { caret-color: transparent; }\n\n.ProseMirror-gapcursor {\n display: none;\n pointer-events: none;\n position: absolute;\n}\n\n.ProseMirror-gapcursor:after {\n content: \"\";\n display: block;\n position: absolute;\n top: -2px;\n width: 20px;\n border-top: 1px solid black;\n animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;\n}\n\n@keyframes ProseMirror-cursor-blink {\n to {\n visibility: hidden;\n }\n}\n\n.ProseMirror-focused .ProseMirror-gapcursor {\n display: block;\n}\n\n.k-editor-resize-handles-wrapper {\n position: absolute;\n visibility: hidden;\n}\n\n.k-editor-resize-handle {\n position: absolute;\n visibility: visible;\n background-color: #fff;\n border: 1px solid #000;\n z-index: 100;\n width: 5px;\n height: 5px;\n}\n\n.k-editor-resize-handle.northwest {\n top: 0;\n left: 0;\n transform: translate(-50%, -50%);\n cursor: nw-resize;\n}\n\n.k-editor-resize-handle.north {\n top: 0;\n left: 50%;\n transform: translate(-50%, -50%);\n cursor: n-resize;\n}\n\n.k-editor-resize-handle.northeast {\n top: 0;\n right: 0;\n transform: translate(50%, -50%);\n cursor: ne-resize;\n}\n\n.k-editor-resize-handle.southwest {\n left: 0;\n bottom: 0;\n transform: translate(-50%, 50%);\n cursor: sw-resize;\n}\n\n.k-editor-resize-handle.south {\n bottom: 0;\n left: 50%;\n transform: translate(-50%, 50%);\n cursor: s-resize;\n}\n\n.k-editor-resize-handle.southeast {\n right: 0;\n bottom: 0;\n transform: translate(50%, 50%);\n cursor: se-resize;\n}\n\n.k-editor-resize-handle.west {\n top: 50%;\n left: 0;\n transform: translate(-50%, -50%);\n cursor: w-resize;\n}\n\n.k-editor-resize-handle.east {\n top: 50%;\n right: 0;\n transform: translate(50%, -50%);\n cursor: e-resize;\n}\n";
5
5
  /**
6
6
  * @hidden
7
7
  */
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * @hidden
3
3
  */
4
- export var defaultStyle = "\nhtml, body {\n margin: 0;\n height: 100%;\n padding: 0;\n}\n\nhtml {\n min-height: 100%;\n}\n\nbody {\n box-sizing: border-box;\n position: relative;\n word-wrap: break-word;\n padding: 8px;\n}\n\nbody > .k-content {\n outline: 0;\n height: 100%;\n white-space: pre-wrap;\n}\n\n.k-content > p {\n margin: 0 0 1em;\n}\n\n.k-content table {\n white-space: pre-wrap;\n}\n\n.k-content .k-text-selected, .k-content::selection {\n color: HighlightText;\n background-color: Highlight;\n}\n\n.k-content .k-text-highlighted {\n background-color: #bbdefb;\n}\n\n.k-content .ProseMirror-selectednode {\n outline: 2px solid #8cf;\n}\n\n.ProseMirror-hideselection *::selection { background: transparent; }\n.ProseMirror-hideselection *::-moz-selection { background: transparent; }\n.ProseMirror-hideselection { caret-color: transparent; }\n\n.ProseMirror-gapcursor {\n display: none;\n pointer-events: none;\n position: absolute;\n}\n\n.ProseMirror-gapcursor:after {\n content: \"\";\n display: block;\n position: absolute;\n top: -2px;\n width: 20px;\n border-top: 1px solid black;\n animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;\n}\n\n@keyframes ProseMirror-cursor-blink {\n to {\n visibility: hidden;\n }\n}\n\n.ProseMirror-focused .ProseMirror-gapcursor {\n display: block;\n}\n";
4
+ export var defaultStyle = "\nhtml, body {\n margin: 0;\n height: 100%;\n padding: 0;\n}\n\nhtml {\n min-height: 100%;\n}\n\nbody {\n box-sizing: border-box;\n position: relative;\n word-wrap: break-word;\n padding: 8px;\n}\n\nbody > .k-content {\n outline: 0;\n height: 100%;\n white-space: pre-wrap;\n}\n\n.k-content > p {\n margin: 0 0 1em;\n}\n\n.k-content table {\n white-space: pre-wrap;\n}\n\n.k-content .k-text-selected, .k-content::selection {\n color: HighlightText;\n background-color: Highlight;\n}\n\n.k-content .k-text-highlighted {\n background-color: #bbdefb;\n}\n\n.k-content .ProseMirror-selectednode {\n outline: 2px solid #8cf;\n}\n\n.ProseMirror-hideselection *::selection { background: transparent; }\n.ProseMirror-hideselection *::-moz-selection { background: transparent; }\n.ProseMirror-hideselection { caret-color: transparent; }\n\n.ProseMirror-gapcursor {\n display: none;\n pointer-events: none;\n position: absolute;\n}\n\n.ProseMirror-gapcursor:after {\n content: \"\";\n display: block;\n position: absolute;\n top: -2px;\n width: 20px;\n border-top: 1px solid black;\n animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;\n}\n\n@keyframes ProseMirror-cursor-blink {\n to {\n visibility: hidden;\n }\n}\n\n.ProseMirror-focused .ProseMirror-gapcursor {\n display: block;\n}\n\n.k-editor-resize-handles-wrapper {\n position: absolute;\n visibility: hidden;\n}\n\n.k-editor-resize-handle {\n position: absolute;\n visibility: visible;\n background-color: #fff;\n border: 1px solid #000;\n z-index: 100;\n width: 5px;\n height: 5px;\n}\n\n.k-editor-resize-handle.northwest {\n top: 0;\n left: 0;\n transform: translate(-50%, -50%);\n cursor: nw-resize;\n}\n\n.k-editor-resize-handle.north {\n top: 0;\n left: 50%;\n transform: translate(-50%, -50%);\n cursor: n-resize;\n}\n\n.k-editor-resize-handle.northeast {\n top: 0;\n right: 0;\n transform: translate(50%, -50%);\n cursor: ne-resize;\n}\n\n.k-editor-resize-handle.southwest {\n left: 0;\n bottom: 0;\n transform: translate(-50%, 50%);\n cursor: sw-resize;\n}\n\n.k-editor-resize-handle.south {\n bottom: 0;\n left: 50%;\n transform: translate(-50%, 50%);\n cursor: s-resize;\n}\n\n.k-editor-resize-handle.southeast {\n right: 0;\n bottom: 0;\n transform: translate(50%, 50%);\n cursor: se-resize;\n}\n\n.k-editor-resize-handle.west {\n top: 50%;\n left: 0;\n transform: translate(-50%, -50%);\n cursor: w-resize;\n}\n\n.k-editor-resize-handle.east {\n top: 50%;\n right: 0;\n transform: translate(50%, -50%);\n cursor: e-resize;\n}\n";
5
5
  /**
6
6
  * @hidden
7
7
  */
@@ -5,7 +5,7 @@ export var packageMetadata = {
5
5
  name: '@progress/kendo-react-editor',
6
6
  productName: 'KendoReact',
7
7
  productCodes: ['KENDOUIREACT', 'KENDOUICOMPLETE'],
8
- publishDate: 1637584678,
8
+ publishDate: 1637656458,
9
9
  version: '',
10
10
  licensingDocsUrl: 'https://www.telerik.com/kendo-react-ui/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning'
11
11
  };
@@ -20,11 +20,14 @@ import { messages } from '../messages';
20
20
  export var ApplyColorTool = function (props) {
21
21
  var view = props.view, style = props.style, colorPickerProps = props.colorPickerProps, commandName = props.commandName;
22
22
  var titleKey = colorPickerProps.title;
23
+ var _a = colorPickerProps.view, paletteView = _a === void 0 ? 'palette' : _a;
23
24
  var onChange = React.useCallback(function (event) {
24
25
  if (view) {
25
26
  applyInlineStyle({ style: style, value: event.value }, commandName)(view.state, view.dispatch);
26
- view.focus();
27
+ if (paletteView === 'palette') {
28
+ view.focus();
29
+ }
27
30
  }
28
- }, [view, style, commandName]);
31
+ }, [view, style, paletteView, commandName]);
29
32
  return (React.createElement(ColorPicker, __assign({ onChange: onChange, onActiveColorClick: onChange }, colorPickerProps, { title: titleKey ? useLocalization().toLanguageString(titleKey, messages[titleKey]) : titleKey })));
30
33
  };
@@ -1,6 +1,6 @@
1
1
  /// <reference types="prosemirror-model" />
2
2
  import * as shortcuts from './../config/shortcuts';
3
- import { Schema, NodeSpec, MarkSpec, Node, NodeType, Mark, MarkType, ParseOptions, EditorView, EditorState, Transaction, Plugin, PluginKey } from '@progress/kendo-editor-common';
3
+ import { ImageResizeOptions as ImageResizeOptionsCommon, Schema, NodeSpec, MarkSpec, Node, NodeType, Mark, MarkType, ParseOptions, EditorView, EditorState, Transaction, Plugin, PluginKey } from '@progress/kendo-editor-common';
4
4
  import { EditorToolsSettings } from './../config/toolsSettings';
5
5
  import { PasteCleanupSettings } from '../config/pasteSettings';
6
6
  /**
@@ -268,6 +268,18 @@ export declare namespace EditorUtils {
268
268
  * @returns {Plugin} - The text highlight plugin.
269
269
  */
270
270
  function textHighlight(key?: PluginKey): Plugin;
271
+ /**
272
+ * The image resizing plugin options.
273
+ */
274
+ interface ImageResizeOptions extends ImageResizeOptionsCommon {
275
+ }
276
+ /**
277
+ * Creates a plugin which adds image resizing functionality.
278
+ *
279
+ * @param {ImageResizeOptions} options - The resizing option (Optional).
280
+ * @returns {Plugin} - The image resizing plugin.
281
+ */
282
+ function imageResizing(options?: ImageResizeOptions): Plugin;
271
283
  /**
272
284
  * Sets the HTML to the `EditorView`.
273
285
  *
@@ -327,6 +339,10 @@ export declare namespace EditorUtils {
327
339
  * The `PluginKey` used in the Editor to pass editor props to the tools.
328
340
  */
329
341
  const propsKey: PluginKey;
342
+ /**
343
+ * The `PluginKey` used in the Editor by the image resizing plugin.
344
+ */
345
+ const imageResizeKey: PluginKey;
330
346
  /**
331
347
  * Represents the `marks` object of the Editor.
332
348
  */
@@ -11,7 +11,7 @@ var __assign = (this && this.__assign) || function () {
11
11
  };
12
12
  import * as shortcuts from './../config/shortcuts';
13
13
  import { marks as schemaMarks, nodes as schemaNodes } from './../config/schema';
14
- import { alignBlocks as alignBlocksCommon, applyInlineStyle as applyInlineStyleCommon, applyLink as applyLinkCommon, canIndentAsListItem, canOutdentAsListItem, parseContent, canInsert as canInsertCommon, createTable as createTableCommon, formatBlockElements as formatBlockElementsCommon, getBlockFormats as getBlockFormatsCommon, getHtml as getHtmlCommon, getInlineStyles as getInlineStylesCommon, getMark as getMarkCommon, hasMark as hasMarkCommon, hasNode as hasNodeCommon, indentBlocks as indentBlocksCommon, setHtml as setHtmlCommon, insertNode as insertNodeCommon, isAligned as isAlignedCommon, isIndented as isIndentedCommon, toggleInlineFormat as toggleInlineFormatCommon, toggleList as toggleListCommon, indentHtml as indentHtmlCommon, convertMsLists as convertMsListsCommon, removeComments as removeCommentsCommon, removeTag as removeTagCommon, sanitize as sanitizeCommon, pasteCleanup as pasteCleanupCommon, sanitizeClassAttr as sanitizeClassAttrCommon, sanitizeStyleAttr as sanitizeStyleAttrCommon, removeAttribute as removeAttributeCommon, replaceImageSourcesFromRtf as replaceImageSourcesFromRtfCommon, textHighlight as textHighlightCommon, trimWhitespace } from '@progress/kendo-editor-common';
14
+ import { alignBlocks as alignBlocksCommon, applyInlineStyle as applyInlineStyleCommon, applyLink as applyLinkCommon, canIndentAsListItem, canOutdentAsListItem, parseContent, canInsert as canInsertCommon, createTable as createTableCommon, formatBlockElements as formatBlockElementsCommon, getBlockFormats as getBlockFormatsCommon, getHtml as getHtmlCommon, getInlineStyles as getInlineStylesCommon, getMark as getMarkCommon, hasMark as hasMarkCommon, hasNode as hasNodeCommon, indentBlocks as indentBlocksCommon, setHtml as setHtmlCommon, insertNode as insertNodeCommon, isAligned as isAlignedCommon, isIndented as isIndentedCommon, toggleInlineFormat as toggleInlineFormatCommon, toggleList as toggleListCommon, indentHtml as indentHtmlCommon, convertMsLists as convertMsListsCommon, removeComments as removeCommentsCommon, removeTag as removeTagCommon, sanitize as sanitizeCommon, pasteCleanup as pasteCleanupCommon, sanitizeClassAttr as sanitizeClassAttrCommon, sanitizeStyleAttr as sanitizeStyleAttrCommon, removeAttribute as removeAttributeCommon, replaceImageSourcesFromRtf as replaceImageSourcesFromRtfCommon, textHighlight as textHighlightCommon, imageResizing as imageResizingCommon, imageResizeKey as imageResizeKeyCommon, trimWhitespace } from '@progress/kendo-editor-common';
15
15
  import { editorPropsKey } from './props-key';
16
16
  /**
17
17
  * Represents a wrapping namespace for the utility functions, `nodes`, and `marks` objects of the Editor.
@@ -346,6 +346,16 @@ export var EditorUtils;
346
346
  return textHighlightCommon(key);
347
347
  }
348
348
  EditorUtils.textHighlight = textHighlight;
349
+ /**
350
+ * Creates a plugin which adds image resizing functionality.
351
+ *
352
+ * @param {ImageResizeOptions} options - The resizing option (Optional).
353
+ * @returns {Plugin} - The image resizing plugin.
354
+ */
355
+ function imageResizing(options) {
356
+ return imageResizingCommon(options);
357
+ }
358
+ EditorUtils.imageResizing = imageResizing;
349
359
  /**
350
360
  * Sets the HTML to the `EditorView`.
351
361
  *
@@ -397,6 +407,10 @@ export var EditorUtils;
397
407
  * The `PluginKey` used in the Editor to pass editor props to the tools.
398
408
  */
399
409
  EditorUtils.propsKey = editorPropsKey;
410
+ /**
411
+ * The `PluginKey` used in the Editor by the image resizing plugin.
412
+ */
413
+ EditorUtils.imageResizeKey = imageResizeKeyCommon;
400
414
  /**
401
415
  * Represents the `marks` object of the Editor.
402
416
  */
@@ -44,6 +44,7 @@ export default class Editor extends React.Component<EditorProps, EditorStateInte
44
44
  style: PropTypes.Requireable<object>;
45
45
  tools: PropTypes.Requireable<any[]>;
46
46
  keyboardNavigation: PropTypes.Requireable<boolean>;
47
+ resizable: PropTypes.Requireable<boolean>;
47
48
  preserveWhitespace: PropTypes.Requireable<string | boolean>;
48
49
  onMount: PropTypes.Requireable<(...args: any[]) => any>;
49
50
  onFocus: PropTypes.Requireable<(...args: any[]) => any>;
@@ -27,6 +27,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
27
27
  var React = require("react");
28
28
  var PropTypes = require("prop-types");
29
29
  var kendo_react_buttons_1 = require("@progress/kendo-react-buttons");
30
+ var kendo_react_common_1 = require("@progress/kendo-react-common");
30
31
  var kendo_editor_common_1 = require("@progress/kendo-editor-common");
31
32
  var schema_1 = require("./config/schema");
32
33
  var defaultStyles_1 = require("./config/defaultStyles");
@@ -270,7 +271,7 @@ var Editor = /** @class */ (function (_super) {
270
271
  React.createElement(kendo_react_buttons_1.ButtonGroup, { key: index }, item.map(_this.renderTool, index)) :
271
272
  _this.renderTool(item, index);
272
273
  });
273
- return (React.createElement("div", { ref: function (e) { return _this._element = e; }, className: 'k-widget k-editor' + (className ? " " + className : ''), dir: this.props.dir, style: style },
274
+ return (React.createElement("div", { ref: function (e) { return _this._element = e; }, className: kendo_react_common_1.classNames('k-widget k-editor', className, { 'k-editor-resizable': this.props.resizable }), dir: this.props.dir, style: style },
274
275
  buttons.length > 0 && (React.createElement(kendo_react_buttons_1.Toolbar, { keyboardNavigation: this.props.keyboardNavigation }, buttons)),
275
276
  defaultEditMode === 'iframe' ?
276
277
  (React.createElement("div", { className: "k-editor-content" },
@@ -382,6 +383,7 @@ var Editor = /** @class */ (function (_super) {
382
383
  style: PropTypes.object,
383
384
  tools: PropTypes.arrayOf(PropTypes.any),
384
385
  keyboardNavigation: PropTypes.bool,
386
+ resizable: PropTypes.bool,
385
387
  preserveWhitespace: PropTypes.oneOf([true, false, 'full']),
386
388
  onMount: PropTypes.func,
387
389
  onFocus: PropTypes.func,
@@ -129,6 +129,10 @@ export interface EditorProps {
129
129
  * Sets styles to the Editor.
130
130
  */
131
131
  style?: React.CSSProperties;
132
+ /**
133
+ * Specifies if the Editor will be resizable.
134
+ */
135
+ resizable?: boolean;
132
136
  /**
133
137
  * Sets the tools of the Editor. By default, the Editor renders no tools.
134
138
  */
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * @hidden
3
3
  */
4
- export declare const defaultStyle = "\nhtml, body {\n margin: 0;\n height: 100%;\n padding: 0;\n}\n\nhtml {\n min-height: 100%;\n}\n\nbody {\n box-sizing: border-box;\n position: relative;\n word-wrap: break-word;\n padding: 8px;\n}\n\nbody > .k-content {\n outline: 0;\n height: 100%;\n white-space: pre-wrap;\n}\n\n.k-content > p {\n margin: 0 0 1em;\n}\n\n.k-content table {\n white-space: pre-wrap;\n}\n\n.k-content .k-text-selected, .k-content::selection {\n color: HighlightText;\n background-color: Highlight;\n}\n\n.k-content .k-text-highlighted {\n background-color: #bbdefb;\n}\n\n.k-content .ProseMirror-selectednode {\n outline: 2px solid #8cf;\n}\n\n.ProseMirror-hideselection *::selection { background: transparent; }\n.ProseMirror-hideselection *::-moz-selection { background: transparent; }\n.ProseMirror-hideselection { caret-color: transparent; }\n\n.ProseMirror-gapcursor {\n display: none;\n pointer-events: none;\n position: absolute;\n}\n\n.ProseMirror-gapcursor:after {\n content: \"\";\n display: block;\n position: absolute;\n top: -2px;\n width: 20px;\n border-top: 1px solid black;\n animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;\n}\n\n@keyframes ProseMirror-cursor-blink {\n to {\n visibility: hidden;\n }\n}\n\n.ProseMirror-focused .ProseMirror-gapcursor {\n display: block;\n}\n";
4
+ export declare const defaultStyle = "\nhtml, body {\n margin: 0;\n height: 100%;\n padding: 0;\n}\n\nhtml {\n min-height: 100%;\n}\n\nbody {\n box-sizing: border-box;\n position: relative;\n word-wrap: break-word;\n padding: 8px;\n}\n\nbody > .k-content {\n outline: 0;\n height: 100%;\n white-space: pre-wrap;\n}\n\n.k-content > p {\n margin: 0 0 1em;\n}\n\n.k-content table {\n white-space: pre-wrap;\n}\n\n.k-content .k-text-selected, .k-content::selection {\n color: HighlightText;\n background-color: Highlight;\n}\n\n.k-content .k-text-highlighted {\n background-color: #bbdefb;\n}\n\n.k-content .ProseMirror-selectednode {\n outline: 2px solid #8cf;\n}\n\n.ProseMirror-hideselection *::selection { background: transparent; }\n.ProseMirror-hideselection *::-moz-selection { background: transparent; }\n.ProseMirror-hideselection { caret-color: transparent; }\n\n.ProseMirror-gapcursor {\n display: none;\n pointer-events: none;\n position: absolute;\n}\n\n.ProseMirror-gapcursor:after {\n content: \"\";\n display: block;\n position: absolute;\n top: -2px;\n width: 20px;\n border-top: 1px solid black;\n animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;\n}\n\n@keyframes ProseMirror-cursor-blink {\n to {\n visibility: hidden;\n }\n}\n\n.ProseMirror-focused .ProseMirror-gapcursor {\n display: block;\n}\n\n.k-editor-resize-handles-wrapper {\n position: absolute;\n visibility: hidden;\n}\n\n.k-editor-resize-handle {\n position: absolute;\n visibility: visible;\n background-color: #fff;\n border: 1px solid #000;\n z-index: 100;\n width: 5px;\n height: 5px;\n}\n\n.k-editor-resize-handle.northwest {\n top: 0;\n left: 0;\n transform: translate(-50%, -50%);\n cursor: nw-resize;\n}\n\n.k-editor-resize-handle.north {\n top: 0;\n left: 50%;\n transform: translate(-50%, -50%);\n cursor: n-resize;\n}\n\n.k-editor-resize-handle.northeast {\n top: 0;\n right: 0;\n transform: translate(50%, -50%);\n cursor: ne-resize;\n}\n\n.k-editor-resize-handle.southwest {\n left: 0;\n bottom: 0;\n transform: translate(-50%, 50%);\n cursor: sw-resize;\n}\n\n.k-editor-resize-handle.south {\n bottom: 0;\n left: 50%;\n transform: translate(-50%, 50%);\n cursor: s-resize;\n}\n\n.k-editor-resize-handle.southeast {\n right: 0;\n bottom: 0;\n transform: translate(50%, 50%);\n cursor: se-resize;\n}\n\n.k-editor-resize-handle.west {\n top: 50%;\n left: 0;\n transform: translate(-50%, -50%);\n cursor: w-resize;\n}\n\n.k-editor-resize-handle.east {\n top: 50%;\n right: 0;\n transform: translate(50%, -50%);\n cursor: e-resize;\n}\n";
5
5
  /**
6
6
  * @hidden
7
7
  */
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  /**
4
4
  * @hidden
5
5
  */
6
- exports.defaultStyle = "\nhtml, body {\n margin: 0;\n height: 100%;\n padding: 0;\n}\n\nhtml {\n min-height: 100%;\n}\n\nbody {\n box-sizing: border-box;\n position: relative;\n word-wrap: break-word;\n padding: 8px;\n}\n\nbody > .k-content {\n outline: 0;\n height: 100%;\n white-space: pre-wrap;\n}\n\n.k-content > p {\n margin: 0 0 1em;\n}\n\n.k-content table {\n white-space: pre-wrap;\n}\n\n.k-content .k-text-selected, .k-content::selection {\n color: HighlightText;\n background-color: Highlight;\n}\n\n.k-content .k-text-highlighted {\n background-color: #bbdefb;\n}\n\n.k-content .ProseMirror-selectednode {\n outline: 2px solid #8cf;\n}\n\n.ProseMirror-hideselection *::selection { background: transparent; }\n.ProseMirror-hideselection *::-moz-selection { background: transparent; }\n.ProseMirror-hideselection { caret-color: transparent; }\n\n.ProseMirror-gapcursor {\n display: none;\n pointer-events: none;\n position: absolute;\n}\n\n.ProseMirror-gapcursor:after {\n content: \"\";\n display: block;\n position: absolute;\n top: -2px;\n width: 20px;\n border-top: 1px solid black;\n animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;\n}\n\n@keyframes ProseMirror-cursor-blink {\n to {\n visibility: hidden;\n }\n}\n\n.ProseMirror-focused .ProseMirror-gapcursor {\n display: block;\n}\n";
6
+ exports.defaultStyle = "\nhtml, body {\n margin: 0;\n height: 100%;\n padding: 0;\n}\n\nhtml {\n min-height: 100%;\n}\n\nbody {\n box-sizing: border-box;\n position: relative;\n word-wrap: break-word;\n padding: 8px;\n}\n\nbody > .k-content {\n outline: 0;\n height: 100%;\n white-space: pre-wrap;\n}\n\n.k-content > p {\n margin: 0 0 1em;\n}\n\n.k-content table {\n white-space: pre-wrap;\n}\n\n.k-content .k-text-selected, .k-content::selection {\n color: HighlightText;\n background-color: Highlight;\n}\n\n.k-content .k-text-highlighted {\n background-color: #bbdefb;\n}\n\n.k-content .ProseMirror-selectednode {\n outline: 2px solid #8cf;\n}\n\n.ProseMirror-hideselection *::selection { background: transparent; }\n.ProseMirror-hideselection *::-moz-selection { background: transparent; }\n.ProseMirror-hideselection { caret-color: transparent; }\n\n.ProseMirror-gapcursor {\n display: none;\n pointer-events: none;\n position: absolute;\n}\n\n.ProseMirror-gapcursor:after {\n content: \"\";\n display: block;\n position: absolute;\n top: -2px;\n width: 20px;\n border-top: 1px solid black;\n animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;\n}\n\n@keyframes ProseMirror-cursor-blink {\n to {\n visibility: hidden;\n }\n}\n\n.ProseMirror-focused .ProseMirror-gapcursor {\n display: block;\n}\n\n.k-editor-resize-handles-wrapper {\n position: absolute;\n visibility: hidden;\n}\n\n.k-editor-resize-handle {\n position: absolute;\n visibility: visible;\n background-color: #fff;\n border: 1px solid #000;\n z-index: 100;\n width: 5px;\n height: 5px;\n}\n\n.k-editor-resize-handle.northwest {\n top: 0;\n left: 0;\n transform: translate(-50%, -50%);\n cursor: nw-resize;\n}\n\n.k-editor-resize-handle.north {\n top: 0;\n left: 50%;\n transform: translate(-50%, -50%);\n cursor: n-resize;\n}\n\n.k-editor-resize-handle.northeast {\n top: 0;\n right: 0;\n transform: translate(50%, -50%);\n cursor: ne-resize;\n}\n\n.k-editor-resize-handle.southwest {\n left: 0;\n bottom: 0;\n transform: translate(-50%, 50%);\n cursor: sw-resize;\n}\n\n.k-editor-resize-handle.south {\n bottom: 0;\n left: 50%;\n transform: translate(-50%, 50%);\n cursor: s-resize;\n}\n\n.k-editor-resize-handle.southeast {\n right: 0;\n bottom: 0;\n transform: translate(50%, 50%);\n cursor: se-resize;\n}\n\n.k-editor-resize-handle.west {\n top: 50%;\n left: 0;\n transform: translate(-50%, -50%);\n cursor: w-resize;\n}\n\n.k-editor-resize-handle.east {\n top: 50%;\n right: 0;\n transform: translate(50%, -50%);\n cursor: e-resize;\n}\n";
7
7
  /**
8
8
  * @hidden
9
9
  */
@@ -7,7 +7,7 @@ exports.packageMetadata = {
7
7
  name: '@progress/kendo-react-editor',
8
8
  productName: 'KendoReact',
9
9
  productCodes: ['KENDOUIREACT', 'KENDOUICOMPLETE'],
10
- publishDate: 1637584678,
10
+ publishDate: 1637656458,
11
11
  version: '',
12
12
  licensingDocsUrl: 'https://www.telerik.com/kendo-react-ui/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning'
13
13
  };
@@ -22,11 +22,14 @@ var messages_1 = require("../messages");
22
22
  exports.ApplyColorTool = function (props) {
23
23
  var view = props.view, style = props.style, colorPickerProps = props.colorPickerProps, commandName = props.commandName;
24
24
  var titleKey = colorPickerProps.title;
25
+ var _a = colorPickerProps.view, paletteView = _a === void 0 ? 'palette' : _a;
25
26
  var onChange = React.useCallback(function (event) {
26
27
  if (view) {
27
28
  kendo_editor_common_1.applyInlineStyle({ style: style, value: event.value }, commandName)(view.state, view.dispatch);
28
- view.focus();
29
+ if (paletteView === 'palette') {
30
+ view.focus();
31
+ }
29
32
  }
30
- }, [view, style, commandName]);
33
+ }, [view, style, paletteView, commandName]);
31
34
  return (React.createElement(kendo_react_inputs_1.ColorPicker, __assign({ onChange: onChange, onActiveColorClick: onChange }, colorPickerProps, { title: titleKey ? kendo_react_intl_1.useLocalization().toLanguageString(titleKey, messages_1.messages[titleKey]) : titleKey })));
32
35
  };
@@ -1,6 +1,6 @@
1
1
  /// <reference types="prosemirror-model" />
2
2
  import * as shortcuts from './../config/shortcuts';
3
- import { Schema, NodeSpec, MarkSpec, Node, NodeType, Mark, MarkType, ParseOptions, EditorView, EditorState, Transaction, Plugin, PluginKey } from '@progress/kendo-editor-common';
3
+ import { ImageResizeOptions as ImageResizeOptionsCommon, Schema, NodeSpec, MarkSpec, Node, NodeType, Mark, MarkType, ParseOptions, EditorView, EditorState, Transaction, Plugin, PluginKey } from '@progress/kendo-editor-common';
4
4
  import { EditorToolsSettings } from './../config/toolsSettings';
5
5
  import { PasteCleanupSettings } from '../config/pasteSettings';
6
6
  /**
@@ -268,6 +268,18 @@ export declare namespace EditorUtils {
268
268
  * @returns {Plugin} - The text highlight plugin.
269
269
  */
270
270
  function textHighlight(key?: PluginKey): Plugin;
271
+ /**
272
+ * The image resizing plugin options.
273
+ */
274
+ interface ImageResizeOptions extends ImageResizeOptionsCommon {
275
+ }
276
+ /**
277
+ * Creates a plugin which adds image resizing functionality.
278
+ *
279
+ * @param {ImageResizeOptions} options - The resizing option (Optional).
280
+ * @returns {Plugin} - The image resizing plugin.
281
+ */
282
+ function imageResizing(options?: ImageResizeOptions): Plugin;
271
283
  /**
272
284
  * Sets the HTML to the `EditorView`.
273
285
  *
@@ -327,6 +339,10 @@ export declare namespace EditorUtils {
327
339
  * The `PluginKey` used in the Editor to pass editor props to the tools.
328
340
  */
329
341
  const propsKey: PluginKey;
342
+ /**
343
+ * The `PluginKey` used in the Editor by the image resizing plugin.
344
+ */
345
+ const imageResizeKey: PluginKey;
330
346
  /**
331
347
  * Represents the `marks` object of the Editor.
332
348
  */
@@ -348,6 +348,16 @@ var EditorUtils;
348
348
  return kendo_editor_common_1.textHighlight(key);
349
349
  }
350
350
  EditorUtils.textHighlight = textHighlight;
351
+ /**
352
+ * Creates a plugin which adds image resizing functionality.
353
+ *
354
+ * @param {ImageResizeOptions} options - The resizing option (Optional).
355
+ * @returns {Plugin} - The image resizing plugin.
356
+ */
357
+ function imageResizing(options) {
358
+ return kendo_editor_common_1.imageResizing(options);
359
+ }
360
+ EditorUtils.imageResizing = imageResizing;
351
361
  /**
352
362
  * Sets the HTML to the `EditorView`.
353
363
  *
@@ -399,6 +409,10 @@ var EditorUtils;
399
409
  * The `PluginKey` used in the Editor to pass editor props to the tools.
400
410
  */
401
411
  EditorUtils.propsKey = props_key_1.editorPropsKey;
412
+ /**
413
+ * The `PluginKey` used in the Editor by the image resizing plugin.
414
+ */
415
+ EditorUtils.imageResizeKey = kendo_editor_common_1.imageResizeKey;
402
416
  /**
403
417
  * Represents the `marks` object of the Editor.
404
418
  */