@covalent/text-editor 6.4.0 → 6.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/lib/text-editor.component.mjs +169 -0
- package/{esm2022 → esm2020}/lib/text-editor.module.mjs +5 -5
- package/fesm2015/covalent-text-editor.mjs +194 -0
- package/fesm2015/covalent-text-editor.mjs.map +1 -0
- package/fesm2020/covalent-text-editor.mjs +192 -0
- package/{fesm2022 → fesm2020}/covalent-text-editor.mjs.map +1 -1
- package/lib/text-editor.component.d.ts +1 -1
- package/package.json +16 -8
- package/esm2022/lib/text-editor.component.mjs +0 -172
- package/fesm2022/covalent-text-editor.mjs +0 -195
- /package/{esm2022 → esm2020}/covalent-text-editor.mjs +0 -0
- /package/{esm2022 → esm2020}/public_api.mjs +0 -0
|
@@ -1,195 +0,0 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
|
-
import { forwardRef, Component, ViewChild, Input, NgModule } from '@angular/core';
|
|
3
|
-
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
4
|
-
import { marked } from 'marked';
|
|
5
|
-
import { CommonModule } from '@angular/common';
|
|
6
|
-
|
|
7
|
-
const noop = () => {
|
|
8
|
-
// empty method
|
|
9
|
-
};
|
|
10
|
-
const EasyMDE = window.EasyMDE;
|
|
11
|
-
class TdTextEditorComponent {
|
|
12
|
-
_zone;
|
|
13
|
-
_value = '';
|
|
14
|
-
_easyMDE;
|
|
15
|
-
_fromEditor = false;
|
|
16
|
-
textarea;
|
|
17
|
-
options = {};
|
|
18
|
-
constructor(_zone) {
|
|
19
|
-
this._zone = _zone;
|
|
20
|
-
}
|
|
21
|
-
/* tslint:disable-next-line */
|
|
22
|
-
propagateChange = (_) => noop;
|
|
23
|
-
onTouched = () => noop;
|
|
24
|
-
/**
|
|
25
|
-
* value?: string
|
|
26
|
-
* Value in the Editor after async getEditorContent was called
|
|
27
|
-
*/
|
|
28
|
-
set value(value) {
|
|
29
|
-
this._value = value;
|
|
30
|
-
if (this._easyMDE) {
|
|
31
|
-
if (!this._fromEditor) {
|
|
32
|
-
this._easyMDE.value(value);
|
|
33
|
-
}
|
|
34
|
-
this.propagateChange(this._value);
|
|
35
|
-
this._fromEditor = false;
|
|
36
|
-
this._zone.run(() => (this._value = value));
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
get value() {
|
|
40
|
-
return this._value;
|
|
41
|
-
}
|
|
42
|
-
get easyMDE() {
|
|
43
|
-
return this._easyMDE;
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* Implemented as part of ControlValueAccessor.
|
|
47
|
-
*/
|
|
48
|
-
writeValue(value) {
|
|
49
|
-
this.value = !value ? '' : value;
|
|
50
|
-
}
|
|
51
|
-
registerOnChange(fn) {
|
|
52
|
-
this.propagateChange = fn;
|
|
53
|
-
}
|
|
54
|
-
registerOnTouched(fn) {
|
|
55
|
-
this.onTouched = fn;
|
|
56
|
-
}
|
|
57
|
-
ngAfterViewInit() {
|
|
58
|
-
this.options.element = this.textarea.nativeElement;
|
|
59
|
-
// If content entered is html then don't evaluate it, prevent xss vulnerabilities
|
|
60
|
-
marked.setOptions({ sanitize: true });
|
|
61
|
-
this._easyMDE = new EasyMDE(this.options);
|
|
62
|
-
this._easyMDE.value(this.value);
|
|
63
|
-
this._easyMDE.codemirror.on('change', this._onChange);
|
|
64
|
-
}
|
|
65
|
-
ngOnDestroy() {
|
|
66
|
-
this._easyMDE?.codemirror.off('change', this._onChange);
|
|
67
|
-
}
|
|
68
|
-
/* Wrapped function provided by EasyMDE */
|
|
69
|
-
isPreviewActive() {
|
|
70
|
-
return this._easyMDE.isPreviewActive();
|
|
71
|
-
}
|
|
72
|
-
isSideBySideActive() {
|
|
73
|
-
return this._easyMDE.isSideBySideActive();
|
|
74
|
-
}
|
|
75
|
-
isFullscreenActive() {
|
|
76
|
-
return this._easyMDE.isFullscreenActive();
|
|
77
|
-
}
|
|
78
|
-
clearAutosavedValue() {
|
|
79
|
-
this._easyMDE.clearAutosavedValue();
|
|
80
|
-
}
|
|
81
|
-
toTextArea() {
|
|
82
|
-
this._easyMDE.toTextArea();
|
|
83
|
-
}
|
|
84
|
-
toggleBold() {
|
|
85
|
-
EasyMDE.toggleBold(this._easyMDE);
|
|
86
|
-
}
|
|
87
|
-
toggleItalic() {
|
|
88
|
-
EasyMDE.toggleItalic(this._easyMDE);
|
|
89
|
-
}
|
|
90
|
-
toggleStrikethrough() {
|
|
91
|
-
EasyMDE.toggleStrikethrough(this._easyMDE);
|
|
92
|
-
}
|
|
93
|
-
toggleHeadingSmaller() {
|
|
94
|
-
EasyMDE.toggleHeadingSmaller(this._easyMDE);
|
|
95
|
-
}
|
|
96
|
-
toggleHeadingBigger() {
|
|
97
|
-
EasyMDE.toggleHeadingBigger(this._easyMDE);
|
|
98
|
-
}
|
|
99
|
-
toggleHeading1() {
|
|
100
|
-
EasyMDE.toggleHeading1(this._easyMDE);
|
|
101
|
-
}
|
|
102
|
-
toggleHeading2() {
|
|
103
|
-
EasyMDE.toggleHeading2(this._easyMDE);
|
|
104
|
-
}
|
|
105
|
-
toggleHeading3() {
|
|
106
|
-
EasyMDE.toggleHeading3(this._easyMDE);
|
|
107
|
-
}
|
|
108
|
-
toggleCodeBlock() {
|
|
109
|
-
EasyMDE.toggleCodeBlock(this._easyMDE);
|
|
110
|
-
}
|
|
111
|
-
toggleBlockquote() {
|
|
112
|
-
EasyMDE.toggleBlockquote(this._easyMDE);
|
|
113
|
-
}
|
|
114
|
-
toggleUnorderedList() {
|
|
115
|
-
EasyMDE.toggleUnorderedList(this._easyMDE);
|
|
116
|
-
}
|
|
117
|
-
toggleOrderedList() {
|
|
118
|
-
EasyMDE.toggleOrderedList(this._easyMDE);
|
|
119
|
-
}
|
|
120
|
-
cleanBlock() {
|
|
121
|
-
EasyMDE.cleanBlock(this._easyMDE);
|
|
122
|
-
}
|
|
123
|
-
drawLink() {
|
|
124
|
-
EasyMDE.drawLink(this._easyMDE);
|
|
125
|
-
}
|
|
126
|
-
drawImage() {
|
|
127
|
-
EasyMDE.drawImage(this._easyMDE);
|
|
128
|
-
}
|
|
129
|
-
drawTable() {
|
|
130
|
-
EasyMDE.drawTable(this._easyMDE);
|
|
131
|
-
}
|
|
132
|
-
drawHorizontalRule() {
|
|
133
|
-
EasyMDE.drawHorizontalRule(this._easyMDE);
|
|
134
|
-
}
|
|
135
|
-
togglePreview() {
|
|
136
|
-
EasyMDE.togglePreview(this._easyMDE);
|
|
137
|
-
}
|
|
138
|
-
toggleSideBySide() {
|
|
139
|
-
EasyMDE.toggleSideBySide(this._easyMDE);
|
|
140
|
-
}
|
|
141
|
-
toggleFullScreen() {
|
|
142
|
-
EasyMDE.toggleFullScreen(this._easyMDE);
|
|
143
|
-
}
|
|
144
|
-
_onChange = () => {
|
|
145
|
-
this._fromEditor = true;
|
|
146
|
-
this.writeValue(this._easyMDE?.value());
|
|
147
|
-
};
|
|
148
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: TdTextEditorComponent, deps: [{ token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
|
|
149
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.7", type: TdTextEditorComponent, selector: "td-text-editor", inputs: { options: "options", value: "value" }, providers: [
|
|
150
|
-
{
|
|
151
|
-
provide: NG_VALUE_ACCESSOR,
|
|
152
|
-
useExisting: forwardRef(() => TdTextEditorComponent),
|
|
153
|
-
multi: true,
|
|
154
|
-
},
|
|
155
|
-
], viewQueries: [{ propertyName: "textarea", first: true, predicate: ["easymde"], descendants: true, static: true }], ngImport: i0, template: "<div>\n <textarea #easymde></textarea>\n</div>\n", styles: ["@charset \"UTF-8\";:host ::ng-deep .CodeMirror{font-family:monospace;height:300px;color:#000;direction:ltr}:host ::ng-deep .CodeMirror-lines{padding:4px 0}:host ::ng-deep .CodeMirror pre.CodeMirror-line,:host ::ng-deep .CodeMirror pre.CodeMirror-line-like{padding:0 4px}:host ::ng-deep .CodeMirror-gutter-filler,:host ::ng-deep .CodeMirror-scrollbar-filler{background-color:#fff}:host ::ng-deep .CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}:host ::ng-deep .CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap}:host ::ng-deep .CodeMirror-guttermarker{color:#000}:host ::ng-deep .CodeMirror-guttermarker-subtle{color:#999}:host ::ng-deep .CodeMirror-cursor{border-left:1px solid #000;border-right:none;width:0}:host ::ng-deep .CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}:host ::ng-deep .cm-fat-cursor .CodeMirror-cursor{width:auto;border:0!important;background:#7e7}:host ::ng-deep .cm-fat-cursor div.CodeMirror-cursors{z-index:1}:host ::ng-deep .cm-fat-cursor .CodeMirror-line::selection,:host ::ng-deep .cm-fat-cursor .CodeMirror-line>span::selection,:host ::ng-deep .cm-fat-cursor .CodeMirror-line>span>span::selection{background:0 0}:host ::ng-deep .cm-fat-cursor .CodeMirror-line::-moz-selection,:host ::ng-deep .cm-fat-cursor .CodeMirror-line>span::-moz-selection,:host ::ng-deep .cm-fat-cursor .CodeMirror-line>span>span::-moz-selection{background:0 0}:host ::ng-deep .cm-fat-cursor{caret-color:transparent}@keyframes blink{50%{background-color:transparent}}:host ::ng-deep .cm-tab{display:inline-block;text-decoration:inherit}:host ::ng-deep .CodeMirror-rulers{position:absolute;inset:-50px 0 0;overflow:hidden}:host ::ng-deep .CodeMirror-ruler{border-left:1px solid #ccc;top:0;bottom:0;position:absolute}:host ::ng-deep .cm-s-default .cm-header{color:#00f}:host ::ng-deep .cm-s-default .cm-quote{color:#090}:host ::ng-deep .cm-negative{color:#d44}:host ::ng-deep .cm-positive{color:#292}:host ::ng-deep .cm-header,:host ::ng-deep .cm-strong{font-weight:700}:host ::ng-deep .cm-em{font-style:italic}:host ::ng-deep .cm-link{text-decoration:underline}:host ::ng-deep .cm-strikethrough{text-decoration:line-through}:host ::ng-deep .cm-s-default .cm-keyword{color:#708}:host ::ng-deep .cm-s-default .cm-atom{color:#219}:host ::ng-deep .cm-s-default .cm-number{color:#164}:host ::ng-deep .cm-s-default .cm-def{color:#00f}:host ::ng-deep .cm-s-default .cm-variable-2{color:#05a}:host ::ng-deep .cm-s-default .cm-type,:host ::ng-deep .cm-s-default .cm-variable-3{color:#085}:host ::ng-deep .cm-s-default .cm-comment{color:#a50}:host ::ng-deep .cm-s-default .cm-string{color:#a11}:host ::ng-deep .cm-s-default .cm-string-2{color:#f50}:host ::ng-deep .cm-s-default .cm-meta{color:#555}:host ::ng-deep .cm-s-default .cm-qualifier{color:#555}:host ::ng-deep .cm-s-default .cm-builtin{color:#30a}:host ::ng-deep .cm-s-default .cm-bracket{color:#997}:host ::ng-deep .cm-s-default .cm-tag{color:#170}:host ::ng-deep .cm-s-default .cm-attribute{color:#00c}:host ::ng-deep .cm-s-default .cm-hr{color:#999}:host ::ng-deep .cm-s-default .cm-link{color:#00c}:host ::ng-deep .cm-s-default .cm-error{color:red}:host ::ng-deep .cm-invalidchar{color:red}:host ::ng-deep .CodeMirror-composing{border-bottom:2px solid}:host ::ng-deep div.CodeMirror span.CodeMirror-matchingbracket{color:#0b0}:host ::ng-deep div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#a22}:host ::ng-deep .CodeMirror-matchingtag{background:rgba(255,150,0,.3)}:host ::ng-deep .CodeMirror-activeline-background{background:#e8f2ff}:host ::ng-deep .CodeMirror{position:relative;overflow:hidden;background:#fff}:host ::ng-deep .CodeMirror-scroll{overflow:scroll!important;margin-bottom:-50px;margin-right:-50px;padding-bottom:50px;height:100%;outline:0;position:relative;z-index:0}:host ::ng-deep .CodeMirror-sizer{position:relative;border-right:50px solid transparent}:host ::ng-deep .CodeMirror-gutter-filler,:host ::ng-deep .CodeMirror-hscrollbar,:host ::ng-deep .CodeMirror-scrollbar-filler,:host ::ng-deep .CodeMirror-vscrollbar{position:absolute;z-index:6;display:none;outline:0}:host ::ng-deep .CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}:host ::ng-deep .CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}:host ::ng-deep .CodeMirror-scrollbar-filler{right:0;bottom:0}:host ::ng-deep .CodeMirror-gutter-filler{left:0;bottom:0}:host ::ng-deep .CodeMirror-gutters{position:absolute;left:0;top:0;min-height:100%;z-index:3}:host ::ng-deep .CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;vertical-align:top;margin-bottom:-50px}:host ::ng-deep .CodeMirror-gutter-wrapper{position:absolute;z-index:4;background:0 0!important;border:none!important}:host ::ng-deep .CodeMirror-gutter-background{position:absolute;top:0;bottom:0;z-index:4}:host ::ng-deep .CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}:host ::ng-deep .CodeMirror-gutter-wrapper ::selection{background-color:transparent}:host ::ng-deep .CodeMirror-gutter-wrapper ::-moz-selection{background-color:transparent}:host ::ng-deep .CodeMirror-lines{cursor:text;min-height:1px}:host ::ng-deep .CodeMirror pre.CodeMirror-line,:host ::ng-deep .CodeMirror pre.CodeMirror-line-like{border-radius:0;border-width:0;background:0 0;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible;-webkit-tap-highlight-color:transparent;-webkit-font-variant-ligatures:contextual;font-feature-settings:\"calt\";font-variant-ligatures:contextual}:host ::ng-deep .CodeMirror-wrap pre.CodeMirror-line,:host ::ng-deep .CodeMirror-wrap pre.CodeMirror-line-like{word-wrap:break-word;white-space:pre-wrap;word-break:normal}:host ::ng-deep .CodeMirror-linebackground{position:absolute;inset:0;z-index:0}:host ::ng-deep .CodeMirror-linewidget{position:relative;z-index:2;padding:.1px}:host ::ng-deep .CodeMirror-code{outline:0}:host ::ng-deep .CodeMirror-gutter,:host ::ng-deep .CodeMirror-gutters,:host ::ng-deep .CodeMirror-linenumber,:host ::ng-deep .CodeMirror-scroll,:host ::ng-deep .CodeMirror-sizer{box-sizing:content-box}:host ::ng-deep .CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}:host ::ng-deep .CodeMirror-cursor{position:absolute;pointer-events:none}:host ::ng-deep .CodeMirror-measure pre{position:static}:host ::ng-deep div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}:host ::ng-deep div.CodeMirror-dragcursors{visibility:visible}:host ::ng-deep .CodeMirror-focused div.CodeMirror-cursors{visibility:visible}:host ::ng-deep .CodeMirror-selected{background:#d9d9d9}:host ::ng-deep .CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}:host ::ng-deep .CodeMirror-crosshair{cursor:crosshair}:host ::ng-deep .CodeMirror-line::selection,:host ::ng-deep .CodeMirror-line>span::selection,:host ::ng-deep .CodeMirror-line>span>span::selection{background:#d7d4f0}:host ::ng-deep .CodeMirror-line::-moz-selection,:host ::ng-deep .CodeMirror-line>span::-moz-selection,:host ::ng-deep .CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}:host ::ng-deep .cm-searching{background-color:#ffa;background-color:#ff06}:host ::ng-deep .cm-force-border{padding-right:.1px}@media print{:host ::ng-deep .CodeMirror div.CodeMirror-cursors{visibility:hidden}}:host ::ng-deep .cm-tab-wrap-hack:after{content:\"\"}:host ::ng-deep span.CodeMirror-selectedtext{background:0 0}:host ::ng-deep .EasyMDEContainer{display:block}:host ::ng-deep .CodeMirror-rtl pre{direction:rtl}:host ::ng-deep .EasyMDEContainer.sided--no-fullscreen{display:flex;flex-direction:row;flex-wrap:wrap}:host ::ng-deep .EasyMDEContainer .CodeMirror{box-sizing:border-box;height:auto;border:1px solid #ced4da;border-bottom-left-radius:4px;border-bottom-right-radius:4px;padding:10px;font:inherit;z-index:0;word-wrap:break-word}:host ::ng-deep .EasyMDEContainer .CodeMirror-scroll{cursor:text}:host ::ng-deep .EasyMDEContainer .CodeMirror-fullscreen{background:#fff;position:fixed!important;inset:50px 0 0;height:auto;z-index:8;border-right:none!important;border-bottom-right-radius:0!important}:host ::ng-deep .EasyMDEContainer .CodeMirror-sided{width:50%!important}:host ::ng-deep .EasyMDEContainer.sided--no-fullscreen .CodeMirror-sided{border-right:none!important;border-bottom-right-radius:0;position:relative;flex:1 1 auto}:host ::ng-deep .EasyMDEContainer .CodeMirror-placeholder{opacity:.5}:host ::ng-deep .EasyMDEContainer .CodeMirror-focused .CodeMirror-selected{background:#d9d9d9}:host ::ng-deep .editor-toolbar{position:relative;-webkit-user-select:none;-o-user-select:none;user-select:none;padding:9px 10px;border-top:1px solid #ced4da;border-left:1px solid #ced4da;border-right:1px solid #ced4da;border-top-left-radius:4px;border-top-right-radius:4px}:host ::ng-deep .editor-toolbar.fullscreen{width:100%;height:50px;padding-top:10px;padding-bottom:10px;box-sizing:border-box;background:#fff;border:0;position:fixed;top:0;left:0;opacity:1;z-index:9}:host ::ng-deep .editor-toolbar.fullscreen:before{width:20px;height:50px;background:linear-gradient(to right,#fff 0,rgba(255,255,255,0) 100%);position:fixed;top:0;left:0;margin:0;padding:0}:host ::ng-deep .editor-toolbar.fullscreen:after{width:20px;height:50px;background:linear-gradient(to right,rgba(255,255,255,0) 0,#fff 100%);position:fixed;top:0;right:0;margin:0;padding:0}:host ::ng-deep .EasyMDEContainer.sided--no-fullscreen .editor-toolbar{width:100%}:host ::ng-deep .editor-toolbar .easymde-dropdown,:host ::ng-deep .editor-toolbar button{background:0 0;display:inline-block;text-align:center;text-decoration:none!important;height:30px;margin:0;padding:0;border:1px solid transparent;border-radius:3px;cursor:pointer}:host ::ng-deep .editor-toolbar button{font-weight:700;min-width:30px;padding:0 6px;white-space:nowrap}:host ::ng-deep .editor-toolbar button.active,:host ::ng-deep .editor-toolbar button:hover{background:#fcfcfc;border-color:#95a5a6}:host ::ng-deep .editor-toolbar i.separator{display:inline-block;width:0;border-left:1px solid #d9d9d9;border-right:1px solid #fff;color:transparent;text-indent:-10px;margin:0 6px}:host ::ng-deep .editor-toolbar button:after{font-family:Arial,Helvetica Neue,Helvetica,sans-serif;font-size:65%;vertical-align:text-bottom;position:relative;top:2px}:host ::ng-deep .editor-toolbar button.heading-1:after{content:\"1\"}:host ::ng-deep .editor-toolbar button.heading-2:after{content:\"2\"}:host ::ng-deep .editor-toolbar button.heading-3:after{content:\"3\"}:host ::ng-deep .editor-toolbar button.heading-bigger:after{content:\"\\25b2\"}:host ::ng-deep .editor-toolbar button.heading-smaller:after{content:\"\\25bc\"}:host ::ng-deep .editor-toolbar.disabled-for-preview button:not(.no-disable){opacity:.6;pointer-events:none}@media only screen and (max-width: 700px){:host ::ng-deep .editor-toolbar i.no-mobile{display:none}}:host ::ng-deep .editor-statusbar{padding:8px 10px;font-size:12px;color:#959694;text-align:right}:host ::ng-deep .EasyMDEContainer.sided--no-fullscreen .editor-statusbar{width:100%}:host ::ng-deep .editor-statusbar span{display:inline-block;min-width:4em;margin-left:1em}:host ::ng-deep .editor-statusbar .lines:before{content:\"lines: \"}:host ::ng-deep .editor-statusbar .words:before{content:\"words: \"}:host ::ng-deep .editor-statusbar .characters:before{content:\"characters: \"}:host ::ng-deep .editor-preview-full{position:absolute;width:100%;height:100%;top:0;left:0;z-index:7;overflow:auto;display:none;box-sizing:border-box}:host ::ng-deep .editor-preview-side{position:fixed;bottom:0;width:50%;top:50px;right:0;z-index:9;overflow:auto;display:none;box-sizing:border-box;border:1px solid #ddd;word-wrap:break-word}:host ::ng-deep .editor-preview-active-side{display:block}:host ::ng-deep .EasyMDEContainer.sided--no-fullscreen .editor-preview-active-side{flex:1 1 auto;height:auto;position:static}:host ::ng-deep .editor-preview-active{display:block}:host ::ng-deep .editor-preview{padding:10px;background:#fafafa}:host ::ng-deep .editor-preview>p{margin-top:0}:host ::ng-deep .editor-preview pre{background:#eee;margin-bottom:10px}:host ::ng-deep .editor-preview table td,:host ::ng-deep .editor-preview table th{border:1px solid #ddd;padding:5px}:host ::ng-deep .cm-s-easymde .cm-tag{color:#63a35c}:host ::ng-deep .cm-s-easymde .cm-attribute{color:#795da3}:host ::ng-deep .cm-s-easymde .cm-string{color:#183691}:host ::ng-deep .cm-s-easymde .cm-header-1{font-size:calc(1.375rem + 1.5vw)}:host ::ng-deep .cm-s-easymde .cm-header-2{font-size:calc(1.325rem + .9vw)}:host ::ng-deep .cm-s-easymde .cm-header-3{font-size:calc(1.3rem + .6vw)}:host ::ng-deep .cm-s-easymde .cm-header-4{font-size:calc(1.275rem + .3vw)}:host ::ng-deep .cm-s-easymde .cm-header-5{font-size:1.25rem}:host ::ng-deep .cm-s-easymde .cm-header-6{font-size:1rem}:host ::ng-deep .cm-s-easymde .cm-header-1,:host ::ng-deep .cm-s-easymde .cm-header-2,:host ::ng-deep .cm-s-easymde .cm-header-3,:host ::ng-deep .cm-s-easymde .cm-header-4,:host ::ng-deep .cm-s-easymde .cm-header-5,:host ::ng-deep .cm-s-easymde .cm-header-6{margin-bottom:.5rem;line-height:1.2}:host ::ng-deep .cm-s-easymde .cm-comment{background:rgba(0,0,0,.05);border-radius:2px}:host ::ng-deep .cm-s-easymde .cm-link{color:#7f8c8d}:host ::ng-deep .cm-s-easymde .cm-url{color:#aab2b3}:host ::ng-deep .cm-s-easymde .cm-quote{color:#7f8c8d;font-style:italic}:host ::ng-deep .editor-toolbar .easymde-dropdown{position:relative;background:linear-gradient(to bottom right,#fff 0,#fff 84%,#333 50%,#333 100%);border-radius:0;border:1px solid #fff}:host ::ng-deep .editor-toolbar .easymde-dropdown:hover{background:linear-gradient(to bottom right,#fff 0,#fff 84%,#333 50%,#333 100%)}:host ::ng-deep .easymde-dropdown-content{display:block;visibility:hidden;position:absolute;background-color:#f9f9f9;box-shadow:0 8px 16px #0003;padding:8px;z-index:2;top:30px}:host ::ng-deep .easymde-dropdown:active .easymde-dropdown-content,:host ::ng-deep .easymde-dropdown:focus .easymde-dropdown-content,:host ::ng-deep .easymde-dropdown:focus-within .easymde-dropdown-content{visibility:visible}:host ::ng-deep .easymde-dropdown-content button{display:block}:host ::ng-deep span[data-img-src]:after{content:\"\";background-image:var(--bg-image);display:block;max-height:100%;max-width:100%;background-size:contain;height:0;padding-top:var(--height);width:var(--width);background-repeat:no-repeat}:host ::ng-deep .CodeMirror .cm-spell-error:not(.cm-url):not(.cm-comment):not(.cm-tag):not(.cm-word){background:rgba(255,0,0,.15)}\n"] });
|
|
156
|
-
}
|
|
157
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: TdTextEditorComponent, decorators: [{
|
|
158
|
-
type: Component,
|
|
159
|
-
args: [{ selector: 'td-text-editor', providers: [
|
|
160
|
-
{
|
|
161
|
-
provide: NG_VALUE_ACCESSOR,
|
|
162
|
-
useExisting: forwardRef(() => TdTextEditorComponent),
|
|
163
|
-
multi: true,
|
|
164
|
-
},
|
|
165
|
-
], template: "<div>\n <textarea #easymde></textarea>\n</div>\n", styles: ["@charset \"UTF-8\";:host ::ng-deep .CodeMirror{font-family:monospace;height:300px;color:#000;direction:ltr}:host ::ng-deep .CodeMirror-lines{padding:4px 0}:host ::ng-deep .CodeMirror pre.CodeMirror-line,:host ::ng-deep .CodeMirror pre.CodeMirror-line-like{padding:0 4px}:host ::ng-deep .CodeMirror-gutter-filler,:host ::ng-deep .CodeMirror-scrollbar-filler{background-color:#fff}:host ::ng-deep .CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}:host ::ng-deep .CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap}:host ::ng-deep .CodeMirror-guttermarker{color:#000}:host ::ng-deep .CodeMirror-guttermarker-subtle{color:#999}:host ::ng-deep .CodeMirror-cursor{border-left:1px solid #000;border-right:none;width:0}:host ::ng-deep .CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}:host ::ng-deep .cm-fat-cursor .CodeMirror-cursor{width:auto;border:0!important;background:#7e7}:host ::ng-deep .cm-fat-cursor div.CodeMirror-cursors{z-index:1}:host ::ng-deep .cm-fat-cursor .CodeMirror-line::selection,:host ::ng-deep .cm-fat-cursor .CodeMirror-line>span::selection,:host ::ng-deep .cm-fat-cursor .CodeMirror-line>span>span::selection{background:0 0}:host ::ng-deep .cm-fat-cursor .CodeMirror-line::-moz-selection,:host ::ng-deep .cm-fat-cursor .CodeMirror-line>span::-moz-selection,:host ::ng-deep .cm-fat-cursor .CodeMirror-line>span>span::-moz-selection{background:0 0}:host ::ng-deep .cm-fat-cursor{caret-color:transparent}@keyframes blink{50%{background-color:transparent}}:host ::ng-deep .cm-tab{display:inline-block;text-decoration:inherit}:host ::ng-deep .CodeMirror-rulers{position:absolute;inset:-50px 0 0;overflow:hidden}:host ::ng-deep .CodeMirror-ruler{border-left:1px solid #ccc;top:0;bottom:0;position:absolute}:host ::ng-deep .cm-s-default .cm-header{color:#00f}:host ::ng-deep .cm-s-default .cm-quote{color:#090}:host ::ng-deep .cm-negative{color:#d44}:host ::ng-deep .cm-positive{color:#292}:host ::ng-deep .cm-header,:host ::ng-deep .cm-strong{font-weight:700}:host ::ng-deep .cm-em{font-style:italic}:host ::ng-deep .cm-link{text-decoration:underline}:host ::ng-deep .cm-strikethrough{text-decoration:line-through}:host ::ng-deep .cm-s-default .cm-keyword{color:#708}:host ::ng-deep .cm-s-default .cm-atom{color:#219}:host ::ng-deep .cm-s-default .cm-number{color:#164}:host ::ng-deep .cm-s-default .cm-def{color:#00f}:host ::ng-deep .cm-s-default .cm-variable-2{color:#05a}:host ::ng-deep .cm-s-default .cm-type,:host ::ng-deep .cm-s-default .cm-variable-3{color:#085}:host ::ng-deep .cm-s-default .cm-comment{color:#a50}:host ::ng-deep .cm-s-default .cm-string{color:#a11}:host ::ng-deep .cm-s-default .cm-string-2{color:#f50}:host ::ng-deep .cm-s-default .cm-meta{color:#555}:host ::ng-deep .cm-s-default .cm-qualifier{color:#555}:host ::ng-deep .cm-s-default .cm-builtin{color:#30a}:host ::ng-deep .cm-s-default .cm-bracket{color:#997}:host ::ng-deep .cm-s-default .cm-tag{color:#170}:host ::ng-deep .cm-s-default .cm-attribute{color:#00c}:host ::ng-deep .cm-s-default .cm-hr{color:#999}:host ::ng-deep .cm-s-default .cm-link{color:#00c}:host ::ng-deep .cm-s-default .cm-error{color:red}:host ::ng-deep .cm-invalidchar{color:red}:host ::ng-deep .CodeMirror-composing{border-bottom:2px solid}:host ::ng-deep div.CodeMirror span.CodeMirror-matchingbracket{color:#0b0}:host ::ng-deep div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#a22}:host ::ng-deep .CodeMirror-matchingtag{background:rgba(255,150,0,.3)}:host ::ng-deep .CodeMirror-activeline-background{background:#e8f2ff}:host ::ng-deep .CodeMirror{position:relative;overflow:hidden;background:#fff}:host ::ng-deep .CodeMirror-scroll{overflow:scroll!important;margin-bottom:-50px;margin-right:-50px;padding-bottom:50px;height:100%;outline:0;position:relative;z-index:0}:host ::ng-deep .CodeMirror-sizer{position:relative;border-right:50px solid transparent}:host ::ng-deep .CodeMirror-gutter-filler,:host ::ng-deep .CodeMirror-hscrollbar,:host ::ng-deep .CodeMirror-scrollbar-filler,:host ::ng-deep .CodeMirror-vscrollbar{position:absolute;z-index:6;display:none;outline:0}:host ::ng-deep .CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}:host ::ng-deep .CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}:host ::ng-deep .CodeMirror-scrollbar-filler{right:0;bottom:0}:host ::ng-deep .CodeMirror-gutter-filler{left:0;bottom:0}:host ::ng-deep .CodeMirror-gutters{position:absolute;left:0;top:0;min-height:100%;z-index:3}:host ::ng-deep .CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;vertical-align:top;margin-bottom:-50px}:host ::ng-deep .CodeMirror-gutter-wrapper{position:absolute;z-index:4;background:0 0!important;border:none!important}:host ::ng-deep .CodeMirror-gutter-background{position:absolute;top:0;bottom:0;z-index:4}:host ::ng-deep .CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}:host ::ng-deep .CodeMirror-gutter-wrapper ::selection{background-color:transparent}:host ::ng-deep .CodeMirror-gutter-wrapper ::-moz-selection{background-color:transparent}:host ::ng-deep .CodeMirror-lines{cursor:text;min-height:1px}:host ::ng-deep .CodeMirror pre.CodeMirror-line,:host ::ng-deep .CodeMirror pre.CodeMirror-line-like{border-radius:0;border-width:0;background:0 0;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible;-webkit-tap-highlight-color:transparent;-webkit-font-variant-ligatures:contextual;font-feature-settings:\"calt\";font-variant-ligatures:contextual}:host ::ng-deep .CodeMirror-wrap pre.CodeMirror-line,:host ::ng-deep .CodeMirror-wrap pre.CodeMirror-line-like{word-wrap:break-word;white-space:pre-wrap;word-break:normal}:host ::ng-deep .CodeMirror-linebackground{position:absolute;inset:0;z-index:0}:host ::ng-deep .CodeMirror-linewidget{position:relative;z-index:2;padding:.1px}:host ::ng-deep .CodeMirror-code{outline:0}:host ::ng-deep .CodeMirror-gutter,:host ::ng-deep .CodeMirror-gutters,:host ::ng-deep .CodeMirror-linenumber,:host ::ng-deep .CodeMirror-scroll,:host ::ng-deep .CodeMirror-sizer{box-sizing:content-box}:host ::ng-deep .CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}:host ::ng-deep .CodeMirror-cursor{position:absolute;pointer-events:none}:host ::ng-deep .CodeMirror-measure pre{position:static}:host ::ng-deep div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}:host ::ng-deep div.CodeMirror-dragcursors{visibility:visible}:host ::ng-deep .CodeMirror-focused div.CodeMirror-cursors{visibility:visible}:host ::ng-deep .CodeMirror-selected{background:#d9d9d9}:host ::ng-deep .CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}:host ::ng-deep .CodeMirror-crosshair{cursor:crosshair}:host ::ng-deep .CodeMirror-line::selection,:host ::ng-deep .CodeMirror-line>span::selection,:host ::ng-deep .CodeMirror-line>span>span::selection{background:#d7d4f0}:host ::ng-deep .CodeMirror-line::-moz-selection,:host ::ng-deep .CodeMirror-line>span::-moz-selection,:host ::ng-deep .CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}:host ::ng-deep .cm-searching{background-color:#ffa;background-color:#ff06}:host ::ng-deep .cm-force-border{padding-right:.1px}@media print{:host ::ng-deep .CodeMirror div.CodeMirror-cursors{visibility:hidden}}:host ::ng-deep .cm-tab-wrap-hack:after{content:\"\"}:host ::ng-deep span.CodeMirror-selectedtext{background:0 0}:host ::ng-deep .EasyMDEContainer{display:block}:host ::ng-deep .CodeMirror-rtl pre{direction:rtl}:host ::ng-deep .EasyMDEContainer.sided--no-fullscreen{display:flex;flex-direction:row;flex-wrap:wrap}:host ::ng-deep .EasyMDEContainer .CodeMirror{box-sizing:border-box;height:auto;border:1px solid #ced4da;border-bottom-left-radius:4px;border-bottom-right-radius:4px;padding:10px;font:inherit;z-index:0;word-wrap:break-word}:host ::ng-deep .EasyMDEContainer .CodeMirror-scroll{cursor:text}:host ::ng-deep .EasyMDEContainer .CodeMirror-fullscreen{background:#fff;position:fixed!important;inset:50px 0 0;height:auto;z-index:8;border-right:none!important;border-bottom-right-radius:0!important}:host ::ng-deep .EasyMDEContainer .CodeMirror-sided{width:50%!important}:host ::ng-deep .EasyMDEContainer.sided--no-fullscreen .CodeMirror-sided{border-right:none!important;border-bottom-right-radius:0;position:relative;flex:1 1 auto}:host ::ng-deep .EasyMDEContainer .CodeMirror-placeholder{opacity:.5}:host ::ng-deep .EasyMDEContainer .CodeMirror-focused .CodeMirror-selected{background:#d9d9d9}:host ::ng-deep .editor-toolbar{position:relative;-webkit-user-select:none;-o-user-select:none;user-select:none;padding:9px 10px;border-top:1px solid #ced4da;border-left:1px solid #ced4da;border-right:1px solid #ced4da;border-top-left-radius:4px;border-top-right-radius:4px}:host ::ng-deep .editor-toolbar.fullscreen{width:100%;height:50px;padding-top:10px;padding-bottom:10px;box-sizing:border-box;background:#fff;border:0;position:fixed;top:0;left:0;opacity:1;z-index:9}:host ::ng-deep .editor-toolbar.fullscreen:before{width:20px;height:50px;background:linear-gradient(to right,#fff 0,rgba(255,255,255,0) 100%);position:fixed;top:0;left:0;margin:0;padding:0}:host ::ng-deep .editor-toolbar.fullscreen:after{width:20px;height:50px;background:linear-gradient(to right,rgba(255,255,255,0) 0,#fff 100%);position:fixed;top:0;right:0;margin:0;padding:0}:host ::ng-deep .EasyMDEContainer.sided--no-fullscreen .editor-toolbar{width:100%}:host ::ng-deep .editor-toolbar .easymde-dropdown,:host ::ng-deep .editor-toolbar button{background:0 0;display:inline-block;text-align:center;text-decoration:none!important;height:30px;margin:0;padding:0;border:1px solid transparent;border-radius:3px;cursor:pointer}:host ::ng-deep .editor-toolbar button{font-weight:700;min-width:30px;padding:0 6px;white-space:nowrap}:host ::ng-deep .editor-toolbar button.active,:host ::ng-deep .editor-toolbar button:hover{background:#fcfcfc;border-color:#95a5a6}:host ::ng-deep .editor-toolbar i.separator{display:inline-block;width:0;border-left:1px solid #d9d9d9;border-right:1px solid #fff;color:transparent;text-indent:-10px;margin:0 6px}:host ::ng-deep .editor-toolbar button:after{font-family:Arial,Helvetica Neue,Helvetica,sans-serif;font-size:65%;vertical-align:text-bottom;position:relative;top:2px}:host ::ng-deep .editor-toolbar button.heading-1:after{content:\"1\"}:host ::ng-deep .editor-toolbar button.heading-2:after{content:\"2\"}:host ::ng-deep .editor-toolbar button.heading-3:after{content:\"3\"}:host ::ng-deep .editor-toolbar button.heading-bigger:after{content:\"\\25b2\"}:host ::ng-deep .editor-toolbar button.heading-smaller:after{content:\"\\25bc\"}:host ::ng-deep .editor-toolbar.disabled-for-preview button:not(.no-disable){opacity:.6;pointer-events:none}@media only screen and (max-width: 700px){:host ::ng-deep .editor-toolbar i.no-mobile{display:none}}:host ::ng-deep .editor-statusbar{padding:8px 10px;font-size:12px;color:#959694;text-align:right}:host ::ng-deep .EasyMDEContainer.sided--no-fullscreen .editor-statusbar{width:100%}:host ::ng-deep .editor-statusbar span{display:inline-block;min-width:4em;margin-left:1em}:host ::ng-deep .editor-statusbar .lines:before{content:\"lines: \"}:host ::ng-deep .editor-statusbar .words:before{content:\"words: \"}:host ::ng-deep .editor-statusbar .characters:before{content:\"characters: \"}:host ::ng-deep .editor-preview-full{position:absolute;width:100%;height:100%;top:0;left:0;z-index:7;overflow:auto;display:none;box-sizing:border-box}:host ::ng-deep .editor-preview-side{position:fixed;bottom:0;width:50%;top:50px;right:0;z-index:9;overflow:auto;display:none;box-sizing:border-box;border:1px solid #ddd;word-wrap:break-word}:host ::ng-deep .editor-preview-active-side{display:block}:host ::ng-deep .EasyMDEContainer.sided--no-fullscreen .editor-preview-active-side{flex:1 1 auto;height:auto;position:static}:host ::ng-deep .editor-preview-active{display:block}:host ::ng-deep .editor-preview{padding:10px;background:#fafafa}:host ::ng-deep .editor-preview>p{margin-top:0}:host ::ng-deep .editor-preview pre{background:#eee;margin-bottom:10px}:host ::ng-deep .editor-preview table td,:host ::ng-deep .editor-preview table th{border:1px solid #ddd;padding:5px}:host ::ng-deep .cm-s-easymde .cm-tag{color:#63a35c}:host ::ng-deep .cm-s-easymde .cm-attribute{color:#795da3}:host ::ng-deep .cm-s-easymde .cm-string{color:#183691}:host ::ng-deep .cm-s-easymde .cm-header-1{font-size:calc(1.375rem + 1.5vw)}:host ::ng-deep .cm-s-easymde .cm-header-2{font-size:calc(1.325rem + .9vw)}:host ::ng-deep .cm-s-easymde .cm-header-3{font-size:calc(1.3rem + .6vw)}:host ::ng-deep .cm-s-easymde .cm-header-4{font-size:calc(1.275rem + .3vw)}:host ::ng-deep .cm-s-easymde .cm-header-5{font-size:1.25rem}:host ::ng-deep .cm-s-easymde .cm-header-6{font-size:1rem}:host ::ng-deep .cm-s-easymde .cm-header-1,:host ::ng-deep .cm-s-easymde .cm-header-2,:host ::ng-deep .cm-s-easymde .cm-header-3,:host ::ng-deep .cm-s-easymde .cm-header-4,:host ::ng-deep .cm-s-easymde .cm-header-5,:host ::ng-deep .cm-s-easymde .cm-header-6{margin-bottom:.5rem;line-height:1.2}:host ::ng-deep .cm-s-easymde .cm-comment{background:rgba(0,0,0,.05);border-radius:2px}:host ::ng-deep .cm-s-easymde .cm-link{color:#7f8c8d}:host ::ng-deep .cm-s-easymde .cm-url{color:#aab2b3}:host ::ng-deep .cm-s-easymde .cm-quote{color:#7f8c8d;font-style:italic}:host ::ng-deep .editor-toolbar .easymde-dropdown{position:relative;background:linear-gradient(to bottom right,#fff 0,#fff 84%,#333 50%,#333 100%);border-radius:0;border:1px solid #fff}:host ::ng-deep .editor-toolbar .easymde-dropdown:hover{background:linear-gradient(to bottom right,#fff 0,#fff 84%,#333 50%,#333 100%)}:host ::ng-deep .easymde-dropdown-content{display:block;visibility:hidden;position:absolute;background-color:#f9f9f9;box-shadow:0 8px 16px #0003;padding:8px;z-index:2;top:30px}:host ::ng-deep .easymde-dropdown:active .easymde-dropdown-content,:host ::ng-deep .easymde-dropdown:focus .easymde-dropdown-content,:host ::ng-deep .easymde-dropdown:focus-within .easymde-dropdown-content{visibility:visible}:host ::ng-deep .easymde-dropdown-content button{display:block}:host ::ng-deep span[data-img-src]:after{content:\"\";background-image:var(--bg-image);display:block;max-height:100%;max-width:100%;background-size:contain;height:0;padding-top:var(--height);width:var(--width);background-repeat:no-repeat}:host ::ng-deep .CodeMirror .cm-spell-error:not(.cm-url):not(.cm-comment):not(.cm-tag):not(.cm-word){background:rgba(255,0,0,.15)}\n"] }]
|
|
166
|
-
}], ctorParameters: function () { return [{ type: i0.NgZone }]; }, propDecorators: { textarea: [{
|
|
167
|
-
type: ViewChild,
|
|
168
|
-
args: ['easymde', { static: true }]
|
|
169
|
-
}], options: [{
|
|
170
|
-
type: Input
|
|
171
|
-
}], value: [{
|
|
172
|
-
type: Input
|
|
173
|
-
}] } });
|
|
174
|
-
|
|
175
|
-
class CovalentTextEditorModule {
|
|
176
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: CovalentTextEditorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
177
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.7", ngImport: i0, type: CovalentTextEditorModule, bootstrap: [TdTextEditorComponent], declarations: [TdTextEditorComponent], imports: [CommonModule], exports: [TdTextEditorComponent] });
|
|
178
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: CovalentTextEditorModule, imports: [CommonModule] });
|
|
179
|
-
}
|
|
180
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: CovalentTextEditorModule, decorators: [{
|
|
181
|
-
type: NgModule,
|
|
182
|
-
args: [{
|
|
183
|
-
imports: [CommonModule],
|
|
184
|
-
declarations: [TdTextEditorComponent],
|
|
185
|
-
exports: [TdTextEditorComponent],
|
|
186
|
-
bootstrap: [TdTextEditorComponent],
|
|
187
|
-
}]
|
|
188
|
-
}] });
|
|
189
|
-
|
|
190
|
-
/**
|
|
191
|
-
* Generated bundle index. Do not edit.
|
|
192
|
-
*/
|
|
193
|
-
|
|
194
|
-
export { CovalentTextEditorModule, TdTextEditorComponent };
|
|
195
|
-
//# sourceMappingURL=covalent-text-editor.mjs.map
|
|
File without changes
|
|
File without changes
|