@progress/kendo-angular-editor 3.0.4 → 3.1.1-dev.202202241728

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.
@@ -5,11 +5,11 @@
5
5
  /**
6
6
  * @hidden
7
7
  */
8
- 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 padding: 8px;\n}\n\n.ProseMirror-selectednode {\n outline: 2px solid #8cf;\n}\n\ndiv.ProseMirror {\n position: relative;\n word-wrap: break-word;\n white-space: pre-wrap;\n white-space: break-spaces;\n -webkit-font-variant-ligatures: none;\n font-variant-ligatures: none;\n font-feature-settings: \"liga\" 0; /* the above doesn't seem to work in Edge */\n}\n\ndiv.ProseMirror:focus {\n outline: none;\n}\n\n.ProseMirror pre {\n white-space: pre-wrap;\n}\n\n.ProseMirror-hideselection *::selection { background: transparent; }\n.ProseMirror-hideselection *::-moz-selection { background: transparent; }\n.ProseMirror-hideselection { caret-color: transparent; }\n\n.ProseMirror li {\n position: relative;\n}\n\nli.ProseMirror-selectednode {\n outline: none;\n}\n\nli.ProseMirror-selectednode:after {\n content: \"\";\n position: absolute;\n left: -32px;\n right: -2px;\n top: -2px;\n bottom: -2px;\n border: 2px solid #8cf;\n pointer-events: none;\n}\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.ProseMirror .k-placeholder::before {\n content: attr(data-placeholder);\n height: 0;\n color: #8a8a8a;\n float: left;\n opacity: 1;\n cursor: text;\n -webkit-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n\n/* image resizing */\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";
8
+ export var defaultStyle = "\n html, body {\n margin: 0;\n height: 100%;\n padding: 0;\n }\n\n html {\n min-height: 100%;\n }\n\n body {\n box-sizing: border-box;\n position: relative;\n word-wrap: break-word;\n padding: 8px;\n }\n\n body > .k-content {\n outline: 0;\n height: 100%;\n white-space: pre-wrap;\n }\n\n div.ProseMirror {\n position: relative;\n word-wrap: break-word;\n white-space: pre-wrap;\n white-space: break-spaces;\n -webkit-font-variant-ligatures: none;\n font-variant-ligatures: none;\n font-feature-settings: \"liga\" 0; /* the above doesn't seem to work in Edge */\n }\n\n .ProseMirror pre {\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\n .ProseMirror .k-placeholder::before {\n content: attr(data-placeholder);\n height: 0;\n color: #8a8a8a;\n float: left;\n opacity: 1;\n cursor: text;\n -webkit-user-select: none;\n -ms-user-select: none;\n user-select: none;\n }\n\n .ProseMirror li {\n position: relative;\n }\n\n li.ProseMirror-selectednode {\n outline: none;\n }\n\n li.ProseMirror-selectednode:after {\n content: \"\";\n position: absolute;\n left: -32px;\n right: -2px;\n top: -2px;\n bottom: -2px;\n border: 2px solid #8cf;\n pointer-events: none;\n }\n";
9
9
  /**
10
10
  * @hidden
11
11
  */
12
- export var tablesStyles = "\n .ProseMirror .tableWrapper {\n overflow-x: auto;\n margin: 1em 0;\n }\n\n .ProseMirror table {\n margin: 0;\n border-collapse: collapse;\n table-layout: fixed;\n width: 100%;\n overflow: hidden;\n }\n\n .ProseMirror td, .ProseMirror th {\n min-width: 1em;\n border: 1px solid #ddd;\n padding: 3px 5px;\n vertical-align: top;\n box-sizing: border-box;\n position: relative;\n }\n\n .ProseMirror th {\n font-weight: bold;\n text-align: left;\n }\n\n .ProseMirror .column-resize-handle {\n position: absolute;\n right: -2px;\n top: 0;\n bottom: 0;\n width: 4px;\n z-index: 20;\n background-color: #adf;\n pointer-events: none;\n }\n\n .ProseMirror.resize-cursor {\n cursor: ew-resize;\n cursor: col-resize;\n }\n\n /* Give selected cells a blue overlay */\n .ProseMirror .selectedCell:after {\n z-index: 2;\n position: absolute;\n content: \"\";\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n background: rgba(200, 200, 255, 0.4);\n pointer-events: none;\n }\n";
12
+ export var tablesStyles = "\n.ProseMirror .tableWrapper {\n overflow-x: auto;\n margin: 1em 0;\n}\n\n.ProseMirror table {\n margin: 0;\n border-collapse: collapse;\n table-layout: fixed;\n width: 100%;\n overflow: hidden;\n}\n\n.ProseMirror td, .ProseMirror th {\n min-width: 1em;\n border: 1px solid #ddd;\n padding: 3px 5px;\n vertical-align: top;\n box-sizing: border-box;\n position: relative;\n}\n\n.ProseMirror th {\n font-weight: bold;\n text-align: left;\n}\n\n.ProseMirror .column-resize-handle {\n position: absolute;\n right: -2px; top: 0; bottom: 0;\n width: 4px;\n z-index: 20;\n background-color: #adf;\n pointer-events: none;\n}\n\n.ProseMirror.resize-cursor {\n cursor: ew-resize;\n cursor: col-resize;\n}\n\n/* Give selected cells a blue overlay */\n.ProseMirror .selectedCell:after {\n z-index: 2;\n position: absolute;\n content: \"\";\n left: 0; right: 0; top: 0; bottom: 0;\n background: rgba(200, 200, 255, 0.4);\n pointer-events: none;\n}\n";
13
13
  /**
14
14
  * @hidden
15
15
  */
@@ -10,7 +10,7 @@ import { map, filter, take } from 'rxjs/operators';
10
10
  import { ToolBarComponent } from '@progress/kendo-angular-toolbar';
11
11
  import { DialogService } from '@progress/kendo-angular-dialog';
12
12
  import { hasObservers, isDocumentAvailable, KendoInput } from '@progress/kendo-angular-common';
13
- import { buildKeymap, buildListKeymap, getHtml, pasteCleanup, sanitize, removeComments, sanitizeClassAttr, sanitizeStyleAttr, removeAttribute, placeholder, EditorView, EditorState, baseKeymap, keymap, history, parseContent, Plugin, PluginKey, TextSelection, Schema, AllSelection, gapCursor, getSelectionText, imageResizing, tableEditing } from '@progress/kendo-editor-common';
13
+ import { buildKeymap, buildListKeymap, getHtml, pasteCleanup, sanitize, removeComments, sanitizeClassAttr, sanitizeStyleAttr, removeAttribute, placeholder, EditorView, EditorState, baseKeymap, keymap, history, parseContent, Plugin, PluginKey, TextSelection, Schema, AllSelection, gapCursor, getSelectionText, imageResizing, tableEditing, caretColor } from '@progress/kendo-editor-common';
14
14
  import { validatePackage } from '@progress/kendo-licensing';
15
15
  import { packageMetadata } from './package-metadata';
16
16
  import { schema } from './config/schema';
@@ -690,6 +690,7 @@ var EditorComponent = /** @class */ (function () {
690
690
  }
691
691
  });
