@covalent/text-editor 4.0.0 → 4.1.0-develop.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/README.md +17 -18
- package/covalent-text-editor.d.ts +2 -1
- package/esm2020/covalent-text-editor.mjs +5 -0
- package/esm2020/lib/text-editor.component.mjs +166 -0
- package/esm2020/lib/text-editor.module.mjs +19 -0
- package/esm2020/public_api.mjs +3 -0
- package/fesm2015/covalent-text-editor.mjs +188 -0
- package/fesm2015/covalent-text-editor.mjs.map +1 -0
- package/fesm2020/covalent-text-editor.mjs +188 -0
- package/fesm2020/covalent-text-editor.mjs.map +1 -0
- package/{text-editor.component.d.ts → lib/text-editor.component.d.ts} +4 -1
- package/lib/text-editor.module.d.ts +8 -0
- package/package.json +25 -41
- package/public_api.d.ts +2 -0
- package/bundles/covalent-text-editor.umd.js +0 -390
- package/bundles/covalent-text-editor.umd.js.map +0 -1
- package/bundles/covalent-text-editor.umd.min.js +0 -2
- package/bundles/covalent-text-editor.umd.min.js.map +0 -1
- package/covalent-text-editor.metadata.json +0 -1
- package/esm2015/covalent-text-editor.js +0 -10
- package/esm2015/index.js +0 -7
- package/esm2015/public-api.js +0 -8
- package/esm2015/text-editor.component.js +0 -319
- package/esm2015/text-editor.module.js +0 -19
- package/fesm2015/covalent-text-editor.js +0 -355
- package/fesm2015/covalent-text-editor.js.map +0 -1
- package/index.d.ts +0 -1
- package/public-api.d.ts +0 -2
- package/text-editor.component.scss +0 -5
- package/text-editor.module.d.ts +0 -2
|
@@ -1,390 +0,0 @@
|
|
|
1
|
-
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/forms'), require('easymde'), require('marked'), require('@angular/common')) :
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@covalent/text-editor', ['exports', '@angular/core', '@angular/forms', 'easymde', 'marked', '@angular/common'], factory) :
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.covalent = global.covalent || {}, global.covalent['text-editor'] = {}), global.ng.core, global.ng.forms, global.EasyMDE, global.marked, global.ng.common));
|
|
5
|
-
}(this, (function (exports, core, forms, EasyMDE, marked, common) { 'use strict';
|
|
6
|
-
|
|
7
|
-
function _interopNamespace(e) {
|
|
8
|
-
if (e && e.__esModule) return e;
|
|
9
|
-
var n = Object.create(null);
|
|
10
|
-
if (e) {
|
|
11
|
-
Object.keys(e).forEach(function (k) {
|
|
12
|
-
if (k !== 'default') {
|
|
13
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
14
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
15
|
-
enumerable: true,
|
|
16
|
-
get: function () {
|
|
17
|
-
return e[k];
|
|
18
|
-
}
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
n['default'] = e;
|
|
24
|
-
return Object.freeze(n);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
var EasyMDE__namespace = /*#__PURE__*/_interopNamespace(EasyMDE);
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* @fileoverview added by tsickle
|
|
31
|
-
* Generated from: text-editor.component.ts
|
|
32
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
33
|
-
*/
|
|
34
|
-
/** @type {?} */
|
|
35
|
-
var noop = ( /**
|
|
36
|
-
* @return {?}
|
|
37
|
-
*/function () {
|
|
38
|
-
// empty method
|
|
39
|
-
});
|
|
40
|
-
var ɵ0 = noop;
|
|
41
|
-
var TdTextEditorComponent = /** @class */ (function () {
|
|
42
|
-
/**
|
|
43
|
-
* @param {?} _zone
|
|
44
|
-
*/
|
|
45
|
-
function TdTextEditorComponent(_zone) {
|
|
46
|
-
this._zone = _zone;
|
|
47
|
-
this._value = '';
|
|
48
|
-
this._fromEditor = false;
|
|
49
|
-
this.options = {};
|
|
50
|
-
/* tslint:disable-next-line */
|
|
51
|
-
this.propagateChange = ( /**
|
|
52
|
-
* @param {?} _
|
|
53
|
-
* @return {?}
|
|
54
|
-
*/function (_) { });
|
|
55
|
-
this.onTouched = ( /**
|
|
56
|
-
* @return {?}
|
|
57
|
-
*/function () { return noop; });
|
|
58
|
-
}
|
|
59
|
-
Object.defineProperty(TdTextEditorComponent.prototype, "value", {
|
|
60
|
-
/**
|
|
61
|
-
* @return {?}
|
|
62
|
-
*/
|
|
63
|
-
get: function () {
|
|
64
|
-
return this._value;
|
|
65
|
-
},
|
|
66
|
-
/**
|
|
67
|
-
* value?: string
|
|
68
|
-
* Value in the Editor after async getEditorContent was called
|
|
69
|
-
* @param {?} value
|
|
70
|
-
* @return {?}
|
|
71
|
-
*/
|
|
72
|
-
set: function (value) {
|
|
73
|
-
var _this = this;
|
|
74
|
-
this._value = value;
|
|
75
|
-
if (this._easyMDE) {
|
|
76
|
-
if (!this._fromEditor) {
|
|
77
|
-
this._easyMDE.value(value);
|
|
78
|
-
}
|
|
79
|
-
this.propagateChange(this._value);
|
|
80
|
-
this._fromEditor = false;
|
|
81
|
-
this._zone.run(( /**
|
|
82
|
-
* @return {?}
|
|
83
|
-
*/function () { return (_this._value = value); }));
|
|
84
|
-
}
|
|
85
|
-
},
|
|
86
|
-
enumerable: false,
|
|
87
|
-
configurable: true
|
|
88
|
-
});
|
|
89
|
-
Object.defineProperty(TdTextEditorComponent.prototype, "easyMDE", {
|
|
90
|
-
/**
|
|
91
|
-
* @return {?}
|
|
92
|
-
*/
|
|
93
|
-
get: function () {
|
|
94
|
-
return this._easyMDE;
|
|
95
|
-
},
|
|
96
|
-
enumerable: false,
|
|
97
|
-
configurable: true
|
|
98
|
-
});
|
|
99
|
-
/**
|
|
100
|
-
* Implemented as part of ControlValueAccessor.
|
|
101
|
-
* @param {?} value
|
|
102
|
-
* @return {?}
|
|
103
|
-
*/
|
|
104
|
-
TdTextEditorComponent.prototype.writeValue = function (value) {
|
|
105
|
-
this.value = !value ? '' : value;
|
|
106
|
-
};
|
|
107
|
-
/**
|
|
108
|
-
* @param {?} fn
|
|
109
|
-
* @return {?}
|
|
110
|
-
*/
|
|
111
|
-
TdTextEditorComponent.prototype.registerOnChange = function (fn) {
|
|
112
|
-
this.propagateChange = fn;
|
|
113
|
-
};
|
|
114
|
-
/**
|
|
115
|
-
* @param {?} fn
|
|
116
|
-
* @return {?}
|
|
117
|
-
*/
|
|
118
|
-
TdTextEditorComponent.prototype.registerOnTouched = function (fn) {
|
|
119
|
-
this.onTouched = fn;
|
|
120
|
-
};
|
|
121
|
-
/**
|
|
122
|
-
* @return {?}
|
|
123
|
-
*/
|
|
124
|
-
TdTextEditorComponent.prototype.ngAfterViewInit = function () {
|
|
125
|
-
var _this = this;
|
|
126
|
-
this.options.element = this.textarea.nativeElement;
|
|
127
|
-
// If content entered is html then don't evaluate it, prevent xss vulnerabilities
|
|
128
|
-
marked.setOptions({ sanitize: true });
|
|
129
|
-
this._easyMDE = new EasyMDE__namespace(this.options);
|
|
130
|
-
this._easyMDE.value(this.value);
|
|
131
|
-
this._easyMDE.codemirror.on('change', ( /**
|
|
132
|
-
* @return {?}
|
|
133
|
-
*/function () {
|
|
134
|
-
_this._fromEditor = true;
|
|
135
|
-
_this.writeValue(_this._easyMDE.value());
|
|
136
|
-
}));
|
|
137
|
-
};
|
|
138
|
-
/* Wrapped function provided by EasyMDE */
|
|
139
|
-
/**
|
|
140
|
-
* @return {?}
|
|
141
|
-
*/
|
|
142
|
-
TdTextEditorComponent.prototype.isPreviewActive = function () {
|
|
143
|
-
return this._easyMDE.isPreviewActive();
|
|
144
|
-
};
|
|
145
|
-
/**
|
|
146
|
-
* @return {?}
|
|
147
|
-
*/
|
|
148
|
-
TdTextEditorComponent.prototype.isSideBySideActive = function () {
|
|
149
|
-
return this._easyMDE.isSideBySideActive();
|
|
150
|
-
};
|
|
151
|
-
/**
|
|
152
|
-
* @return {?}
|
|
153
|
-
*/
|
|
154
|
-
TdTextEditorComponent.prototype.isFullscreenActive = function () {
|
|
155
|
-
return this._easyMDE.isFullscreenActive();
|
|
156
|
-
};
|
|
157
|
-
/**
|
|
158
|
-
* @return {?}
|
|
159
|
-
*/
|
|
160
|
-
TdTextEditorComponent.prototype.clearAutosavedValue = function () {
|
|
161
|
-
this._easyMDE.clearAutosavedValue();
|
|
162
|
-
};
|
|
163
|
-
/**
|
|
164
|
-
* @return {?}
|
|
165
|
-
*/
|
|
166
|
-
TdTextEditorComponent.prototype.toTextArea = function () {
|
|
167
|
-
this._easyMDE.toTextArea();
|
|
168
|
-
};
|
|
169
|
-
/**
|
|
170
|
-
* @return {?}
|
|
171
|
-
*/
|
|
172
|
-
TdTextEditorComponent.prototype.toggleBold = function () {
|
|
173
|
-
this._easyMDE.toggleBold();
|
|
174
|
-
};
|
|
175
|
-
/**
|
|
176
|
-
* @return {?}
|
|
177
|
-
*/
|
|
178
|
-
TdTextEditorComponent.prototype.toggleItalic = function () {
|
|
179
|
-
this._easyMDE.toggleItalic();
|
|
180
|
-
};
|
|
181
|
-
/**
|
|
182
|
-
* @return {?}
|
|
183
|
-
*/
|
|
184
|
-
TdTextEditorComponent.prototype.toggleStrikethrough = function () {
|
|
185
|
-
this._easyMDE.toggleStrikethrough();
|
|
186
|
-
};
|
|
187
|
-
/**
|
|
188
|
-
* @return {?}
|
|
189
|
-
*/
|
|
190
|
-
TdTextEditorComponent.prototype.toggleHeadingSmaller = function () {
|
|
191
|
-
this._easyMDE.toggleHeadingSmaller();
|
|
192
|
-
};
|
|
193
|
-
/**
|
|
194
|
-
* @return {?}
|
|
195
|
-
*/
|
|
196
|
-
TdTextEditorComponent.prototype.toggleHeadingBigger = function () {
|
|
197
|
-
this._easyMDE.toggleHeadingBigger();
|
|
198
|
-
};
|
|
199
|
-
/**
|
|
200
|
-
* @return {?}
|
|
201
|
-
*/
|
|
202
|
-
TdTextEditorComponent.prototype.toggleHeading1 = function () {
|
|
203
|
-
this._easyMDE.toggleHeading1();
|
|
204
|
-
};
|
|
205
|
-
/**
|
|
206
|
-
* @return {?}
|
|
207
|
-
*/
|
|
208
|
-
TdTextEditorComponent.prototype.toggleHeading2 = function () {
|
|
209
|
-
this._easyMDE.toggleHeading2();
|
|
210
|
-
};
|
|
211
|
-
/**
|
|
212
|
-
* @return {?}
|
|
213
|
-
*/
|
|
214
|
-
TdTextEditorComponent.prototype.toggleHeading3 = function () {
|
|
215
|
-
this._easyMDE.toggleHeading3();
|
|
216
|
-
};
|
|
217
|
-
/**
|
|
218
|
-
* @return {?}
|
|
219
|
-
*/
|
|
220
|
-
TdTextEditorComponent.prototype.toggleCodeBlock = function () {
|
|
221
|
-
this._easyMDE.toggleCodeBlock();
|
|
222
|
-
};
|
|
223
|
-
/**
|
|
224
|
-
* @return {?}
|
|
225
|
-
*/
|
|
226
|
-
TdTextEditorComponent.prototype.toggleBlockquote = function () {
|
|
227
|
-
this._easyMDE.toggleBlockquote();
|
|
228
|
-
};
|
|
229
|
-
/**
|
|
230
|
-
* @return {?}
|
|
231
|
-
*/
|
|
232
|
-
TdTextEditorComponent.prototype.toggleUnorderedList = function () {
|
|
233
|
-
this._easyMDE.toggleUnorderedList();
|
|
234
|
-
};
|
|
235
|
-
/**
|
|
236
|
-
* @return {?}
|
|
237
|
-
*/
|
|
238
|
-
TdTextEditorComponent.prototype.toggleOrderedList = function () {
|
|
239
|
-
this._easyMDE.toggleOrderedList();
|
|
240
|
-
};
|
|
241
|
-
/**
|
|
242
|
-
* @return {?}
|
|
243
|
-
*/
|
|
244
|
-
TdTextEditorComponent.prototype.cleanBlock = function () {
|
|
245
|
-
this._easyMDE.cleanBlock();
|
|
246
|
-
};
|
|
247
|
-
/**
|
|
248
|
-
* @return {?}
|
|
249
|
-
*/
|
|
250
|
-
TdTextEditorComponent.prototype.drawLink = function () {
|
|
251
|
-
this._easyMDE.drawLink();
|
|
252
|
-
};
|
|
253
|
-
/**
|
|
254
|
-
* @return {?}
|
|
255
|
-
*/
|
|
256
|
-
TdTextEditorComponent.prototype.drawImage = function () {
|
|
257
|
-
this._easyMDE.drawImage();
|
|
258
|
-
};
|
|
259
|
-
/**
|
|
260
|
-
* @return {?}
|
|
261
|
-
*/
|
|
262
|
-
TdTextEditorComponent.prototype.drawTable = function () {
|
|
263
|
-
this._easyMDE.drawTable();
|
|
264
|
-
};
|
|
265
|
-
/**
|
|
266
|
-
* @return {?}
|
|
267
|
-
*/
|
|
268
|
-
TdTextEditorComponent.prototype.drawHorizontalRule = function () {
|
|
269
|
-
this._easyMDE.drawHorizontalRule();
|
|
270
|
-
};
|
|
271
|
-
/**
|
|
272
|
-
* @return {?}
|
|
273
|
-
*/
|
|
274
|
-
TdTextEditorComponent.prototype.togglePreview = function () {
|
|
275
|
-
this._easyMDE.togglePreview();
|
|
276
|
-
};
|
|
277
|
-
/**
|
|
278
|
-
* @return {?}
|
|
279
|
-
*/
|
|
280
|
-
TdTextEditorComponent.prototype.toggleSideBySide = function () {
|
|
281
|
-
this._easyMDE.toggleSideBySide();
|
|
282
|
-
};
|
|
283
|
-
/**
|
|
284
|
-
* @return {?}
|
|
285
|
-
*/
|
|
286
|
-
TdTextEditorComponent.prototype.toggleFullScreen = function () {
|
|
287
|
-
this._easyMDE.toggleFullScreen();
|
|
288
|
-
};
|
|
289
|
-
return TdTextEditorComponent;
|
|
290
|
-
}());
|
|
291
|
-
TdTextEditorComponent.decorators = [
|
|
292
|
-
{ type: core.Component, args: [{
|
|
293
|
-
selector: 'td-text-editor',
|
|
294
|
-
template: "<div>\n <textarea #easymde></textarea>\n</div>\n",
|
|
295
|
-
providers: [
|
|
296
|
-
{
|
|
297
|
-
provide: forms.NG_VALUE_ACCESSOR,
|
|
298
|
-
useExisting: core.forwardRef(( /**
|
|
299
|
-
* @return {?}
|
|
300
|
-
*/function () { return TdTextEditorComponent; })),
|
|
301
|
-
multi: true,
|
|
302
|
-
},
|
|
303
|
-
],
|
|
304
|
-
styles: ["@charset \"UTF-8\";:host ::ng-deep .CodeMirror{color:#000;direction:ltr;font-family:monospace;height:300px}: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{background-color:#f7f7f7;border-right:1px solid #ddd;white-space:nowrap}:host ::ng-deep .CodeMirror-linenumber{color:#999;min-width:20px;padding:0 3px 0 5px;text-align:right;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{background:#7e7;border:0!important;width:auto}:host ::ng-deep .cm-fat-cursor div.CodeMirror-cursors{z-index:1}:host ::ng-deep .cm-fat-cursor-mark{animation:blink 1.06s steps(1) infinite;background-color:rgba(20,255,20,.5)}:host ::ng-deep .cm-animate-fat-cursor{animation:blink 1.06s steps(1) infinite;background-color:#7e7;border:0;width:auto}@keyframes blink{50%{background-color:rgba(0,0,0,0)}}:host ::ng-deep .cm-tab{display:inline-block;text-decoration:inherit}:host ::ng-deep .CodeMirror-rulers{bottom:0;left:0;overflow:hidden;position:absolute;right:0;top:-50px}:host ::ng-deep .CodeMirror-ruler{border-left:1px solid #ccc;bottom:0;position:absolute;top:0}: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,: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-invalidchar,:host ::ng-deep .cm-s-default .cm-error{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{background:#fff;overflow:hidden;position:relative}:host ::ng-deep .CodeMirror-scroll{height:100%;margin-bottom:-30px;margin-right:-30px;outline:0;overflow:scroll!important;padding-bottom:30px;position:relative}:host ::ng-deep .CodeMirror-sizer{border-right:30px solid rgba(0,0,0,0);position:relative}:host ::ng-deep .CodeMirror-gutter-filler,:host ::ng-deep .CodeMirror-hscrollbar,:host ::ng-deep .CodeMirror-scrollbar-filler,:host ::ng-deep .CodeMirror-vscrollbar{display:none;position:absolute;z-index:6}:host ::ng-deep .CodeMirror-vscrollbar{overflow-x:hidden;overflow-y:scroll;right:0;top:0}:host ::ng-deep .CodeMirror-hscrollbar{bottom:0;left:0;overflow-x:scroll;overflow-y:hidden}:host ::ng-deep .CodeMirror-scrollbar-filler{bottom:0;right:0}:host ::ng-deep .CodeMirror-gutter-filler{bottom:0;left:0}:host ::ng-deep .CodeMirror-gutters{left:0;min-height:100%;position:absolute;top:0;z-index:3}:host ::ng-deep .CodeMirror-gutter{display:inline-block;height:100%;margin-bottom:-30px;vertical-align:top;white-space:normal}:host ::ng-deep .CodeMirror-gutter-wrapper{background:0 0!important;border:none!important;position:absolute;z-index:4}:host ::ng-deep .CodeMirror-gutter-background{bottom:0;position:absolute;top:0;z-index:4}:host ::ng-deep .CodeMirror-gutter-elt{cursor:default;position:absolute;z-index:4}:host ::ng-deep .CodeMirror-gutter-wrapper ::selection{background-color:rgba(0,0,0,0)}:host ::ng-deep .CodeMirror-gutter-wrapper ::-moz-selection{background-color:rgba(0,0,0,0)}: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{-webkit-tap-highlight-color:transparent;background:0 0;border-radius:0;border-width:0;color:inherit;font-family:inherit;font-size:inherit;font-variant-ligatures:contextual;line-height:inherit;margin:0;overflow:visible;position:relative;white-space:pre;word-wrap:normal;z-index:2}:host ::ng-deep .CodeMirror-wrap pre.CodeMirror-line,:host ::ng-deep .CodeMirror-wrap pre.CodeMirror-line-like{white-space:pre-wrap;word-break:normal;word-wrap:break-word}:host ::ng-deep .CodeMirror-linebackground{bottom:0;left:0;position:absolute;right:0;top:0;z-index:0}:host ::ng-deep .CodeMirror-linewidget{padding:.1px;position:relative;z-index:2}:host ::ng-deep .CodeMirror-rtl pre{direction:rtl}: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{height:0;overflow:hidden;position:absolute;visibility:hidden;width:100%}:host ::ng-deep .CodeMirror-cursor{pointer-events:none;position:absolute}:host ::ng-deep .CodeMirror-measure pre{position:static}:host ::ng-deep div.CodeMirror-cursors{position:relative;visibility:hidden;z-index:3}:host ::ng-deep .CodeMirror-focused div.CodeMirror-cursors,:host ::ng-deep div.CodeMirror-dragcursors{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:rgba(255,255,0,.4)}: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 .CodeMirror{border:1px solid #ddd;border-bottom-left-radius:4px;border-bottom-right-radius:4px;box-sizing:border-box;font:inherit;height:auto;padding:10px;word-wrap:break-word;z-index:1}:host ::ng-deep .CodeMirror-scroll{cursor:text}:host ::ng-deep .CodeMirror-fullscreen{background:#fff;border-bottom-right-radius:0!important;border-right:none!important;bottom:0;height:auto;left:0;position:fixed!important;right:0;top:50px;z-index:9}:host ::ng-deep .CodeMirror-sided{width:50%!important}:host ::ng-deep .CodeMirror-placeholder{opacity:.5}:host ::ng-deep .CodeMirror-focused .CodeMirror-selected{background:#d9d9d9}:host ::ng-deep .editor-toolbar{-moz-user-select:none;-ms-user-select:none;-o-user-select:none;border-left:1px solid #bbb;border-right:1px solid #bbb;border-top:1px solid #bbb;border-top-left-radius:4px;border-top-right-radius:4px;padding:0 10px;position:relative;user-select:none}:host ::ng-deep .editor-toolbar:after,:host ::ng-deep .editor-toolbar:before{content:\" \";display:block;height:1px}:host ::ng-deep .editor-toolbar:before{margin-bottom:8px}:host ::ng-deep .editor-toolbar:after{margin-top:8px}:host ::ng-deep .editor-toolbar.fullscreen{background:#fff;border:0;box-sizing:border-box;height:50px;left:0;opacity:1;overflow-x:auto;overflow-y:hidden;padding-bottom:10px;padding-top:10px;position:fixed;top:0;white-space:nowrap;width:100%;z-index:9}:host ::ng-deep .editor-toolbar.fullscreen:before{background:linear-gradient(90deg,#fff 0,hsla(0,0%,100%,0));height:50px;left:0;margin:0;padding:0;position:fixed;top:0;width:20px}:host ::ng-deep .editor-toolbar.fullscreen:after{background:linear-gradient(90deg,hsla(0,0%,100%,0) 0,#fff);height:50px;margin:0;padding:0;position:fixed;right:0;top:0;width:20px}:host ::ng-deep .editor-toolbar button{background:0 0;border:1px solid rgba(0,0,0,0);border-radius:3px;cursor:pointer;display:inline-block;height:30px;margin:0;padding:0;text-align:center;text-decoration:none!important;width:30px}: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{border-left:1px solid #d9d9d9;border-right:1px solid #fff;color:rgba(0,0,0,0);display:inline-block;margin:0 6px;text-indent:-10px;width:0}:host ::ng-deep .editor-toolbar button:after{font-family:Arial,Helvetica Neue,Helvetica,sans-serif;font-size:65%;position:relative;top:2px;vertical-align:text-bottom}: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:\"\u25B2\"}:host ::ng-deep .editor-toolbar button.heading-smaller:after{content:\"\u25BC\"}: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{color:#959694;font-size:12px;padding:8px 10px;text-align:right}:host ::ng-deep .editor-statusbar span{display:inline-block;margin-left:1em;min-width:4em}: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{box-sizing:border-box;display:none;height:100%;left:0;overflow:auto;position:absolute;top:0;width:100%;z-index:7}:host ::ng-deep .editor-preview-side{border:1px solid #ddd;bottom:0;box-sizing:border-box;display:none;overflow:auto;position:fixed;right:0;top:50px;width:50%;word-wrap:break-word;z-index:9}:host ::ng-deep .editor-preview-active,:host ::ng-deep .editor-preview-active-side{display:block}:host ::ng-deep .editor-preview{background:#fafafa;padding:10px}: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:200%;line-height:200%}:host ::ng-deep .cm-s-easymde .cm-header-2{font-size:160%;line-height:160%}:host ::ng-deep .cm-s-easymde .cm-header-3{font-size:125%;line-height:125%}:host ::ng-deep .cm-s-easymde .cm-header-4{font-size:110%;line-height:110%}: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 .CodeMirror .cm-spell-error:not(.cm-url):not(.cm-comment):not(.cm-tag):not(.cm-word){background:rgba(255,0,0,.15)}"]
|
|
305
|
-
}] }
|
|
306
|
-
];
|
|
307
|
-
/** @nocollapse */
|
|
308
|
-
TdTextEditorComponent.ctorParameters = function () { return [
|
|
309
|
-
{ type: core.NgZone }
|
|
310
|
-
]; };
|
|
311
|
-
TdTextEditorComponent.propDecorators = {
|
|
312
|
-
textarea: [{ type: core.ViewChild, args: ['easymde', { static: true },] }],
|
|
313
|
-
options: [{ type: core.Input }],
|
|
314
|
-
value: [{ type: core.Input, args: ['value',] }]
|
|
315
|
-
};
|
|
316
|
-
if (false) {
|
|
317
|
-
/**
|
|
318
|
-
* @type {?}
|
|
319
|
-
* @private
|
|
320
|
-
*/
|
|
321
|
-
TdTextEditorComponent.prototype._value;
|
|
322
|
-
/**
|
|
323
|
-
* @type {?}
|
|
324
|
-
* @private
|
|
325
|
-
*/
|
|
326
|
-
TdTextEditorComponent.prototype._easyMDE;
|
|
327
|
-
/**
|
|
328
|
-
* @type {?}
|
|
329
|
-
* @private
|
|
330
|
-
*/
|
|
331
|
-
TdTextEditorComponent.prototype._fromEditor;
|
|
332
|
-
/** @type {?} */
|
|
333
|
-
TdTextEditorComponent.prototype.textarea;
|
|
334
|
-
/** @type {?} */
|
|
335
|
-
TdTextEditorComponent.prototype.options;
|
|
336
|
-
/** @type {?} */
|
|
337
|
-
TdTextEditorComponent.prototype.propagateChange;
|
|
338
|
-
/** @type {?} */
|
|
339
|
-
TdTextEditorComponent.prototype.onTouched;
|
|
340
|
-
/**
|
|
341
|
-
* @type {?}
|
|
342
|
-
* @private
|
|
343
|
-
*/
|
|
344
|
-
TdTextEditorComponent.prototype._zone;
|
|
345
|
-
}
|
|
346
|
-
|
|
347
|
-
/**
|
|
348
|
-
* @fileoverview added by tsickle
|
|
349
|
-
* Generated from: text-editor.module.ts
|
|
350
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
351
|
-
*/
|
|
352
|
-
var CovalentTextEditorModule = /** @class */ (function () {
|
|
353
|
-
function CovalentTextEditorModule() {
|
|
354
|
-
}
|
|
355
|
-
return CovalentTextEditorModule;
|
|
356
|
-
}());
|
|
357
|
-
CovalentTextEditorModule.decorators = [
|
|
358
|
-
{ type: core.NgModule, args: [{
|
|
359
|
-
imports: [common.CommonModule],
|
|
360
|
-
declarations: [TdTextEditorComponent],
|
|
361
|
-
exports: [TdTextEditorComponent],
|
|
362
|
-
bootstrap: [TdTextEditorComponent],
|
|
363
|
-
},] }
|
|
364
|
-
];
|
|
365
|
-
|
|
366
|
-
/**
|
|
367
|
-
* @fileoverview added by tsickle
|
|
368
|
-
* Generated from: public-api.ts
|
|
369
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
370
|
-
*/
|
|
371
|
-
|
|
372
|
-
/**
|
|
373
|
-
* @fileoverview added by tsickle
|
|
374
|
-
* Generated from: index.ts
|
|
375
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
376
|
-
*/
|
|
377
|
-
|
|
378
|
-
/**
|
|
379
|
-
* @fileoverview added by tsickle
|
|
380
|
-
* Generated from: covalent-text-editor.ts
|
|
381
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
382
|
-
*/
|
|
383
|
-
|
|
384
|
-
exports.CovalentTextEditorModule = CovalentTextEditorModule;
|
|
385
|
-
exports.TdTextEditorComponent = TdTextEditorComponent;
|
|
386
|
-
|
|
387
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
388
|
-
|
|
389
|
-
})));
|
|
390
|
-
//# sourceMappingURL=covalent-text-editor.umd.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"covalent-text-editor.umd.js","sources":["../../../../src/platform/text-editor/text-editor.component.ts","../../../../src/platform/text-editor/text-editor.module.ts"],"sourcesContent":["import { Component, Input, AfterViewInit, ViewChild, ElementRef, forwardRef, NgZone } from '@angular/core';\nimport { NG_VALUE_ACCESSOR, ControlValueAccessor } from '@angular/forms';\nimport * as EasyMDE from 'easymde';\n// get access to the marked class under easymde\nimport * as marked from 'marked';\n\nconst noop: any = () => {\n // empty method\n};\n\n@Component({\n selector: 'td-text-editor',\n templateUrl: './text-editor.component.html',\n styleUrls: ['./text-editor.component.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => TdTextEditorComponent),\n multi: true,\n },\n ],\n})\nexport class TdTextEditorComponent implements AfterViewInit, ControlValueAccessor {\n private _value: string = '';\n private _easyMDE: any;\n private _fromEditor: boolean = false;\n\n @ViewChild('easymde', { static: true }) textarea: ElementRef;\n @Input() options: any = {};\n\n constructor(private _zone: NgZone) {}\n\n /* tslint:disable-next-line */\n propagateChange = (_: any) => {};\n onTouched = () => noop;\n\n /**\n * value?: string\n * Value in the Editor after async getEditorContent was called\n */\n @Input('value')\n set value(value: string) {\n this._value = value;\n if (this._easyMDE) {\n if (!this._fromEditor) {\n this._easyMDE.value(value);\n }\n this.propagateChange(this._value);\n this._fromEditor = false;\n this._zone.run(() => (this._value = value));\n }\n }\n\n get value(): string {\n return this._value;\n }\n\n get easyMDE(): any {\n return this._easyMDE;\n }\n\n /**\n * Implemented as part of ControlValueAccessor.\n */\n writeValue(value: any): void {\n this.value = !value ? '' : value;\n }\n registerOnChange(fn: any): void {\n this.propagateChange = fn;\n }\n registerOnTouched(fn: any): void {\n this.onTouched = fn;\n }\n\n ngAfterViewInit(): void {\n this.options.element = this.textarea.nativeElement;\n\n // If content entered is html then don't evaluate it, prevent xss vulnerabilities\n marked.setOptions({ sanitize: true });\n this._easyMDE = new EasyMDE(this.options);\n this._easyMDE.value(this.value);\n this._easyMDE.codemirror.on('change', () => {\n this._fromEditor = true;\n this.writeValue(this._easyMDE.value());\n });\n }\n\n /* Wrapped function provided by EasyMDE */\n\n isPreviewActive(): boolean {\n return this._easyMDE.isPreviewActive();\n }\n\n isSideBySideActive(): boolean {\n return this._easyMDE.isSideBySideActive();\n }\n\n isFullscreenActive(): boolean {\n return this._easyMDE.isFullscreenActive();\n }\n\n clearAutosavedValue(): void {\n this._easyMDE.clearAutosavedValue();\n }\n\n toTextArea(): void {\n this._easyMDE.toTextArea();\n }\n\n toggleBold(): void {\n this._easyMDE.toggleBold();\n }\n\n toggleItalic(): void {\n this._easyMDE.toggleItalic();\n }\n\n toggleStrikethrough(): void {\n this._easyMDE.toggleStrikethrough();\n }\n\n toggleHeadingSmaller(): void {\n this._easyMDE.toggleHeadingSmaller();\n }\n\n toggleHeadingBigger(): void {\n this._easyMDE.toggleHeadingBigger();\n }\n\n toggleHeading1(): void {\n this._easyMDE.toggleHeading1();\n }\n\n toggleHeading2(): void {\n this._easyMDE.toggleHeading2();\n }\n\n toggleHeading3(): void {\n this._easyMDE.toggleHeading3();\n }\n\n toggleCodeBlock(): void {\n this._easyMDE.toggleCodeBlock();\n }\n\n toggleBlockquote(): void {\n this._easyMDE.toggleBlockquote();\n }\n\n toggleUnorderedList(): void {\n this._easyMDE.toggleUnorderedList();\n }\n\n toggleOrderedList(): void {\n this._easyMDE.toggleOrderedList();\n }\n\n cleanBlock(): void {\n this._easyMDE.cleanBlock();\n }\n\n drawLink(): void {\n this._easyMDE.drawLink();\n }\n\n drawImage(): void {\n this._easyMDE.drawImage();\n }\n\n drawTable(): void {\n this._easyMDE.drawTable();\n }\n\n drawHorizontalRule(): void {\n this._easyMDE.drawHorizontalRule();\n }\n\n togglePreview(): void {\n this._easyMDE.togglePreview();\n }\n\n toggleSideBySide(): void {\n this._easyMDE.toggleSideBySide();\n }\n\n toggleFullScreen(): void {\n this._easyMDE.toggleFullScreen();\n }\n}\n","import { NgModule } from '@angular/core';\n\nimport { CommonModule } from '@angular/common';\n\nimport { TdTextEditorComponent } from './text-editor.component';\n\n@NgModule({\n imports: [CommonModule],\n declarations: [TdTextEditorComponent],\n exports: [TdTextEditorComponent],\n bootstrap: [TdTextEditorComponent],\n})\nexport class CovalentTextEditorModule {}\n"],"names":["marked.setOptions","EasyMDE","Component","NG_VALUE_ACCESSOR","forwardRef","NgZone","ViewChild","Input","NgModule","CommonModule"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAMM,IAAI;;OAAQ;;IAElB,CAAC,CAAA;;;;;;QAsBC,+BAAoB,KAAa;YAAb,UAAK,GAAL,KAAK,CAAQ;YAPzB,WAAM,GAAW,EAAE,CAAC;YAEpB,gBAAW,GAAY,KAAK,CAAC;YAG5B,YAAO,GAAQ,EAAE,CAAC;;YAK3B,oBAAe;;;eAAG,UAAC,CAAM,KAAO,EAAC;YACjC,cAAS;;eAAG,cAAM,OAAA,IAAI,GAAA,EAAC;SAJc;QAUrC,sBACI,wCAAK;;;;iBAYT;gBACE,OAAO,IAAI,CAAC,MAAM,CAAC;aACpB;;;;;;;iBAfD,UACU,KAAa;gBADvB,iBAWC;gBATC,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;gBACpB,IAAI,IAAI,CAAC,QAAQ,EAAE;oBACjB,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE;wBACrB,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;qBAC5B;oBACD,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;oBAClC,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC;oBACzB,IAAI,CAAC,KAAK,CAAC,GAAG;;uBAAC,cAAM,QAAC,KAAI,CAAC,MAAM,GAAG,KAAK,IAAC,EAAC,CAAC;iBAC7C;aACF;;;WAAA;QAMD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|
1
|
-
!function(e,o){"object"==typeof exports&&"undefined"!=typeof module?o(exports,require("@angular/core"),require("@angular/forms"),require("easymde"),require("marked"),require("@angular/common")):"function"==typeof define&&define.amd?define("@covalent/text-editor",["exports","@angular/core","@angular/forms","easymde","marked","@angular/common"],o):o(((e="undefined"!=typeof globalThis?globalThis:e||self).covalent=e.covalent||{},e.covalent["text-editor"]={}),e.ng.core,e.ng.forms,e.EasyMDE,e.marked,e.ng.common)}(this,(function(e,o,t,r,i,n){"use strict";function d(e){if(e&&e.__esModule)return e;var o=Object.create(null);return e&&Object.keys(e).forEach((function(t){if("default"!==t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(o,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}})),o.default=e,Object.freeze(o)}var s=d(r),a=function(){},p=function(){function e(e){this._zone=e,this._value="",this._fromEditor=!1,this.options={},this.propagateChange=function(e){},this.onTouched=function(){return a}}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},set:function(e){var o=this;this._value=e,this._easyMDE&&(this._fromEditor||this._easyMDE.value(e),this.propagateChange(this._value),this._fromEditor=!1,this._zone.run((function(){return o._value=e})))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"easyMDE",{get:function(){return this._easyMDE},enumerable:!1,configurable:!0}),e.prototype.writeValue=function(e){this.value=e||""},e.prototype.registerOnChange=function(e){this.propagateChange=e},e.prototype.registerOnTouched=function(e){this.onTouched=e},e.prototype.ngAfterViewInit=function(){var e=this;this.options.element=this.textarea.nativeElement,i.setOptions({sanitize:!0}),this._easyMDE=new s(this.options),this._easyMDE.value(this.value),this._easyMDE.codemirror.on("change",(function(){e._fromEditor=!0,e.writeValue(e._easyMDE.value())}))},e.prototype.isPreviewActive=function(){return this._easyMDE.isPreviewActive()},e.prototype.isSideBySideActive=function(){return this._easyMDE.isSideBySideActive()},e.prototype.isFullscreenActive=function(){return this._easyMDE.isFullscreenActive()},e.prototype.clearAutosavedValue=function(){this._easyMDE.clearAutosavedValue()},e.prototype.toTextArea=function(){this._easyMDE.toTextArea()},e.prototype.toggleBold=function(){this._easyMDE.toggleBold()},e.prototype.toggleItalic=function(){this._easyMDE.toggleItalic()},e.prototype.toggleStrikethrough=function(){this._easyMDE.toggleStrikethrough()},e.prototype.toggleHeadingSmaller=function(){this._easyMDE.toggleHeadingSmaller()},e.prototype.toggleHeadingBigger=function(){this._easyMDE.toggleHeadingBigger()},e.prototype.toggleHeading1=function(){this._easyMDE.toggleHeading1()},e.prototype.toggleHeading2=function(){this._easyMDE.toggleHeading2()},e.prototype.toggleHeading3=function(){this._easyMDE.toggleHeading3()},e.prototype.toggleCodeBlock=function(){this._easyMDE.toggleCodeBlock()},e.prototype.toggleBlockquote=function(){this._easyMDE.toggleBlockquote()},e.prototype.toggleUnorderedList=function(){this._easyMDE.toggleUnorderedList()},e.prototype.toggleOrderedList=function(){this._easyMDE.toggleOrderedList()},e.prototype.cleanBlock=function(){this._easyMDE.cleanBlock()},e.prototype.drawLink=function(){this._easyMDE.drawLink()},e.prototype.drawImage=function(){this._easyMDE.drawImage()},e.prototype.drawTable=function(){this._easyMDE.drawTable()},e.prototype.drawHorizontalRule=function(){this._easyMDE.drawHorizontalRule()},e.prototype.togglePreview=function(){this._easyMDE.togglePreview()},e.prototype.toggleSideBySide=function(){this._easyMDE.toggleSideBySide()},e.prototype.toggleFullScreen=function(){this._easyMDE.toggleFullScreen()},e}();p.decorators=[{type:o.Component,args:[{selector:"td-text-editor",template:"<div>\n <textarea #easymde></textarea>\n</div>\n",providers:[{provide:t.NG_VALUE_ACCESSOR,useExisting:o.forwardRef((function(){return p})),multi:!0}],styles:['@charset "UTF-8";:host ::ng-deep .CodeMirror{color:#000;direction:ltr;font-family:monospace;height:300px}: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{background-color:#f7f7f7;border-right:1px solid #ddd;white-space:nowrap}:host ::ng-deep .CodeMirror-linenumber{color:#999;min-width:20px;padding:0 3px 0 5px;text-align:right;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{background:#7e7;border:0!important;width:auto}:host ::ng-deep .cm-fat-cursor div.CodeMirror-cursors{z-index:1}:host ::ng-deep .cm-fat-cursor-mark{animation:blink 1.06s steps(1) infinite;background-color:rgba(20,255,20,.5)}:host ::ng-deep .cm-animate-fat-cursor{animation:blink 1.06s steps(1) infinite;background-color:#7e7;border:0;width:auto}@keyframes blink{50%{background-color:rgba(0,0,0,0)}}:host ::ng-deep .cm-tab{display:inline-block;text-decoration:inherit}:host ::ng-deep .CodeMirror-rulers{bottom:0;left:0;overflow:hidden;position:absolute;right:0;top:-50px}:host ::ng-deep .CodeMirror-ruler{border-left:1px solid #ccc;bottom:0;position:absolute;top:0}: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,: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-invalidchar,:host ::ng-deep .cm-s-default .cm-error{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{background:#fff;overflow:hidden;position:relative}:host ::ng-deep .CodeMirror-scroll{height:100%;margin-bottom:-30px;margin-right:-30px;outline:0;overflow:scroll!important;padding-bottom:30px;position:relative}:host ::ng-deep .CodeMirror-sizer{border-right:30px solid rgba(0,0,0,0);position:relative}:host ::ng-deep .CodeMirror-gutter-filler,:host ::ng-deep .CodeMirror-hscrollbar,:host ::ng-deep .CodeMirror-scrollbar-filler,:host ::ng-deep .CodeMirror-vscrollbar{display:none;position:absolute;z-index:6}:host ::ng-deep .CodeMirror-vscrollbar{overflow-x:hidden;overflow-y:scroll;right:0;top:0}:host ::ng-deep .CodeMirror-hscrollbar{bottom:0;left:0;overflow-x:scroll;overflow-y:hidden}:host ::ng-deep .CodeMirror-scrollbar-filler{bottom:0;right:0}:host ::ng-deep .CodeMirror-gutter-filler{bottom:0;left:0}:host ::ng-deep .CodeMirror-gutters{left:0;min-height:100%;position:absolute;top:0;z-index:3}:host ::ng-deep .CodeMirror-gutter{display:inline-block;height:100%;margin-bottom:-30px;vertical-align:top;white-space:normal}:host ::ng-deep .CodeMirror-gutter-wrapper{background:0 0!important;border:none!important;position:absolute;z-index:4}:host ::ng-deep .CodeMirror-gutter-background{bottom:0;position:absolute;top:0;z-index:4}:host ::ng-deep .CodeMirror-gutter-elt{cursor:default;position:absolute;z-index:4}:host ::ng-deep .CodeMirror-gutter-wrapper ::selection{background-color:rgba(0,0,0,0)}:host ::ng-deep .CodeMirror-gutter-wrapper ::-moz-selection{background-color:rgba(0,0,0,0)}: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{-webkit-tap-highlight-color:transparent;background:0 0;border-radius:0;border-width:0;color:inherit;font-family:inherit;font-size:inherit;font-variant-ligatures:contextual;line-height:inherit;margin:0;overflow:visible;position:relative;white-space:pre;word-wrap:normal;z-index:2}:host ::ng-deep .CodeMirror-wrap pre.CodeMirror-line,:host ::ng-deep .CodeMirror-wrap pre.CodeMirror-line-like{white-space:pre-wrap;word-break:normal;word-wrap:break-word}:host ::ng-deep .CodeMirror-linebackground{bottom:0;left:0;position:absolute;right:0;top:0;z-index:0}:host ::ng-deep .CodeMirror-linewidget{padding:.1px;position:relative;z-index:2}:host ::ng-deep .CodeMirror-rtl pre{direction:rtl}: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{height:0;overflow:hidden;position:absolute;visibility:hidden;width:100%}:host ::ng-deep .CodeMirror-cursor{pointer-events:none;position:absolute}:host ::ng-deep .CodeMirror-measure pre{position:static}:host ::ng-deep div.CodeMirror-cursors{position:relative;visibility:hidden;z-index:3}:host ::ng-deep .CodeMirror-focused div.CodeMirror-cursors,:host ::ng-deep div.CodeMirror-dragcursors{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:rgba(255,255,0,.4)}: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 .CodeMirror{border:1px solid #ddd;border-bottom-left-radius:4px;border-bottom-right-radius:4px;box-sizing:border-box;font:inherit;height:auto;padding:10px;word-wrap:break-word;z-index:1}:host ::ng-deep .CodeMirror-scroll{cursor:text}:host ::ng-deep .CodeMirror-fullscreen{background:#fff;border-bottom-right-radius:0!important;border-right:none!important;bottom:0;height:auto;left:0;position:fixed!important;right:0;top:50px;z-index:9}:host ::ng-deep .CodeMirror-sided{width:50%!important}:host ::ng-deep .CodeMirror-placeholder{opacity:.5}:host ::ng-deep .CodeMirror-focused .CodeMirror-selected{background:#d9d9d9}:host ::ng-deep .editor-toolbar{-moz-user-select:none;-ms-user-select:none;-o-user-select:none;border-left:1px solid #bbb;border-right:1px solid #bbb;border-top:1px solid #bbb;border-top-left-radius:4px;border-top-right-radius:4px;padding:0 10px;position:relative;user-select:none}:host ::ng-deep .editor-toolbar:after,:host ::ng-deep .editor-toolbar:before{content:" ";display:block;height:1px}:host ::ng-deep .editor-toolbar:before{margin-bottom:8px}:host ::ng-deep .editor-toolbar:after{margin-top:8px}:host ::ng-deep .editor-toolbar.fullscreen{background:#fff;border:0;box-sizing:border-box;height:50px;left:0;opacity:1;overflow-x:auto;overflow-y:hidden;padding-bottom:10px;padding-top:10px;position:fixed;top:0;white-space:nowrap;width:100%;z-index:9}:host ::ng-deep .editor-toolbar.fullscreen:before{background:linear-gradient(90deg,#fff 0,hsla(0,0%,100%,0));height:50px;left:0;margin:0;padding:0;position:fixed;top:0;width:20px}:host ::ng-deep .editor-toolbar.fullscreen:after{background:linear-gradient(90deg,hsla(0,0%,100%,0) 0,#fff);height:50px;margin:0;padding:0;position:fixed;right:0;top:0;width:20px}:host ::ng-deep .editor-toolbar button{background:0 0;border:1px solid rgba(0,0,0,0);border-radius:3px;cursor:pointer;display:inline-block;height:30px;margin:0;padding:0;text-align:center;text-decoration:none!important;width:30px}: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{border-left:1px solid #d9d9d9;border-right:1px solid #fff;color:rgba(0,0,0,0);display:inline-block;margin:0 6px;text-indent:-10px;width:0}:host ::ng-deep .editor-toolbar button:after{font-family:Arial,Helvetica Neue,Helvetica,sans-serif;font-size:65%;position:relative;top:2px;vertical-align:text-bottom}: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:"▲"}:host ::ng-deep .editor-toolbar button.heading-smaller:after{content:"▼"}: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{color:#959694;font-size:12px;padding:8px 10px;text-align:right}:host ::ng-deep .editor-statusbar span{display:inline-block;margin-left:1em;min-width:4em}: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{box-sizing:border-box;display:none;height:100%;left:0;overflow:auto;position:absolute;top:0;width:100%;z-index:7}:host ::ng-deep .editor-preview-side{border:1px solid #ddd;bottom:0;box-sizing:border-box;display:none;overflow:auto;position:fixed;right:0;top:50px;width:50%;word-wrap:break-word;z-index:9}:host ::ng-deep .editor-preview-active,:host ::ng-deep .editor-preview-active-side{display:block}:host ::ng-deep .editor-preview{background:#fafafa;padding:10px}: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:200%;line-height:200%}:host ::ng-deep .cm-s-easymde .cm-header-2{font-size:160%;line-height:160%}:host ::ng-deep .cm-s-easymde .cm-header-3{font-size:125%;line-height:125%}:host ::ng-deep .cm-s-easymde .cm-header-4{font-size:110%;line-height:110%}: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 .CodeMirror .cm-spell-error:not(.cm-url):not(.cm-comment):not(.cm-tag):not(.cm-word){background:rgba(255,0,0,.15)}']}]}],p.ctorParameters=function(){return[{type:o.NgZone}]},p.propDecorators={textarea:[{type:o.ViewChild,args:["easymde",{static:!0}]}],options:[{type:o.Input}],value:[{type:o.Input,args:["value"]}]};var l=function(){};l.decorators=[{type:o.NgModule,args:[{imports:[n.CommonModule],declarations:[p],exports:[p],bootstrap:[p]}]}],e.CovalentTextEditorModule=l,e.TdTextEditorComponent=p,Object.defineProperty(e,"__esModule",{value:!0})}));
|
|
2
|
-
//# sourceMappingURL=covalent-text-editor.umd.min.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/platform/text-editor/text-editor.component.ts","../../../../src/platform/text-editor/text-editor.module.ts"],"names":["noop","TdTextEditorComponent","_zone","this","_value","_fromEditor","options","propagateChange","_","onTouched","Object","defineProperty","prototype","value","_this","_easyMDE","run","writeValue","registerOnChange","fn","registerOnTouched","ngAfterViewInit","element","textarea","nativeElement","marked.setOptions","sanitize","EasyMDE","codemirror","on","isPreviewActive","isSideBySideActive","isFullscreenActive","clearAutosavedValue","toTextArea","toggleBold","toggleItalic","toggleStrikethrough","toggleHeadingSmaller","toggleHeadingBigger","toggleHeading1","toggleHeading2","toggleHeading3","toggleCodeBlock","toggleBlockquote","toggleUnorderedList","toggleOrderedList","cleanBlock","drawLink","drawImage","drawTable","drawHorizontalRule","togglePreview","toggleSideBySide","toggleFullScreen","Component","args","selector","template","providers","provide","NG_VALUE_ACCESSOR","useExisting","forwardRef","multi","NgZone","ViewChild","static","Input","NgModule","imports","CommonModule","declarations","exports","bootstrap"],"mappings":"o1BAMMA,EAAI,0BAwBR,SAAAC,EAAoBC,GAAAC,KAAAD,MAAAA,EAPZC,KAAAC,OAAiB,GAEjBD,KAAAE,aAAuB,EAGtBF,KAAAG,QAAe,GAKxBH,KAAAI,gBAAe,SAAIC,KACnBL,KAAAM,UAAS,WAAS,OAAAT,UAMlBU,OAAAC,eACIV,EAAAW,UAAA,QAAK,KAYT,WACE,OAAOT,KAAKC,YAdd,SACUS,GADV,IAAAC,EAAAX,KAEEA,KAAKC,OAASS,E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cACVC,aAAc,CAACvE,GACfwE,QAAS,CAACxE,GACVyE,UAAW,CAACzE","sourcesContent":["import { Component, Input, AfterViewInit, ViewChild, ElementRef, forwardRef, NgZone } from '@angular/core';\nimport { NG_VALUE_ACCESSOR, ControlValueAccessor } from '@angular/forms';\nimport * as EasyMDE from 'easymde';\n// get access to the marked class under easymde\nimport * as marked from 'marked';\n\nconst noop: any = () => {\n // empty method\n};\n\n@Component({\n selector: 'td-text-editor',\n templateUrl: './text-editor.component.html',\n styleUrls: ['./text-editor.component.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => TdTextEditorComponent),\n multi: true,\n },\n ],\n})\nexport class TdTextEditorComponent implements AfterViewInit, ControlValueAccessor {\n private _value: string = '';\n private _easyMDE: any;\n private _fromEditor: boolean = false;\n\n @ViewChild('easymde', { static: true }) textarea: ElementRef;\n @Input() options: any = {};\n\n constructor(private _zone: NgZone) {}\n\n /* tslint:disable-next-line */\n propagateChange = (_: any) => {};\n onTouched = () => noop;\n\n /**\n * value?: string\n * Value in the Editor after async getEditorContent was called\n */\n @Input('value')\n set value(value: string) {\n this._value = value;\n if (this._easyMDE) {\n if (!this._fromEditor) {\n this._easyMDE.value(value);\n }\n this.propagateChange(this._value);\n this._fromEditor = false;\n this._zone.run(() => (this._value = value));\n }\n }\n\n get value(): string {\n return this._value;\n }\n\n get easyMDE(): any {\n return this._easyMDE;\n }\n\n /**\n * Implemented as part of ControlValueAccessor.\n */\n writeValue(value: any): void {\n this.value = !value ? '' : value;\n }\n registerOnChange(fn: any): void {\n this.propagateChange = fn;\n }\n registerOnTouched(fn: any): void {\n this.onTouched = fn;\n }\n\n ngAfterViewInit(): void {\n this.options.element = this.textarea.nativeElement;\n\n // If content entered is html then don't evaluate it, prevent xss vulnerabilities\n marked.setOptions({ sanitize: true });\n this._easyMDE = new EasyMDE(this.options);\n this._easyMDE.value(this.value);\n this._easyMDE.codemirror.on('change', () => {\n this._fromEditor = true;\n this.writeValue(this._easyMDE.value());\n });\n }\n\n /* Wrapped function provided by EasyMDE */\n\n isPreviewActive(): boolean {\n return this._easyMDE.isPreviewActive();\n }\n\n isSideBySideActive(): boolean {\n return this._easyMDE.isSideBySideActive();\n }\n\n isFullscreenActive(): boolean {\n return this._easyMDE.isFullscreenActive();\n }\n\n clearAutosavedValue(): void {\n this._easyMDE.clearAutosavedValue();\n }\n\n toTextArea(): void {\n this._easyMDE.toTextArea();\n }\n\n toggleBold(): void {\n this._easyMDE.toggleBold();\n }\n\n toggleItalic(): void {\n this._easyMDE.toggleItalic();\n }\n\n toggleStrikethrough(): void {\n this._easyMDE.toggleStrikethrough();\n }\n\n toggleHeadingSmaller(): void {\n this._easyMDE.toggleHeadingSmaller();\n }\n\n toggleHeadingBigger(): void {\n this._easyMDE.toggleHeadingBigger();\n }\n\n toggleHeading1(): void {\n this._easyMDE.toggleHeading1();\n }\n\n toggleHeading2(): void {\n this._easyMDE.toggleHeading2();\n }\n\n toggleHeading3(): void {\n this._easyMDE.toggleHeading3();\n }\n\n toggleCodeBlock(): void {\n this._easyMDE.toggleCodeBlock();\n }\n\n toggleBlockquote(): void {\n this._easyMDE.toggleBlockquote();\n }\n\n toggleUnorderedList(): void {\n this._easyMDE.toggleUnorderedList();\n }\n\n toggleOrderedList(): void {\n this._easyMDE.toggleOrderedList();\n }\n\n cleanBlock(): void {\n this._easyMDE.cleanBlock();\n }\n\n drawLink(): void {\n this._easyMDE.drawLink();\n }\n\n drawImage(): void {\n this._easyMDE.drawImage();\n }\n\n drawTable(): void {\n this._easyMDE.drawTable();\n }\n\n drawHorizontalRule(): void {\n this._easyMDE.drawHorizontalRule();\n }\n\n togglePreview(): void {\n this._easyMDE.togglePreview();\n }\n\n toggleSideBySide(): void {\n this._easyMDE.toggleSideBySide();\n }\n\n toggleFullScreen(): void {\n this._easyMDE.toggleFullScreen();\n }\n}\n","import { NgModule } from '@angular/core';\n\nimport { CommonModule } from '@angular/common';\n\nimport { TdTextEditorComponent } from './text-editor.component';\n\n@NgModule({\n imports: [CommonModule],\n declarations: [TdTextEditorComponent],\n exports: [TdTextEditorComponent],\n bootstrap: [TdTextEditorComponent],\n})\nexport class CovalentTextEditorModule {}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"__symbolic":"module","version":4,"metadata":{"TdTextEditorComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":10,"character":1},"arguments":[{"selector":"td-text-editor","providers":[{"provide":{"__symbolic":"reference","module":"@angular/forms","name":"NG_VALUE_ACCESSOR","line":16,"character":15},"useExisting":{"__symbolic":"reference","name":"TdTextEditorComponent"},"multi":true}],"template":"<div>\n <textarea #easymde></textarea>\n</div>\n","styles":["@charset \"UTF-8\";:host ::ng-deep .CodeMirror{color:#000;direction:ltr;font-family:monospace;height:300px}: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{background-color:#f7f7f7;border-right:1px solid #ddd;white-space:nowrap}:host ::ng-deep .CodeMirror-linenumber{color:#999;min-width:20px;padding:0 3px 0 5px;text-align:right;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{background:#7e7;border:0!important;width:auto}:host ::ng-deep .cm-fat-cursor div.CodeMirror-cursors{z-index:1}:host ::ng-deep .cm-fat-cursor-mark{animation:blink 1.06s steps(1) infinite;background-color:rgba(20,255,20,.5)}:host ::ng-deep .cm-animate-fat-cursor{animation:blink 1.06s steps(1) infinite;background-color:#7e7;border:0;width:auto}@keyframes blink{50%{background-color:rgba(0,0,0,0)}}:host ::ng-deep .cm-tab{display:inline-block;text-decoration:inherit}:host ::ng-deep .CodeMirror-rulers{bottom:0;left:0;overflow:hidden;position:absolute;right:0;top:-50px}:host ::ng-deep .CodeMirror-ruler{border-left:1px solid #ccc;bottom:0;position:absolute;top:0}: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,: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-invalidchar,:host ::ng-deep .cm-s-default .cm-error{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{background:#fff;overflow:hidden;position:relative}:host ::ng-deep .CodeMirror-scroll{height:100%;margin-bottom:-30px;margin-right:-30px;outline:0;overflow:scroll!important;padding-bottom:30px;position:relative}:host ::ng-deep .CodeMirror-sizer{border-right:30px solid rgba(0,0,0,0);position:relative}:host ::ng-deep .CodeMirror-gutter-filler,:host ::ng-deep .CodeMirror-hscrollbar,:host ::ng-deep .CodeMirror-scrollbar-filler,:host ::ng-deep .CodeMirror-vscrollbar{display:none;position:absolute;z-index:6}:host ::ng-deep .CodeMirror-vscrollbar{overflow-x:hidden;overflow-y:scroll;right:0;top:0}:host ::ng-deep .CodeMirror-hscrollbar{bottom:0;left:0;overflow-x:scroll;overflow-y:hidden}:host ::ng-deep .CodeMirror-scrollbar-filler{bottom:0;right:0}:host ::ng-deep .CodeMirror-gutter-filler{bottom:0;left:0}:host ::ng-deep .CodeMirror-gutters{left:0;min-height:100%;position:absolute;top:0;z-index:3}:host ::ng-deep .CodeMirror-gutter{display:inline-block;height:100%;margin-bottom:-30px;vertical-align:top;white-space:normal}:host ::ng-deep .CodeMirror-gutter-wrapper{background:0 0!important;border:none!important;position:absolute;z-index:4}:host ::ng-deep .CodeMirror-gutter-background{bottom:0;position:absolute;top:0;z-index:4}:host ::ng-deep .CodeMirror-gutter-elt{cursor:default;position:absolute;z-index:4}:host ::ng-deep .CodeMirror-gutter-wrapper ::selection{background-color:rgba(0,0,0,0)}:host ::ng-deep .CodeMirror-gutter-wrapper ::-moz-selection{background-color:rgba(0,0,0,0)}: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{-webkit-tap-highlight-color:transparent;background:0 0;border-radius:0;border-width:0;color:inherit;font-family:inherit;font-size:inherit;font-variant-ligatures:contextual;line-height:inherit;margin:0;overflow:visible;position:relative;white-space:pre;word-wrap:normal;z-index:2}:host ::ng-deep .CodeMirror-wrap pre.CodeMirror-line,:host ::ng-deep .CodeMirror-wrap pre.CodeMirror-line-like{white-space:pre-wrap;word-break:normal;word-wrap:break-word}:host ::ng-deep .CodeMirror-linebackground{bottom:0;left:0;position:absolute;right:0;top:0;z-index:0}:host ::ng-deep .CodeMirror-linewidget{padding:.1px;position:relative;z-index:2}:host ::ng-deep .CodeMirror-rtl pre{direction:rtl}: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{height:0;overflow:hidden;position:absolute;visibility:hidden;width:100%}:host ::ng-deep .CodeMirror-cursor{pointer-events:none;position:absolute}:host ::ng-deep .CodeMirror-measure pre{position:static}:host ::ng-deep div.CodeMirror-cursors{position:relative;visibility:hidden;z-index:3}:host ::ng-deep .CodeMirror-focused div.CodeMirror-cursors,:host ::ng-deep div.CodeMirror-dragcursors{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:rgba(255,255,0,.4)}: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 .CodeMirror{border:1px solid #ddd;border-bottom-left-radius:4px;border-bottom-right-radius:4px;box-sizing:border-box;font:inherit;height:auto;padding:10px;word-wrap:break-word;z-index:1}:host ::ng-deep .CodeMirror-scroll{cursor:text}:host ::ng-deep .CodeMirror-fullscreen{background:#fff;border-bottom-right-radius:0!important;border-right:none!important;bottom:0;height:auto;left:0;position:fixed!important;right:0;top:50px;z-index:9}:host ::ng-deep .CodeMirror-sided{width:50%!important}:host ::ng-deep .CodeMirror-placeholder{opacity:.5}:host ::ng-deep .CodeMirror-focused .CodeMirror-selected{background:#d9d9d9}:host ::ng-deep .editor-toolbar{-moz-user-select:none;-ms-user-select:none;-o-user-select:none;border-left:1px solid #bbb;border-right:1px solid #bbb;border-top:1px solid #bbb;border-top-left-radius:4px;border-top-right-radius:4px;padding:0 10px;position:relative;user-select:none}:host ::ng-deep .editor-toolbar:after,:host ::ng-deep .editor-toolbar:before{content:\" \";display:block;height:1px}:host ::ng-deep .editor-toolbar:before{margin-bottom:8px}:host ::ng-deep .editor-toolbar:after{margin-top:8px}:host ::ng-deep .editor-toolbar.fullscreen{background:#fff;border:0;box-sizing:border-box;height:50px;left:0;opacity:1;overflow-x:auto;overflow-y:hidden;padding-bottom:10px;padding-top:10px;position:fixed;top:0;white-space:nowrap;width:100%;z-index:9}:host ::ng-deep .editor-toolbar.fullscreen:before{background:linear-gradient(90deg,#fff 0,hsla(0,0%,100%,0));height:50px;left:0;margin:0;padding:0;position:fixed;top:0;width:20px}:host ::ng-deep .editor-toolbar.fullscreen:after{background:linear-gradient(90deg,hsla(0,0%,100%,0) 0,#fff);height:50px;margin:0;padding:0;position:fixed;right:0;top:0;width:20px}:host ::ng-deep .editor-toolbar button{background:0 0;border:1px solid rgba(0,0,0,0);border-radius:3px;cursor:pointer;display:inline-block;height:30px;margin:0;padding:0;text-align:center;text-decoration:none!important;width:30px}: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{border-left:1px solid #d9d9d9;border-right:1px solid #fff;color:rgba(0,0,0,0);display:inline-block;margin:0 6px;text-indent:-10px;width:0}:host ::ng-deep .editor-toolbar button:after{font-family:Arial,Helvetica Neue,Helvetica,sans-serif;font-size:65%;position:relative;top:2px;vertical-align:text-bottom}: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:\"▲\"}:host ::ng-deep .editor-toolbar button.heading-smaller:after{content:\"▼\"}: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{color:#959694;font-size:12px;padding:8px 10px;text-align:right}:host ::ng-deep .editor-statusbar span{display:inline-block;margin-left:1em;min-width:4em}: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{box-sizing:border-box;display:none;height:100%;left:0;overflow:auto;position:absolute;top:0;width:100%;z-index:7}:host ::ng-deep .editor-preview-side{border:1px solid #ddd;bottom:0;box-sizing:border-box;display:none;overflow:auto;position:fixed;right:0;top:50px;width:50%;word-wrap:break-word;z-index:9}:host ::ng-deep .editor-preview-active,:host ::ng-deep .editor-preview-active-side{display:block}:host ::ng-deep .editor-preview{background:#fafafa;padding:10px}: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:200%;line-height:200%}:host ::ng-deep .cm-s-easymde .cm-header-2{font-size:160%;line-height:160%}:host ::ng-deep .cm-s-easymde .cm-header-3{font-size:125%;line-height:125%}:host ::ng-deep .cm-s-easymde .cm-header-4{font-size:110%;line-height:110%}: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 .CodeMirror .cm-spell-error:not(.cm-url):not(.cm-comment):not(.cm-tag):not(.cm-word){background:rgba(255,0,0,.15)}"]}]}],"members":{"textarea":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":27,"character":3},"arguments":["easymde",{"static":true}]}]}],"options":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":28,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"NgZone","line":30,"character":29}]}],"value":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":40,"character":3},"arguments":["value"]}]}],"writeValue":[{"__symbolic":"method"}],"registerOnChange":[{"__symbolic":"method"}],"registerOnTouched":[{"__symbolic":"method"}],"ngAfterViewInit":[{"__symbolic":"method"}],"isPreviewActive":[{"__symbolic":"method"}],"isSideBySideActive":[{"__symbolic":"method"}],"isFullscreenActive":[{"__symbolic":"method"}],"clearAutosavedValue":[{"__symbolic":"method"}],"toTextArea":[{"__symbolic":"method"}],"toggleBold":[{"__symbolic":"method"}],"toggleItalic":[{"__symbolic":"method"}],"toggleStrikethrough":[{"__symbolic":"method"}],"toggleHeadingSmaller":[{"__symbolic":"method"}],"toggleHeadingBigger":[{"__symbolic":"method"}],"toggleHeading1":[{"__symbolic":"method"}],"toggleHeading2":[{"__symbolic":"method"}],"toggleHeading3":[{"__symbolic":"method"}],"toggleCodeBlock":[{"__symbolic":"method"}],"toggleBlockquote":[{"__symbolic":"method"}],"toggleUnorderedList":[{"__symbolic":"method"}],"toggleOrderedList":[{"__symbolic":"method"}],"cleanBlock":[{"__symbolic":"method"}],"drawLink":[{"__symbolic":"method"}],"drawImage":[{"__symbolic":"method"}],"drawTable":[{"__symbolic":"method"}],"drawHorizontalRule":[{"__symbolic":"method"}],"togglePreview":[{"__symbolic":"method"}],"toggleSideBySide":[{"__symbolic":"method"}],"toggleFullScreen":[{"__symbolic":"method"}]}},"CovalentTextEditorModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":6,"character":1},"arguments":[{"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":7,"character":12}],"declarations":[{"__symbolic":"reference","name":"TdTextEditorComponent"}],"exports":[{"__symbolic":"reference","name":"TdTextEditorComponent"}],"bootstrap":[{"__symbolic":"reference","name":"TdTextEditorComponent"}]}]}],"members":{}}},"origins":{"TdTextEditorComponent":"./text-editor.component","CovalentTextEditorModule":"./text-editor.module"},"importAs":"@covalent/text-editor"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @fileoverview added by tsickle
|
|
3
|
-
* Generated from: covalent-text-editor.ts
|
|
4
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
5
|
-
*/
|
|
6
|
-
/**
|
|
7
|
-
* Generated bundle index. Do not edit.
|
|
8
|
-
*/
|
|
9
|
-
export { TdTextEditorComponent, CovalentTextEditorModule } from './index';
|
|
10
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY292YWxlbnQtdGV4dC1lZGl0b3IuanMiLCJzb3VyY2VSb290IjoiLi4vLi4vLi4vLi4vc3JjL3BsYXRmb3JtL3RleHQtZWRpdG9yLyIsInNvdXJjZXMiOlsiY292YWxlbnQtdGV4dC1lZGl0b3IudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7QUFJQSxnRUFBYyxTQUFTLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEdlbmVyYXRlZCBidW5kbGUgaW5kZXguIERvIG5vdCBlZGl0LlxuICovXG5cbmV4cG9ydCAqIGZyb20gJy4vaW5kZXgnO1xuIl19
|
package/esm2015/index.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @fileoverview added by tsickle
|
|
3
|
-
* Generated from: index.ts
|
|
4
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
5
|
-
*/
|
|
6
|
-
export { TdTextEditorComponent, CovalentTextEditorModule } from './public-api';
|
|
7
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiLi4vLi4vLi4vLi4vc3JjL3BsYXRmb3JtL3RleHQtZWRpdG9yLyIsInNvdXJjZXMiOlsiaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7QUFBQSxnRUFBYyxjQUFjLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tICcuL3B1YmxpYy1hcGknO1xuIl19
|
package/esm2015/public-api.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @fileoverview added by tsickle
|
|
3
|
-
* Generated from: public-api.ts
|
|
4
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
5
|
-
*/
|
|
6
|
-
export { TdTextEditorComponent } from './text-editor.component';
|
|
7
|
-
export { CovalentTextEditorModule } from './text-editor.module';
|
|
8
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiIuLi8uLi8uLi8uLi9zcmMvcGxhdGZvcm0vdGV4dC1lZGl0b3IvIiwic291cmNlcyI6WyJwdWJsaWMtYXBpLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7O0FBQUEsT0FBTyxFQUFFLHFCQUFxQixFQUFFLE1BQU0seUJBQXlCLENBQUM7QUFDaEUsT0FBTyxFQUFFLHdCQUF3QixFQUFFLE1BQU0sc0JBQXNCLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgeyBUZFRleHRFZGl0b3JDb21wb25lbnQgfSBmcm9tICcuL3RleHQtZWRpdG9yLmNvbXBvbmVudCc7XG5leHBvcnQgeyBDb3ZhbGVudFRleHRFZGl0b3JNb2R1bGUgfSBmcm9tICcuL3RleHQtZWRpdG9yLm1vZHVsZSc7XG4iXX0=
|