692
692
  var element = iframeDoc_1.createElement('div');
693
+ element.classList.add('k-content');
693
694
  iframeDoc_1.body.appendChild(element);
694
695
  }
695
696
  else {
@@ -722,7 +723,8 @@ var EditorComponent = /** @class */ (function () {
722
723
  keymap(baseKeymap),
723
724
  gapCursor(),
724
725
  imageResizing(),
725
- tableEditing()
726
+ tableEditing(),
727
+ caretColor()
726
728
  ];
727
729
  if (this.placeholder) {
728
730
  defaultPlugins.push(placeholder(this.placeholder));
@@ -9,7 +9,7 @@ export var packageMetadata = {
9
9
  name: '@progress/kendo-angular-editor',
10
10
  productName: 'Kendo UI for Angular',
11
11
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
12
- publishDate: 1644219296,
12
+ publishDate: 1645723493,
13
13
  version: '',
14
14
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
15
15
  };
@@ -5,11 +5,11 @@
5
5
  /**
6
6
  * @hidden
7
7
  */
8
- 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 padding: 8px;\n}\n\n.ProseMirror-selectednode {\n outline: 2px solid #8cf;\n}\n\ndiv.ProseMirror {\n position: relative;\n word-wrap: break-word;\n white-space: pre-wrap;\n white-space: break-spaces;\n -webkit-font-variant-ligatures: none;\n font-variant-ligatures: none;\n font-feature-settings: \"liga\" 0; /* the above doesn't seem to work in Edge */\n}\n\ndiv.ProseMirror:focus {\n outline: none;\n}\n\n.ProseMirror pre {\n white-space: pre-wrap;\n}\n\n.ProseMirror-hideselection *::selection { background: transparent; }\n.ProseMirror-hideselection *::-moz-selection { background: transparent; }\n.ProseMirror-hideselection { caret-color: transparent; }\n\n.ProseMirror li {\n position: relative;\n}\n\nli.ProseMirror-selectednode {\n outline: none;\n}\n\nli.ProseMirror-selectednode:after {\n content: \"\";\n position: absolute;\n left: -32px;\n right: -2px;\n top: -2px;\n bottom: -2px;\n border: 2px solid #8cf;\n pointer-events: none;\n}\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.ProseMirror .k-placeholder::before {\n content: attr(data-placeholder);\n height: 0;\n color: #8a8a8a;\n float: left;\n opacity: 1;\n cursor: text;\n -webkit-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n\n/* image resizing */\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";
8
+ export declare const defaultStyle = "\n html, body {\n margin: 0;\n height: 100%;\n padding: 0;\n }\n\n html {\n min-height: 100%;\n }\n\n body {\n box-sizing: border-box;\n position: relative;\n word-wrap: break-word;\n padding: 8px;\n }\n\n body > .k-content {\n outline: 0;\n height: 100%;\n white-space: pre-wrap;\n }\n\n div.ProseMirror {\n position: relative;\n word-wrap: break-word;\n white-space: pre-wrap;\n white-space: break-spaces;\n -webkit-font-variant-ligatures: none;\n font-variant-ligatures: none;\n font-feature-settings: \"liga\" 0; /* the above doesn't seem to work in Edge */\n }\n\n .ProseMirror pre {\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\n .ProseMirror .k-placeholder::before {\n content: attr(data-placeholder);\n height: 0;\n color: #8a8a8a;\n float: left;\n opacity: 1;\n cursor: text;\n -webkit-user-select: none;\n -ms-user-select: none;\n user-select: none;\n }\n\n .ProseMirror li {\n position: relative;\n }\n\n li.ProseMirror-selectednode {\n outline: none;\n }\n\n li.ProseMirror-selectednode:after {\n content: \"\";\n position: absolute;\n left: -32px;\n right: -2px;\n top: -2px;\n bottom: -2px;\n border: 2px solid #8cf;\n pointer-events: none;\n }\n";
9
9
  /**
10
10
  * @hidden
11
11
  */
12
- export declare const tablesStyles = "\n .ProseMirror .tableWrapper {\n overflow-x: auto;\n margin: 1em 0;\n }\n\n .ProseMirror table {\n margin: 0;\n border-collapse: collapse;\n table-layout: fixed;\n width: 100%;\n overflow: hidden;\n }\n\n .ProseMirror td, .ProseMirror th {\n min-width: 1em;\n border: 1px solid #ddd;\n padding: 3px 5px;\n vertical-align: top;\n box-sizing: border-box;\n position: relative;\n }\n\n .ProseMirror th {\n font-weight: bold;\n text-align: left;\n }\n\n .ProseMirror .column-resize-handle {\n position: absolute;\n right: -2px;\n top: 0;\n bottom: 0;\n width: 4px;\n z-index: 20;\n background-color: #adf;\n pointer-events: none;\n }\n\n .ProseMirror.resize-cursor {\n cursor: ew-resize;\n cursor: col-resize;\n }\n\n /* Give selected cells a blue overlay */\n .ProseMirror .selectedCell:after {\n z-index: 2;\n position: absolute;\n content: \"\";\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n background: rgba(200, 200, 255, 0.4);\n pointer-events: none;\n }\n";
12
+ export declare const tablesStyles = "\n.ProseMirror .tableWrapper {\n overflow-x: auto;\n margin: 1em 0;\n}\n\n.ProseMirror table {\n margin: 0;\n border-collapse: collapse;\n table-layout: fixed;\n width: 100%;\n overflow: hidden;\n}\n\n.ProseMirror td, .ProseMirror th {\n min-width: 1em;\n border: 1px solid #ddd;\n padding: 3px 5px;\n vertical-align: top;\n box-sizing: border-box;\n position: relative;\n}\n\n.ProseMirror th {\n font-weight: bold;\n text-align: left;\n}\n\n.ProseMirror .column-resize-handle {\n position: absolute;\n right: -2px; top: 0; bottom: 0;\n width: 4px;\n z-index: 20;\n background-color: #adf;\n pointer-events: none;\n}\n\n.ProseMirror.resize-cursor {\n cursor: ew-resize;\n cursor: col-resize;\n}\n\n/* Give selected cells a blue overlay */\n.ProseMirror .selectedCell:after {\n z-index: 2;\n position: absolute;\n content: \"\";\n left: 0; right: 0; top: 0; bottom: 0;\n background: rgba(200, 200, 255, 0.4);\n pointer-events: none;\n}\n";
13
13
  /**
14
14
  * @hidden
15
15
  */
@@ -6,236 +6,250 @@
6
6
  * @hidden
7
7
  */
8
8
  export const defaultStyle = `
9
- html, body {
10
- margin: 0;
11
- height: 100%;
12
- padding: 0;
13
- }
9
+ html, body {
10
+ margin: 0;
11
+ height: 100%;
12
+ padding: 0;
13
+ }
14
14
 
15
- html {
16
- min-height: 100%;
17
- }
15
+ html {
16
+ min-height: 100%;
17
+ }
18
18
 
19
- body {
20
- box-sizing: border-box;
21
- position: relative;
22
- padding: 8px;
23
- }
19
+ body {
20
+ box-sizing: border-box;
21
+ position: relative;
22
+ word-wrap: break-word;
23
+ padding: 8px;
24
+ }
24
25
 
25
- .ProseMirror-selectednode {
26
- outline: 2px solid #8cf;
27
- }
26
+ body > .k-content {
27
+ outline: 0;
28
+ height: 100%;
29
+ white-space: pre-wrap;
30
+ }
28
31
 
29
- div.ProseMirror {
30
- position: relative;
31
- word-wrap: break-word;
32
- white-space: pre-wrap;
33
- white-space: break-spaces;
34
- -webkit-font-variant-ligatures: none;
35
- font-variant-ligatures: none;
36
- font-feature-settings: "liga" 0; /* the above doesn't seem to work in Edge */
37
- }
32
+ div.ProseMirror {
33
+ position: relative;
34
+ word-wrap: break-word;
35
+ white-space: pre-wrap;
36
+ white-space: break-spaces;
37
+ -webkit-font-variant-ligatures: none;
38
+ font-variant-ligatures: none;
39
+ font-feature-settings: "liga" 0; /* the above doesn't seem to work in Edge */
40
+ }
38
41
 
39
- div.ProseMirror:focus {
40
- outline: none;
41
- }
42
+ .ProseMirror pre {
43
+ white-space: pre-wrap;
44
+ }
42
45
 
43
- .ProseMirror pre {
44
- white-space: pre-wrap;
45
- }
46
+ .k-content > p {
47
+ margin: 0 0 1em;
48
+ }
46
49
 
47
- .ProseMirror-hideselection *::selection { background: transparent; }
48
- .ProseMirror-hideselection *::-moz-selection { background: transparent; }
49
- .ProseMirror-hideselection { caret-color: transparent; }
50
+ .k-content table {
51
+ white-space: pre-wrap;
52
+ }
50
53
 
51
- .ProseMirror li {
52
- position: relative;
53
- }
54
+ .k-content .k-text-selected, .k-content::selection {
55
+ color: HighlightText;
56
+ background-color: Highlight;
57
+ }
54
58
 
55
- li.ProseMirror-selectednode {
56
- outline: none;
57
- }
59
+ .k-content .k-text-highlighted {
60
+ background-color: #bbdefb;
61
+ }
58
62
 
59
- li.ProseMirror-selectednode:after {
60
- content: "";
61
- position: absolute;
62
- left: -32px;
63
- right: -2px;
64
- top: -2px;
65
- bottom: -2px;
66
- border: 2px solid #8cf;
67
- pointer-events: none;
68
- }
63
+ .k-content .ProseMirror-selectednode {
64
+ outline: 2px solid #8cf;
65
+ }
69
66
 
70
- .ProseMirror-gapcursor {
71
- display: none;
72
- pointer-events: none;
73
- position: absolute;
74
- }
67
+ .ProseMirror-hideselection *::selection { background: transparent; }
68
+ .ProseMirror-hideselection *::-moz-selection { background: transparent; }
69
+ .ProseMirror-hideselection { caret-color: transparent; }
75
70
 
76
- .ProseMirror-gapcursor:after {
77
- content: "";
78
- display: block;
79
- position: absolute;
80
- top: -2px;
81
- width: 20px;
82
- border-top: 1px solid black;
83
- animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;
84
- }
71
+ .ProseMirror-gapcursor {
72
+ display: none;
73
+ pointer-events: none;
74
+ position: absolute;
75
+ }
85
76
 
86
- @keyframes ProseMirror-cursor-blink {
87
- to {
88
- visibility: hidden;
89
- }
90
- }
77
+ .ProseMirror-gapcursor:after {
78
+ content: "";
79
+ display: block;
80
+ position: absolute;
81
+ top: -2px;
82
+ width: 20px;
83
+ border-top: 1px solid black;
84
+ animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;
85
+ }
91
86
 
92
- .ProseMirror-focused .ProseMirror-gapcursor {
93
- display: block;
94
- }
87
+ @keyframes ProseMirror-cursor-blink {
88
+ to {
89
+ visibility: hidden;
90
+ }
91
+ }
95
92
 
96
- .ProseMirror .k-placeholder::before {
97
- content: attr(data-placeholder);
98
- height: 0;
99
- color: #8a8a8a;
100
- float: left;
101
- opacity: 1;
102
- cursor: text;
103
- -webkit-user-select: none;
104
- -ms-user-select: none;
105
- user-select: none;
106
- }
93
+ .ProseMirror-focused .ProseMirror-gapcursor {
94
+ display: block;
95
+ }
107
96
 
108
- /* image resizing */
109
- .k-editor-resize-handles-wrapper {
110
- position: absolute;
111
- visibility: hidden;
112
- }
97
+ .k-editor-resize-handles-wrapper {
98
+ position: absolute;
99
+ visibility: hidden;
100
+ }
113
101
 
114
- .k-editor-resize-handle {
115
- position: absolute;
116
- visibility: visible;
117
- background-color: #fff;
118
- border: 1px solid #000;
119
- z-index: 100;
120
- width: 5px;
121
- height: 5px;
122
- }
102
+ .k-editor-resize-handle {
103
+ position: absolute;
104
+ visibility: visible;
105
+ background-color: #fff;
106
+ border: 1px solid #000;
107
+ z-index: 100;
108
+ width: 5px;
109
+ height: 5px;
110
+ }
123
111
 
124
- .k-editor-resize-handle.northwest {
125
- top: 0;
126
- left: 0;
127
- transform: translate(-50%, -50%);
128
- cursor: nw-resize;
129
- }
112
+ .k-editor-resize-handle.northwest {
113
+ top: 0;
114
+ left: 0;
115
+ transform: translate(-50%, -50%);
116
+ cursor: nw-resize;
117
+ }
130
118
 
131
- .k-editor-resize-handle.north {
132
- top: 0;
133
- left: 50%;
134
- transform: translate(-50%, -50%);
135
- cursor: n-resize;
136
- }
119
+ .k-editor-resize-handle.north {
120
+ top: 0;
121
+ left: 50%;
122
+ transform: translate(-50%, -50%);
123
+ cursor: n-resize;
124
+ }
137
125
 
138
- .k-editor-resize-handle.northeast {
139
- top: 0;
140
- right: 0;
141
- transform: translate(50%, -50%);
142
- cursor: ne-resize;
143
- }
126
+ .k-editor-resize-handle.northeast {
127
+ top: 0;
128
+ right: 0;
129
+ transform: translate(50%, -50%);
130
+ cursor: ne-resize;
131
+ }
144
132
 
145
- .k-editor-resize-handle.southwest {
146
- left: 0;
147
- bottom: 0;
148
- transform: translate(-50%, 50%);
149
- cursor: sw-resize;
150
- }
133
+ .k-editor-resize-handle.southwest {
134
+ left: 0;
135
+ bottom: 0;
136
+ transform: translate(-50%, 50%);
137
+ cursor: sw-resize;
138
+ }
151
139
 
152
- .k-editor-resize-handle.south {
153
- bottom: 0;
154
- left: 50%;
155
- transform: translate(-50%, 50%);
156
- cursor: s-resize;
157
- }
140
+ .k-editor-resize-handle.south {
141
+ bottom: 0;
142
+ left: 50%;
143
+ transform: translate(-50%, 50%);
144
+ cursor: s-resize;
145
+ }
158
146
 
159
- .k-editor-resize-handle.southeast {
160
- right: 0;
161
- bottom: 0;
162
- transform: translate(50%, 50%);
163
- cursor: se-resize;
164
- }
147
+ .k-editor-resize-handle.southeast {
148
+ right: 0;
149
+ bottom: 0;
150
+ transform: translate(50%, 50%);
151
+ cursor: se-resize;
152
+ }
165
153
 
166
- .k-editor-resize-handle.west {
167
- top: 50%;
168
- left: 0;
169
- transform: translate(-50%, -50%);
170
- cursor: w-resize;
171
- }
154
+ .k-editor-resize-handle.west {
155
+ top: 50%;
156
+ left: 0;
157
+ transform: translate(-50%, -50%);
158
+ cursor: w-resize;
159
+ }
172
160
 
173
- .k-editor-resize-handle.east {
174
- top: 50%;
175
- right: 0;
176
- transform: translate(50%, -50%);
177
- cursor: e-resize;
178
- }
161
+ .k-editor-resize-handle.east {
162
+ top: 50%;
163
+ right: 0;
164
+ transform: translate(50%, -50%);
165
+ cursor: e-resize;
166
+ }
167
+
168
+ .ProseMirror .k-placeholder::before {
169
+ content: attr(data-placeholder);
170
+ height: 0;
171
+ color: #8a8a8a;
172
+ float: left;
173
+ opacity: 1;
174
+ cursor: text;
175
+ -webkit-user-select: none;
176
+ -ms-user-select: none;
177
+ user-select: none;
178
+ }
179
+
180
+ .ProseMirror li {
181
+ position: relative;
182
+ }
183
+
184
+ li.ProseMirror-selectednode {
185
+ outline: none;
186
+ }
187
+
188
+ li.ProseMirror-selectednode:after {
189
+ content: "";
190
+ position: absolute;
191
+ left: -32px;
192
+ right: -2px;
193
+ top: -2px;
194
+ bottom: -2px;
195
+ border: 2px solid #8cf;
196
+ pointer-events: none;
197
+ }
179
198
  `;
180
199
  /**
181
200
  * @hidden
182
201
  */
183
202
  export const tablesStyles = `
184
- .ProseMirror .tableWrapper {
203
+ .ProseMirror .tableWrapper {
185
204
  overflow-x: auto;
186
205
  margin: 1em 0;
187
- }
206
+ }
188
207
 
189
- .ProseMirror table {
208
+ .ProseMirror table {
190
209
  margin: 0;
191
210
  border-collapse: collapse;
192
211
  table-layout: fixed;
193
212
  width: 100%;
194
213
  overflow: hidden;
195
- }
214
+ }
196
215
 
197
- .ProseMirror td, .ProseMirror th {
216
+ .ProseMirror td, .ProseMirror th {
198
217
  min-width: 1em;
199
218
  border: 1px solid #ddd;
200
219
  padding: 3px 5px;
201
220
  vertical-align: top;
202
221
  box-sizing: border-box;
203
222
  position: relative;
204
- }
223
+ }
205
224
 
206
- .ProseMirror th {
225
+ .ProseMirror th {
207
226
  font-weight: bold;
208
227
  text-align: left;
209
- }
228
+ }
210
229
 
211
- .ProseMirror .column-resize-handle {
230
+ .ProseMirror .column-resize-handle {
212
231
  position: absolute;
213
- right: -2px;
214
- top: 0;
215
- bottom: 0;
232
+ right: -2px; top: 0; bottom: 0;
216
233
  width: 4px;
217
234
  z-index: 20;
218
235
  background-color: #adf;
219
236
  pointer-events: none;
220
- }
237
+ }
221
238
 
222
- .ProseMirror.resize-cursor {
239
+ .ProseMirror.resize-cursor {
223
240
  cursor: ew-resize;
224
241
  cursor: col-resize;
225
- }
242
+ }
226
243
 
227
- /* Give selected cells a blue overlay */
228
- .ProseMirror .selectedCell:after {
244
+ /* Give selected cells a blue overlay */
245
+ .ProseMirror .selectedCell:after {
229
246
  z-index: 2;
230
247
  position: absolute;
231
248
  content: "";
232
- left: 0;
233
- right: 0;
234
- top: 0;
235
- bottom: 0;
249
+ left: 0; right: 0; top: 0; bottom: 0;
236
250
  background: rgba(200, 200, 255, 0.4);
237
251
  pointer-events: none;
238
- }
252
+ }
239
253
  `;
240
254
  /**
241
255
  * @hidden
@@ -11,7 +11,7 @@ import { map, filter, take } from 'rxjs/operators';
11
11
  import { ToolBarComponent } from '@progress/kendo-angular-toolbar';
12
12
  import { DialogService } from '@progress/kendo-angular-dialog';
13
13
  import { hasObservers, isDocumentAvailable, KendoInput } from '@progress/kendo-angular-common';
14
- import { buildKeymap, buildListKeymap, getHtml, pasteCleanup, sanitize, removeComments, sanitizeClassAttr, sanitizeStyleAttr, removeAttribute, placeholder, EditorView, EditorState, baseKeymap, keymap, history, parseContent, Plugin, PluginKey, TextSelection, Schema, AllSelection, gapCursor, getSelectionText, imageResizing, tableEditing } from '@progress/kendo-editor-common';
14
+ import { buildKeymap, buildListKeymap, getHtml, pasteCleanup, sanitize, removeComments, sanitizeClassAttr, sanitizeStyleAttr, removeAttribute, placeholder, EditorView, EditorState, baseKeymap, keymap, history, parseContent, Plugin, PluginKey, TextSelection, Schema, AllSelection, gapCursor, getSelectionText, imageResizing, tableEditing, caretColor } from '@progress/kendo-editor-common';
15
15
  import { validatePackage } from '@progress/kendo-licensing';
16
16
  import { packageMetadata } from './package-metadata';
17
17
  import { schema } from './config/schema';
@@ -606,6 +606,7 @@ let EditorComponent = EditorComponent_1 = class EditorComponent {
606
606
  }
607
607
  });
608
608
  const element = iframeDoc.createElement('div');
609
+ element.classList.add('k-content');
609
610
  iframeDoc.body.appendChild(element);
610
611
  }
611
612
  else {
@@ -638,7 +639,8 @@ let EditorComponent = EditorComponent_1 = class EditorComponent {
638
639
  keymap(baseKeymap),
639
640
  gapCursor(),
640
641
  imageResizing(),
641
- tableEditing()
642
+ tableEditing(),
643
+ caretColor()
642
644
  ];
643
645
  if (this.placeholder) {
644
646
  defaultPlugins.push(placeholder(this.placeholder));