@dignite-ng/expand.ck-editor 3.0.0-rc.2 → 3.0.0-rc.4

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.
@@ -1,346 +1,168 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Injectable, inject, Component, NgModule, Input, ViewChild, Pipe } from '@angular/core';
3
- import * as i1$1 from '@angular/router';
2
+ import { NgModule, inject, ChangeDetectorRef, Component, Input, ViewChild, Injectable } from '@angular/core';
3
+ import * as i1 from '@angular/router';
4
4
  import { RouterModule } from '@angular/router';
5
- import { AccessibilityHelp, Alignment, Autoformat, AutoImage, Autosave, Base64UploadAdapter, BlockQuote, Bold, CloudServices, Code, Essentials, FontBackgroundColor, FontColor, FontFamily, FontSize, GeneralHtmlSupport, Heading, Highlight, HorizontalLine, ImageBlock, ImageCaption, ImageInline, ImageInsert, ImageInsertViaUrl, ImageResize, ImageStyle, ImageTextAlternative, ImageToolbar, ImageUpload, Indent, IndentBlock, Italic, Link, LinkImage, List, ListProperties, MediaEmbed, Paragraph, PasteFromOffice, RemoveFormat, SelectAll, SpecialCharacters, SpecialCharactersArrows, SpecialCharactersCurrency, SpecialCharactersEssentials, SpecialCharactersLatin, SpecialCharactersMathematical, SpecialCharactersText, Strikethrough, Style, Subscript, Superscript, Table, TableCaption, TableCellProperties, TableColumnResize, TableProperties, TableToolbar, TextTransformation, TodoList, Underline, Undo, ClassicEditor } from 'ckeditor5';
6
- import * as i2$1 from '@abp/ng.core';
7
- import { ConfigStateService, LazyLoadService, SubscriptionService, LOADING_STRATEGY, RestService, CoreModule } from '@abp/ng.core';
8
- import * as i1 from '@angular/forms';
9
- import { FormBuilder, Validators, FormsModule, ReactiveFormsModule } from '@angular/forms';
5
+ import * as i3 from '@abp/ng.core';
6
+ import { mapEnumToOptions, ConfigStateService, RestService, LazyLoadService, SubscriptionService, LOADING_STRATEGY, CoreModule } from '@abp/ng.core';
7
+ import { ThemeSharedModule } from '@abp/ng.theme.shared';
8
+ import * as i1$1 from '@angular/forms';
9
+ import { FormBuilder, Validators } from '@angular/forms';
10
10
  import * as i2 from '@angular/common';
11
- import * as i4 from '@ckeditor/ckeditor5-angular';
11
+ import * as i4 from '@ngx-validate/core';
12
+ import * as i4$1 from '@ckeditor/ckeditor5-angular';
12
13
  import { CKEditorModule } from '@ckeditor/ckeditor5-angular';
13
- import { ThemeSharedModule } from '@abp/ng.theme.shared';
14
- import * as i3 from '@ngx-validate/core';
15
- import { DomSanitizer } from '@angular/platform-browser';
16
14
 
17
- var easy = {
18
- toolbar: {
19
- items: [
20
- 'undo',
21
- 'redo',
22
- '|',
23
- 'heading',
24
- '|',
25
- 'link',
26
- 'bold',
27
- 'italic',
28
- 'underline',
29
- ],
30
- shouldNotGroupWhenFull: false,
31
- },
32
- plugins: [
33
- AccessibilityHelp,
34
- Alignment,
35
- Autoformat,
36
- AutoImage,
37
- Autosave,
38
- Base64UploadAdapter,
39
- BlockQuote,
40
- Bold,
41
- CloudServices,
42
- Code,
43
- Essentials,
44
- FontBackgroundColor,
45
- FontColor,
46
- FontFamily,
47
- FontSize,
48
- GeneralHtmlSupport,
49
- Heading,
50
- Highlight,
51
- HorizontalLine,
52
- ImageBlock,
53
- ImageCaption,
54
- ImageInline,
55
- ImageInsert,
56
- ImageInsertViaUrl,
57
- ImageResize,
58
- ImageStyle,
59
- ImageTextAlternative,
60
- ImageToolbar,
61
- ImageUpload,
62
- Indent,
63
- IndentBlock,
64
- Italic,
65
- Link,
66
- LinkImage,
67
- List,
68
- ListProperties,
69
- MediaEmbed,
70
- Paragraph,
71
- PasteFromOffice,
72
- RemoveFormat,
73
- SelectAll,
74
- SpecialCharacters,
75
- SpecialCharactersArrows,
76
- SpecialCharactersCurrency,
77
- SpecialCharactersEssentials,
78
- SpecialCharactersLatin,
79
- SpecialCharactersMathematical,
80
- SpecialCharactersText,
81
- Strikethrough,
82
- Style,
83
- Subscript,
84
- Superscript,
85
- Table,
86
- TableCaption,
87
- TableCellProperties,
88
- TableColumnResize,
89
- TableProperties,
90
- TableToolbar,
91
- TextTransformation,
92
- TodoList,
93
- Underline,
94
- Undo,
95
- ],
96
- heading: {
97
- options: [
98
- {
99
- model: 'paragraph',
100
- title: 'Paragraph',
101
- class: 'ck-heading_paragraph',
102
- },
103
- {
104
- model: 'heading1',
105
- view: 'h1',
106
- title: 'Heading 1',
107
- class: 'ck-heading_heading1',
108
- },
109
- {
110
- model: 'heading2',
111
- view: 'h2',
112
- title: 'Heading 2',
113
- class: 'ck-heading_heading2',
114
- },
115
- {
116
- model: 'heading3',
117
- view: 'h3',
118
- title: 'Heading 3',
119
- class: 'ck-heading_heading3',
120
- },
121
- {
122
- model: 'heading4',
123
- view: 'h4',
124
- title: 'Heading 4',
125
- class: 'ck-heading_heading4',
126
- },
127
- {
128
- model: 'heading5',
129
- view: 'h5',
130
- title: 'Heading 5',
131
- class: 'ck-heading_heading5',
132
- },
133
- {
134
- model: 'heading6',
135
- view: 'h6',
136
- title: 'Heading 6',
137
- class: 'ck-heading_heading6',
138
- },
139
- ],
140
- },
141
- link: {
142
- addTargetToExternalLinks: true,
143
- defaultProtocol: 'https://',
144
- decorators: {
145
- toggleDownloadable: {
146
- mode: 'manual',
147
- label: 'Downloadable',
148
- attributes: {
149
- download: 'file',
150
- },
151
- },
152
- },
153
- },
154
- };
155
- var defaults = {
156
- toolbar: {
157
- items: [
158
- 'undo',
159
- 'redo',
160
- '|',
161
- 'heading',
162
- '|',
163
- 'fontSize',
164
- 'fontFamily',
165
- 'fontColor',
166
- 'fontBackgroundColor',
167
- 'link',
168
- '|',
169
- 'bold',
170
- 'italic',
171
- 'underline',
172
- '|',
173
- 'insertImage',
174
- ],
175
- shouldNotGroupWhenFull: false,
176
- },
177
- plugins: [
178
- Undo,
179
- Heading,
180
- FontSize,
181
- FontColor,
182
- FontFamily,
183
- FontBackgroundColor,
184
- Link,
185
- Bold,
186
- Italic,
187
- Underline,
188
- Base64UploadAdapter,
189
- ImageToolbar,
190
- ImageUpload,
191
- LinkImage,
192
- AccessibilityHelp,
193
- Alignment,
194
- Autoformat,
195
- AutoImage,
196
- Autosave,
197
- BlockQuote,
198
- CloudServices,
199
- Code,
200
- Essentials,
201
- GeneralHtmlSupport,
202
- Highlight,
203
- HorizontalLine,
204
- ImageBlock,
205
- ImageCaption,
206
- ImageInline,
207
- ImageInsert,
208
- ImageInsertViaUrl,
209
- ImageResize,
210
- ImageStyle,
211
- ImageTextAlternative,
212
- Indent,
213
- IndentBlock,
214
- List,
215
- ListProperties,
216
- MediaEmbed,
217
- Paragraph,
218
- PasteFromOffice,
219
- RemoveFormat,
220
- SelectAll,
221
- SpecialCharacters,
222
- SpecialCharactersArrows,
223
- SpecialCharactersCurrency,
224
- SpecialCharactersEssentials,
225
- SpecialCharactersLatin,
226
- SpecialCharactersMathematical,
227
- SpecialCharactersText,
228
- Strikethrough,
229
- Style,
230
- Subscript,
231
- Superscript,
232
- Table,
233
- TableCaption,
234
- TableCellProperties,
235
- TableColumnResize,
236
- TableProperties,
237
- TableToolbar,
238
- TextTransformation,
239
- TodoList,
240
- ],
241
- heading: {
242
- options: [
243
- {
244
- model: 'paragraph',
245
- title: 'Paragraph',
246
- class: 'ck-heading_paragraph',
247
- },
248
- {
249
- model: 'heading1',
250
- view: 'h1',
251
- title: 'Heading 1',
252
- class: 'ck-heading_heading1',
253
- },
254
- {
255
- model: 'heading2',
256
- view: 'h2',
257
- title: 'Heading 2',
258
- class: 'ck-heading_heading2',
259
- },
260
- {
261
- model: 'heading3',
262
- view: 'h3',
263
- title: 'Heading 3',
264
- class: 'ck-heading_heading3',
265
- },
266
- {
267
- model: 'heading4',
268
- view: 'h4',
269
- title: 'Heading 4',
270
- class: 'ck-heading_heading4',
271
- },
272
- {
273
- model: 'heading5',
274
- view: 'h5',
275
- title: 'Heading 5',
276
- class: 'ck-heading_heading5',
277
- },
278
- {
279
- model: 'heading6',
280
- view: 'h6',
281
- title: 'Heading 6',
282
- class: 'ck-heading_heading6',
283
- },
284
- ],
285
- },
286
- fontSize: {
287
- options: [10, 12, 14, 'default', 18, 20, 22, 24, 26, 28, 30, 32],
288
- },
289
- link: {
290
- addTargetToExternalLinks: true,
291
- defaultProtocol: 'https://',
292
- decorators: {
293
- toggleDownloadable: {
294
- mode: 'manual',
295
- label: 'Downloadable',
296
- attributes: {
297
- download: 'file',
298
- },
299
- },
300
- },
301
- },
302
- image: {
303
- toolbar: [
304
- 'toggleImageCaption',
305
- 'imageTextAlternative',
306
- '|',
307
- 'imageStyle:inline',
308
- 'imageStyle:wrapText',
309
- 'imageStyle:breakText',
310
- '|',
311
- 'resizeImage',
312
- ],
313
- styles: {
314
- options: [
315
- 'inline', 'alignLeft', 'alignRight',
316
- 'alignCenter', 'alignBlockLeft', 'alignBlockRight',
317
- 'block', 'side'
318
- ]
319
- },
320
- resizeOptions: [{
321
- name: 'resizeImage:original',
322
- label: 'Original',
323
- value: null
324
- },
325
- {
326
- name: 'resizeImage:25',
327
- label: '25%',
328
- value: '25'
329
- },
330
- {
331
- name: 'resizeImage:50',
332
- label: '50%',
333
- value: '50'
334
- },
335
- {
336
- name: 'resizeImage:75',
337
- label: '75%',
338
- value: '75'
15
+ const routes = [];
16
+ class CkEditorRoutingModule {
17
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: CkEditorRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
18
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.1.5", ngImport: i0, type: CkEditorRoutingModule, imports: [i1.RouterModule], exports: [RouterModule] }); }
19
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: CkEditorRoutingModule, imports: [RouterModule.forChild(routes), RouterModule] }); }
20
+ }
21
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: CkEditorRoutingModule, decorators: [{
22
+ type: NgModule,
23
+ args: [{
24
+ imports: [RouterModule.forChild(routes)],
25
+ exports: [RouterModule],
26
+ }]
27
+ }] });
28
+
29
+ class CkEditorConfig {
30
+ constructor(data) {
31
+ /**类型 */
32
+ this['Ckeditor.Mode'] = ['', []];
33
+ /**文件容器名称 */
34
+ // placeholder: any = new FormControl('', Validators.required);
35
+ this['Ckeditor.ImagesContainerName'] = ['', []];
36
+ /**多选 */
37
+ // placeholder: any = new FormControl('', Validators.required);
38
+ this['Ckeditor.InitialContent'] = ['', []];
39
+ if (data) {
40
+ for (const key in data) {
41
+ if (data.hasOwnProperty(key)) {
42
+ this[key] = data[key];
43
+ }
339
44
  }
340
- ],
341
- },
45
+ }
46
+ }
47
+ }
48
+
49
+ var CkEditorModeEnum;
50
+ (function (CkEditorModeEnum) {
51
+ CkEditorModeEnum[CkEditorModeEnum["Simple"] = 0] = "Simple";
52
+ CkEditorModeEnum[CkEditorModeEnum["Classic"] = 1] = "Classic";
53
+ })(CkEditorModeEnum || (CkEditorModeEnum = {}));
54
+ const CkEditorModeEnumOptions = mapEnumToOptions(CkEditorModeEnum);
55
+
56
+ class CkEditorConfigComponent {
57
+ constructor(fb) {
58
+ this.fb = fb;
59
+ this.CkEditorModeEnum = CkEditorModeEnum;
60
+ this.CkEditorModeEnumOptions = CkEditorModeEnumOptions;
61
+ this.cdr = inject(ChangeDetectorRef);
62
+ }
63
+ set Entity(v) {
64
+ this._Entity = v;
65
+ this.dataLoaded();
66
+ }
67
+ set selected(v) {
68
+ this._selected = v || '';
69
+ // this.dataLoaded()
70
+ }
71
+ set type(v) {
72
+ this._type = v;
73
+ // this.dataLoaded()
74
+ }
75
+ //
76
+ get formConfiguration() {
77
+ return this._Entity.get('formConfiguration');
78
+ }
79
+ async dataLoaded() {
80
+ if (this._Entity && this._type) {
81
+ await this.AfterInit();
82
+ this.cdr.detectChanges(); // 手动触发变更检测
83
+ this.submitclick?.nativeElement?.click();
84
+ }
85
+ }
86
+ AfterInit() {
87
+ return new Promise((resolve, rejects) => {
88
+ this._Entity.setControl('formConfiguration', this.fb.group(new CkEditorConfig()));
89
+ if (this._selected && this._selected.formControlName == this._type) {
90
+ this.formConfiguration.patchValue({
91
+ ...this._selected.formConfiguration,
92
+ });
93
+ }
94
+ resolve(true);
95
+ });
96
+ }
97
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: CkEditorConfigComponent, deps: [{ token: i1$1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
98
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: CkEditorConfigComponent, selector: "ck-editor-config", inputs: { Entity: "Entity", selected: "selected", type: "type" }, viewQueries: [{ propertyName: "submitclick", first: true, predicate: ["submitclick"], descendants: true, static: true }], ngImport: i0, template: "<form [formGroup]=\"_Entity\">\n <div formGroupName=\"formConfiguration\">\n <div class=\"mb-3\">\n <label class=\"form-label\">{{'DigniteAbpDynamicFormsCkEditor::EditorMode' | abpLocalization}}</label>\n <!-- <input type=\"text\" class=\"form-control\" formControlName=\"Ckeditor.Mode\"> -->\n <select class=\"form-select\" formControlName=\"Ckeditor.Mode\" >\n <ng-container *ngFor=\"let item of CkEditorModeEnumOptions\">\n <option [value]=\"item.value\">{{'DigniteAbpDynamicFormsCkEditor::EditorMode.' + item.key|abpLocalization}}</option>\n </ng-container>\n </select>\n </div>\n <div class=\"mb-3\">\n <label class=\"form-label\">{{'DigniteAbpDynamicFormsCkEditor::ImagesContainerName' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"Ckeditor.ImagesContainerName\">\n </div>\n <div class=\"mb-3\">\n <label class=\"form-label\">{{'DigniteAbpDynamicFormsCkEditor::InitialContent' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"Ckeditor.InitialContent\">\n </div>\n <button type=\"submit\" (abpInit)=\"submitclick?.nativeElement?.click()\" style=\"display: none;\"\n #submitclick></button>\n </div>\n</form>", styles: [""], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1$1.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i3.InitDirective, selector: "[abpInit]", outputs: ["abpInit"] }, { kind: "directive", type: i4.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i4.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "pipe", type: i3.LocalizationPipe, name: "abpLocalization" }] }); }
99
+ }
100
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: CkEditorConfigComponent, decorators: [{
101
+ type: Component,
102
+ args: [{ selector: 'ck-editor-config', template: "<form [formGroup]=\"_Entity\">\n <div formGroupName=\"formConfiguration\">\n <div class=\"mb-3\">\n <label class=\"form-label\">{{'DigniteAbpDynamicFormsCkEditor::EditorMode' | abpLocalization}}</label>\n <!-- <input type=\"text\" class=\"form-control\" formControlName=\"Ckeditor.Mode\"> -->\n <select class=\"form-select\" formControlName=\"Ckeditor.Mode\" >\n <ng-container *ngFor=\"let item of CkEditorModeEnumOptions\">\n <option [value]=\"item.value\">{{'DigniteAbpDynamicFormsCkEditor::EditorMode.' + item.key|abpLocalization}}</option>\n </ng-container>\n </select>\n </div>\n <div class=\"mb-3\">\n <label class=\"form-label\">{{'DigniteAbpDynamicFormsCkEditor::ImagesContainerName' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"Ckeditor.ImagesContainerName\">\n </div>\n <div class=\"mb-3\">\n <label class=\"form-label\">{{'DigniteAbpDynamicFormsCkEditor::InitialContent' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"Ckeditor.InitialContent\">\n </div>\n <button type=\"submit\" (abpInit)=\"submitclick?.nativeElement?.click()\" style=\"display: none;\"\n #submitclick></button>\n </div>\n</form>" }]
103
+ }], ctorParameters: () => [{ type: i1$1.FormBuilder }], propDecorators: { Entity: [{
104
+ type: Input
105
+ }], selected: [{
106
+ type: Input
107
+ }], type: [{
108
+ type: Input
109
+ }], submitclick: [{
110
+ type: ViewChild,
111
+ args: ['submitclick', { static: true }]
112
+ }] } });
113
+
114
+ let isBase64UploadAdapter$1 = class isBase64UploadAdapter {
115
+ constructor(loader, ImagesContainerName, restService) {
116
+ this.reader = new FileReader();
117
+ this.Base64 = false;
118
+ this.createFile = (input, config) => this.restService.request({
119
+ method: 'POST',
120
+ url: '/api/file-explorer/files',
121
+ params: { containerName: input.containerName, cellName: input.cellName, directoryId: input.directoryId, entityId: input.entityId },
122
+ body: input.file,
123
+ }, { apiName: 'FileExplorer', ...config });
124
+ this.loader = loader;
125
+ this.ImagesContainerName = ImagesContainerName;
126
+ this.restService = restService;
127
+ }
128
+ upload() {
129
+ return new Promise((resolve, reject) => {
130
+ const reader = this.reader;
131
+ if (this.Base64) {
132
+ reader.addEventListener('load', () => {
133
+ resolve({ default: reader.result });
134
+ });
135
+ reader.addEventListener('error', err => {
136
+ reject(err);
137
+ });
138
+ reader.addEventListener('abort', () => {
139
+ reject();
140
+ });
141
+ this.loader.file.then((file) => {
142
+ reader.readAsDataURL(file);
143
+ });
144
+ }
145
+ else {
146
+ this.loader.file.then((file) => {
147
+ var formData = new FormData();
148
+ formData.append('file', file, file.name);
149
+ this.createFile({
150
+ file: formData,
151
+ containerName: this.ImagesContainerName,
152
+ directoryId: '',
153
+ entityId: ''
154
+ }).subscribe((response) => {
155
+ resolve({ default: response.url });
156
+ }, (error) => {
157
+ reject(error);
158
+ });
159
+ });
160
+ }
161
+ });
162
+ }
342
163
  };
343
- var standard = {
164
+
165
+ var Simple = {
344
166
  toolbar: {
345
167
  items: [
346
168
  'undo',
@@ -348,95 +170,15 @@ var standard = {
348
170
  '|',
349
171
  'heading',
350
172
  '|',
351
- 'fontSize',
352
- 'fontFamily',
353
- 'fontColor',
354
- 'fontBackgroundColor',
355
- '|',
173
+ 'link',
356
174
  'bold',
357
175
  'italic',
358
176
  'underline',
359
- 'strikethrough',
360
- '|',
361
- 'link',
362
- 'insertImage',
363
- 'insertTable',
364
- '|',
365
- 'alignment',
366
- '|',
367
- 'bulletedList',
368
- 'numberedList',
177
+ 'insertImage'
369
178
  ],
370
179
  shouldNotGroupWhenFull: false,
371
180
  },
372
- plugins: [
373
- AccessibilityHelp,
374
- Alignment,
375
- Autoformat,
376
- AutoImage,
377
- Autosave,
378
- Base64UploadAdapter,
379
- BlockQuote,
380
- Bold,
381
- CloudServices,
382
- Code,
383
- Essentials,
384
- FontBackgroundColor,
385
- FontColor,
386
- FontFamily,
387
- FontSize,
388
- GeneralHtmlSupport,
389
- Heading,
390
- Highlight,
391
- HorizontalLine,
392
- ImageBlock,
393
- ImageCaption,
394
- ImageInline,
395
- ImageInsert,
396
- ImageInsertViaUrl,
397
- ImageResize,
398
- ImageStyle,
399
- ImageTextAlternative,
400
- ImageToolbar,
401
- ImageUpload,
402
- Indent,
403
- IndentBlock,
404
- Italic,
405
- Link,
406
- LinkImage,
407
- List,
408
- ListProperties,
409
- MediaEmbed,
410
- Paragraph,
411
- PasteFromOffice,
412
- RemoveFormat,
413
- SelectAll,
414
- SpecialCharacters,
415
- SpecialCharactersArrows,
416
- SpecialCharactersCurrency,
417
- SpecialCharactersEssentials,
418
- SpecialCharactersLatin,
419
- SpecialCharactersMathematical,
420
- SpecialCharactersText,
421
- Strikethrough,
422
- Style,
423
- Subscript,
424
- Superscript,
425
- Table,
426
- TableCaption,
427
- TableCellProperties,
428
- TableColumnResize,
429
- TableProperties,
430
- TableToolbar,
431
- TextTransformation,
432
- TodoList,
433
- Underline,
434
- Undo,
435
- ],
436
- fontSize: {
437
- options: [10, 12, 14, 'default', 18, 20, 22, 24, 26, 28, 30, 32],
438
- supportAllValues: true,
439
- },
181
+ plugins: [],
440
182
  heading: {
441
183
  options: [
442
184
  {
@@ -458,78 +200,28 @@ var standard = {
458
200
  },
459
201
  {
460
202
  model: 'heading3',
461
- view: 'h3',
462
- title: 'Heading 3',
463
- class: 'ck-heading_heading3',
464
- },
465
- {
466
- model: 'heading4',
467
- view: 'h4',
468
- title: 'Heading 4',
469
- class: 'ck-heading_heading4',
470
- },
471
- {
472
- model: 'heading5',
473
- view: 'h5',
474
- title: 'Heading 5',
475
- class: 'ck-heading_heading5',
476
- },
477
- {
478
- model: 'heading6',
479
- view: 'h6',
480
- title: 'Heading 6',
481
- class: 'ck-heading_heading6',
482
- },
483
- ],
484
- },
485
- htmlSupport: {
486
- allow: [
487
- {
488
- name: /^.*$/,
489
- styles: true,
490
- attributes: true,
491
- classes: true,
492
- },
493
- ],
494
- },
495
- image: {
496
- toolbar: [
497
- 'toggleImageCaption',
498
- 'imageTextAlternative',
499
- '|',
500
- 'imageStyle:inline',
501
- 'imageStyle:wrapText',
502
- 'imageStyle:breakText',
503
- '|',
504
- 'resizeImage',
505
- ],
506
- styles: {
507
- options: [
508
- 'inline', 'alignLeft', 'alignRight',
509
- 'alignCenter', 'alignBlockLeft', 'alignBlockRight',
510
- 'block', 'side'
511
- ]
512
- },
513
- resizeOptions: [{
514
- name: 'resizeImage:original',
515
- label: 'Original',
516
- value: null
203
+ view: 'h3',
204
+ title: 'Heading 3',
205
+ class: 'ck-heading_heading3',
517
206
  },
518
207
  {
519
- name: 'resizeImage:25',
520
- label: '25%',
521
- value: '25'
208
+ model: 'heading4',
209
+ view: 'h4',
210
+ title: 'Heading 4',
211
+ class: 'ck-heading_heading4',
522
212
  },
523
213
  {
524
- name: 'resizeImage:50',
525
- label: '50%',
526
- value: '50'
214
+ model: 'heading5',
215
+ view: 'h5',
216
+ title: 'Heading 5',
217
+ class: 'ck-heading_heading5',
527
218
  },
528
219
  {
529
- name: 'resizeImage:75',
530
- label: '75%',
531
- value: '75'
532
- }
220
+ model: 'heading6',
221
+ view: 'h6',
222
+ title: 'Heading 6',
223
+ class: 'ck-heading_heading6',
224
+ },
533
225
  ],
534
226
  },
535
227
  link: {
@@ -545,73 +237,341 @@ var standard = {
545
237
  },
546
238
  },
547
239
  },
548
- list: {
549
- properties: {
550
- styles: true,
551
- startIndex: true,
552
- reversed: true,
553
- },
554
- },
555
- style: {
556
- definitions: [
557
- {
558
- name: 'Article category',
559
- element: 'h3',
560
- classes: ['category'],
561
- },
562
- {
563
- name: 'Title',
564
- element: 'h2',
565
- classes: ['document-title'],
566
- },
567
- {
568
- name: 'Subtitle',
569
- element: 'h3',
570
- classes: ['document-subtitle'],
571
- },
572
- {
573
- name: 'Info box',
574
- element: 'p',
575
- classes: ['info-box'],
576
- },
577
- {
578
- name: 'Side quote',
579
- element: 'blockquote',
580
- classes: ['side-quote'],
581
- },
582
- {
583
- name: 'Marker',
584
- element: 'span',
585
- classes: ['marker'],
586
- },
587
- {
588
- name: 'Spoiler',
589
- element: 'span',
590
- classes: ['spoiler'],
591
- },
592
- {
593
- name: 'Code (dark)',
594
- element: 'pre',
595
- classes: ['fancy-code', 'fancy-code-dark'],
596
- },
597
- {
598
- name: 'Code (bright)',
599
- element: 'pre',
600
- classes: ['fancy-code', 'fancy-code-bright'],
601
- },
602
- ],
603
- },
604
- table: {
605
- contentToolbar: [
606
- 'tableColumn',
607
- 'tableRow',
608
- 'mergeTableCells',
609
- 'tableProperties',
610
- 'tableCellProperties',
611
- ],
612
- },
613
240
  };
614
- var full = {
241
+ // export var defaults: any= {
242
+ // toolbar: {
243
+ // items: [
244
+ // 'undo',
245
+ // 'redo',
246
+ // '|',
247
+ // 'heading',
248
+ // '|',
249
+ // 'fontSize',
250
+ // 'fontFamily',
251
+ // 'fontColor',
252
+ // 'fontBackgroundColor',
253
+ // 'link',
254
+ // '|',
255
+ // 'bold',
256
+ // 'italic',
257
+ // 'underline',
258
+ // '|',
259
+ // 'insertImage',
260
+ // ],
261
+ // shouldNotGroupWhenFull: false,
262
+ // },
263
+ // plugins: [],
264
+ // heading: {
265
+ // options: [
266
+ // {
267
+ // model: 'paragraph',
268
+ // title: 'Paragraph',
269
+ // class: 'ck-heading_paragraph',
270
+ // },
271
+ // {
272
+ // model: 'heading1',
273
+ // view: 'h1',
274
+ // title: 'Heading 1',
275
+ // class: 'ck-heading_heading1',
276
+ // },
277
+ // {
278
+ // model: 'heading2',
279
+ // view: 'h2',
280
+ // title: 'Heading 2',
281
+ // class: 'ck-heading_heading2',
282
+ // },
283
+ // {
284
+ // model: 'heading3',
285
+ // view: 'h3',
286
+ // title: 'Heading 3',
287
+ // class: 'ck-heading_heading3',
288
+ // },
289
+ // {
290
+ // model: 'heading4',
291
+ // view: 'h4',
292
+ // title: 'Heading 4',
293
+ // class: 'ck-heading_heading4',
294
+ // },
295
+ // {
296
+ // model: 'heading5',
297
+ // view: 'h5',
298
+ // title: 'Heading 5',
299
+ // class: 'ck-heading_heading5',
300
+ // },
301
+ // {
302
+ // model: 'heading6',
303
+ // view: 'h6',
304
+ // title: 'Heading 6',
305
+ // class: 'ck-heading_heading6',
306
+ // },
307
+ // ],
308
+ // },
309
+ // fontSize: {
310
+ // options: [10, 12, 14, 'default', 18, 20, 22, 24, 26, 28, 30, 32],
311
+ // },
312
+ // link: {
313
+ // addTargetToExternalLinks: true,
314
+ // defaultProtocol: 'https://',
315
+ // decorators: {
316
+ // toggleDownloadable: {
317
+ // mode: 'manual',
318
+ // label: 'Downloadable',
319
+ // attributes: {
320
+ // download: 'file',
321
+ // },
322
+ // },
323
+ // },
324
+ // },
325
+ // image: {
326
+ // toolbar: [
327
+ // 'toggleImageCaption',
328
+ // 'imageTextAlternative',
329
+ // '|',
330
+ // 'imageStyle:inline',
331
+ // 'imageStyle:wrapText',
332
+ // 'imageStyle:breakText',
333
+ // '|',
334
+ // 'resizeImage',
335
+ // ],
336
+ // styles: {
337
+ // options: [
338
+ // 'inline', 'alignLeft', 'alignRight',
339
+ // 'alignCenter', 'alignBlockLeft', 'alignBlockRight',
340
+ // 'block', 'side'
341
+ // ]
342
+ // },
343
+ // resizeOptions: [{
344
+ // name: 'resizeImage:original',
345
+ // label: 'Original',
346
+ // value: null
347
+ // },
348
+ // {
349
+ // name: 'resizeImage:25',
350
+ // label: '25%',
351
+ // value: '25'
352
+ // },
353
+ // {
354
+ // name: 'resizeImage:50',
355
+ // label: '50%',
356
+ // value: '50'
357
+ // },
358
+ // {
359
+ // name: 'resizeImage:75',
360
+ // label: '75%',
361
+ // value: '75'
362
+ // }
363
+ // ],
364
+ // },
365
+ // }
366
+ // export var standard: any= {
367
+ // toolbar: {
368
+ // items: [
369
+ // 'undo',
370
+ // 'redo',
371
+ // '|',
372
+ // 'heading',
373
+ // '|',
374
+ // 'fontSize',
375
+ // 'fontFamily',
376
+ // 'fontColor',
377
+ // 'fontBackgroundColor',
378
+ // '|',
379
+ // 'bold',
380
+ // 'italic',
381
+ // 'underline',
382
+ // 'strikethrough',
383
+ // '|',
384
+ // 'link',
385
+ // 'insertImage',
386
+ // 'insertTable',
387
+ // '|',
388
+ // 'alignment',
389
+ // '|',
390
+ // 'bulletedList',
391
+ // 'numberedList',
392
+ // ],
393
+ // shouldNotGroupWhenFull: false,
394
+ // },
395
+ // plugins: [],
396
+ // fontSize: {
397
+ // options: [10, 12, 14, 'default', 18, 20, 22, 24, 26, 28, 30, 32],
398
+ // supportAllValues: true,
399
+ // },
400
+ // heading: {
401
+ // options: [
402
+ // {
403
+ // model: 'paragraph',
404
+ // title: 'Paragraph',
405
+ // class: 'ck-heading_paragraph',
406
+ // },
407
+ // {
408
+ // model: 'heading1',
409
+ // view: 'h1',
410
+ // title: 'Heading 1',
411
+ // class: 'ck-heading_heading1',
412
+ // },
413
+ // {
414
+ // model: 'heading2',
415
+ // view: 'h2',
416
+ // title: 'Heading 2',
417
+ // class: 'ck-heading_heading2',
418
+ // },
419
+ // {
420
+ // model: 'heading3',
421
+ // view: 'h3',
422
+ // title: 'Heading 3',
423
+ // class: 'ck-heading_heading3',
424
+ // },
425
+ // {
426
+ // model: 'heading4',
427
+ // view: 'h4',
428
+ // title: 'Heading 4',
429
+ // class: 'ck-heading_heading4',
430
+ // },
431
+ // {
432
+ // model: 'heading5',
433
+ // view: 'h5',
434
+ // title: 'Heading 5',
435
+ // class: 'ck-heading_heading5',
436
+ // },
437
+ // {
438
+ // model: 'heading6',
439
+ // view: 'h6',
440
+ // title: 'Heading 6',
441
+ // class: 'ck-heading_heading6',
442
+ // },
443
+ // ],
444
+ // },
445
+ // htmlSupport: {
446
+ // allow: [
447
+ // {
448
+ // name: /^.*$/,
449
+ // styles: true,
450
+ // attributes: true,
451
+ // classes: true,
452
+ // },
453
+ // ],
454
+ // },
455
+ // image: {
456
+ // toolbar: [
457
+ // 'toggleImageCaption',
458
+ // 'imageTextAlternative',
459
+ // '|',
460
+ // 'imageStyle:inline',
461
+ // 'imageStyle:wrapText',
462
+ // 'imageStyle:breakText',
463
+ // '|',
464
+ // 'resizeImage',
465
+ // ],
466
+ // styles: {
467
+ // options: [
468
+ // 'inline', 'alignLeft', 'alignRight',
469
+ // 'alignCenter', 'alignBlockLeft', 'alignBlockRight',
470
+ // 'block', 'side'
471
+ // ]
472
+ // },
473
+ // resizeOptions: [{
474
+ // name: 'resizeImage:original',
475
+ // label: 'Original',
476
+ // value: null
477
+ // },
478
+ // {
479
+ // name: 'resizeImage:25',
480
+ // label: '25%',
481
+ // value: '25'
482
+ // },
483
+ // {
484
+ // name: 'resizeImage:50',
485
+ // label: '50%',
486
+ // value: '50'
487
+ // },
488
+ // {
489
+ // name: 'resizeImage:75',
490
+ // label: '75%',
491
+ // value: '75'
492
+ // }
493
+ // ],
494
+ // },
495
+ // link: {
496
+ // addTargetToExternalLinks: true,
497
+ // defaultProtocol: 'https://',
498
+ // decorators: {
499
+ // toggleDownloadable: {
500
+ // mode: 'manual',
501
+ // label: 'Downloadable',
502
+ // attributes: {
503
+ // download: 'file',
504
+ // },
505
+ // },
506
+ // },
507
+ // },
508
+ // list: {
509
+ // properties: {
510
+ // styles: true,
511
+ // startIndex: true,
512
+ // reversed: true,
513
+ // },
514
+ // },
515
+ // style: {
516
+ // definitions: [
517
+ // {
518
+ // name: 'Article category',
519
+ // element: 'h3',
520
+ // classes: ['category'],
521
+ // },
522
+ // {
523
+ // name: 'Title',
524
+ // element: 'h2',
525
+ // classes: ['document-title'],
526
+ // },
527
+ // {
528
+ // name: 'Subtitle',
529
+ // element: 'h3',
530
+ // classes: ['document-subtitle'],
531
+ // },
532
+ // {
533
+ // name: 'Info box',
534
+ // element: 'p',
535
+ // classes: ['info-box'],
536
+ // },
537
+ // {
538
+ // name: 'Side quote',
539
+ // element: 'blockquote',
540
+ // classes: ['side-quote'],
541
+ // },
542
+ // {
543
+ // name: 'Marker',
544
+ // element: 'span',
545
+ // classes: ['marker'],
546
+ // },
547
+ // {
548
+ // name: 'Spoiler',
549
+ // element: 'span',
550
+ // classes: ['spoiler'],
551
+ // },
552
+ // {
553
+ // name: 'Code (dark)',
554
+ // element: 'pre',
555
+ // classes: ['fancy-code', 'fancy-code-dark'],
556
+ // },
557
+ // {
558
+ // name: 'Code (bright)',
559
+ // element: 'pre',
560
+ // classes: ['fancy-code', 'fancy-code-bright'],
561
+ // },
562
+ // ],
563
+ // },
564
+ // table: {
565
+ // contentToolbar: [
566
+ // 'tableColumn',
567
+ // 'tableRow',
568
+ // 'mergeTableCells',
569
+ // 'tableProperties',
570
+ // 'tableCellProperties',
571
+ // ],
572
+ // },
573
+ // }
574
+ var Classic = {
615
575
  toolbar: {
616
576
  items: [
617
577
  'undo',
@@ -651,69 +611,7 @@ var full = {
651
611
  ],
652
612
  shouldNotGroupWhenFull: false,
653
613
  },
654
- plugins: [
655
- AccessibilityHelp,
656
- Alignment,
657
- Autoformat,
658
- AutoImage,
659
- Autosave,
660
- Base64UploadAdapter,
661
- BlockQuote,
662
- Bold,
663
- CloudServices,
664
- Code,
665
- Essentials,
666
- FontBackgroundColor,
667
- FontColor,
668
- FontFamily,
669
- FontSize,
670
- GeneralHtmlSupport,
671
- Heading,
672
- HorizontalLine,
673
- ImageBlock,
674
- ImageCaption,
675
- ImageInline,
676
- ImageInsert,
677
- ImageInsertViaUrl,
678
- ImageResize,
679
- ImageStyle,
680
- ImageTextAlternative,
681
- ImageToolbar,
682
- ImageUpload,
683
- Indent,
684
- IndentBlock,
685
- Italic,
686
- Link,
687
- LinkImage,
688
- List,
689
- ListProperties,
690
- MediaEmbed,
691
- Paragraph,
692
- PasteFromOffice,
693
- RemoveFormat,
694
- SelectAll,
695
- SpecialCharacters,
696
- SpecialCharactersArrows,
697
- SpecialCharactersCurrency,
698
- SpecialCharactersEssentials,
699
- SpecialCharactersLatin,
700
- SpecialCharactersMathematical,
701
- SpecialCharactersText,
702
- Strikethrough,
703
- Style,
704
- Subscript,
705
- Superscript,
706
- Table,
707
- TableCaption,
708
- TableCellProperties,
709
- TableColumnResize,
710
- TableProperties,
711
- TableToolbar,
712
- TextTransformation,
713
- TodoList,
714
- Underline,
715
- Undo,
716
- ],
614
+ plugins: [],
717
615
  fontFamily: {
718
616
  supportAllValues: true,
719
617
  },
@@ -896,10 +794,10 @@ var full = {
896
794
  },
897
795
  };
898
796
  var CkEditorTypesObject = {
899
- default: defaults,
900
- easy: easy,
901
- standard: standard,
902
- full: full
797
+ // default: defaults,
798
+ Simple: Simple,
799
+ // standard: standard,
800
+ Classic: Classic
903
801
  };
904
802
 
905
803
  var LanguagesMap;
@@ -924,12 +822,15 @@ var LanguagesMap;
924
822
  LanguagesMap["vi"] = "vi";
925
823
  })(LanguagesMap || (LanguagesMap = {}));
926
824
 
825
+ // import { CkEditorModeEnum } from '../enums/ck-editor-mode-enum';
927
826
  class SetCkEditorConfigsService {
928
827
  constructor() { }
929
828
  async get(input) {
930
- let { language } = input;
829
+ let { language, type } = input;
931
830
  return new Promise(async (resolve, rejects) => {
932
- let configs = CkEditorTypesObject['easy'];
831
+ let configs = CkEditorTypesObject[CkEditorModeEnum[type]];
832
+ let { AccessibilityHelp, Highlight, Alignment, Autoformat, AutoImage, Autosave, Base64UploadAdapter, BlockQuote, Bold, CloudServices, Code, Essentials, FontBackgroundColor, FontColor, FontFamily, FontSize, GeneralHtmlSupport, Heading, HorizontalLine, ImageBlock, ImageCaption, ImageInline, ImageInsert, ImageInsertViaUrl, ImageResize, ImageStyle, ImageTextAlternative, ImageToolbar, ImageUpload, Indent, IndentBlock, Italic, Link, LinkImage, List, ListProperties, MediaEmbed, Paragraph, PasteFromOffice, RemoveFormat, SelectAll, SpecialCharacters, SpecialCharactersArrows, SpecialCharactersCurrency, SpecialCharactersEssentials, SpecialCharactersLatin, SpecialCharactersMathematical, SpecialCharactersText, Strikethrough, Style, Subscript, Superscript, Table, TableCaption, TableCellProperties, TableColumnResize, TableProperties, TableToolbar, TextTransformation, TodoList, Underline, Undo } = await import('ckeditor5');
833
+ configs.plugins = [AccessibilityHelp, Highlight, Alignment, Autoformat, AutoImage, Autosave, Base64UploadAdapter, BlockQuote, Bold, CloudServices, Code, Essentials, FontBackgroundColor, FontColor, FontFamily, FontSize, GeneralHtmlSupport, Heading, HorizontalLine, ImageBlock, ImageCaption, ImageInline, ImageInsert, ImageInsertViaUrl, ImageResize, ImageStyle, ImageTextAlternative, ImageToolbar, ImageUpload, Indent, IndentBlock, Italic, Link, LinkImage, List, ListProperties, MediaEmbed, Paragraph, PasteFromOffice, RemoveFormat, SelectAll, SpecialCharacters, SpecialCharactersArrows, SpecialCharactersCurrency, SpecialCharactersEssentials, SpecialCharactersLatin, SpecialCharactersMathematical, SpecialCharactersText, Strikethrough, Style, Subscript, Superscript, Table, TableCaption, TableCellProperties, TableColumnResize, TableProperties, TableToolbar, TextTransformation, TodoList, Underline, Undo];
933
834
  configs.language = LanguagesMap[language];
934
835
  await import(`@ckeditor/ckeditor5-build-decoupled-document/build/translations/${LanguagesMap[language]}`);
935
836
  resolve(configs);
@@ -945,201 +846,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
945
846
  }]
946
847
  }], ctorParameters: () => [] });
947
848
 
948
- class CkEditorDomeComponent {
949
- constructor() {
950
- this.config = inject(ConfigStateService);
951
- this.currentCulture = this.config.getOne('localization')?.currentCulture?.name;
952
- this.Editor = ClassicEditor;
953
- this._config = {
954
- plugins: [Bold, Essentials, Italic, Paragraph, Undo],
955
- toolbar: ['undo', 'redo', '|', 'bold', 'italic'],
956
- };
957
- this.configType = 'default';
958
- this.editorValue = '<p>12233</p>';
959
- this._SetCkEditorConfigsService = inject(SetCkEditorConfigsService);
960
- this.lazyLoadService = inject(LazyLoadService);
961
- this.subscriptionService = inject(SubscriptionService);
962
- this._config_ck = CkEditorTypesObject['full'];
963
- }
964
- /**切换类型 */
965
- switchType(type) {
966
- this.configType = type;
967
- this._config_ck = '';
968
- setTimeout(async () => {
969
- this.loadStyle();
970
- let configs = await this._SetCkEditorConfigsService.get({
971
- language: this.currentCulture,
972
- });
973
- this._config_ck = configs;
974
- }, 0);
975
- }
976
- loadStyle() {
977
- const loaded$ = this.lazyLoadService.load(LOADING_STRATEGY.AppendAnonymousStyleToHead('ckeditor5.css'));
978
- this.subscriptionService.addOne(loaded$);
979
- }
980
- clearconfig() {
981
- this._config = null;
982
- }
983
- /**加载完成 */
984
- ckReady(editor) {
985
- const element = editor.ui.getEditableElement();
986
- const parent = element.parentElement;
987
- parent.insertBefore(editor.ui.view.toolbar.element, element);
988
- }
989
- /**内容改变 */
990
- ckChange({ editor }) {
991
- const data = editor.getData();
992
- this.editorValue = data;
993
- }
994
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: CkEditorDomeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
995
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: CkEditorDomeComponent, selector: "lib-ck-editor-dome", ngImport: i0, template: "<button class=\"btn btn-sm btn-primary mx-2 mb-3\" (click.stop)=\"switchType('easy')\">\u6781\u7B80</button>\r\n<button class=\"btn btn-sm btn-primary mx-2 mb-3\" (click.stop)=\"switchType('default')\">\u9ED8\u8BA4</button>\r\n<button class=\"btn btn-sm btn-primary mx-2 mb-3\" (click.stop)=\"switchType('standard')\">\u6807\u51C6</button>\r\n<button class=\"btn btn-sm btn-primary mx-2 mb-3\" (click.stop)=\"switchType('full')\">\u5B8C\u6574</button>\r\n\r\n<button class=\"btn btn-sm btn-primary mx-2 mb-3\" (click.stop)=\"clearconfig()\">\u6E05\u7A7A\u914D\u7F6E</button>\r\n\r\n<h3>\u81EA\u5B9A\u4E49\u914D\u7F6E</h3>\r\n<ckeditor #editor [editor]=\"Editor\" *ngIf=\"_config_ck\" [(ngModel)]=\"editorValue\" [config]=\"_config\" ></ckeditor>\r\n\r\n<h3>\u7C7B\u578B</h3>\r\n<ckeditor #editor [editor]=\"Editor\" *ngIf=\"_config_ck\" [(ngModel)]=\"editorValue\" [config]=\"_config_ck\" (change)=\"ckChange($event)\" (ready)=\"ckReady($event)\"></ckeditor>\r\n\r\n{{editorValue}}", styles: [""], dependencies: [{ kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.StopPropagationDirective, selector: "[click.stop]", outputs: ["click.stop"] }, { kind: "component", type: i4.CKEditorComponent, selector: "ckeditor", inputs: ["editor", "config", "data", "tagName", "watchdog", "editorWatchdogConfig", "disableTwoWayDataBinding", "disabled"], outputs: ["ready", "change", "blur", "focus", "error"] }] }); }
996
- }
997
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: CkEditorDomeComponent, decorators: [{
998
- type: Component,
999
- args: [{ selector: 'lib-ck-editor-dome', template: "<button class=\"btn btn-sm btn-primary mx-2 mb-3\" (click.stop)=\"switchType('easy')\">\u6781\u7B80</button>\r\n<button class=\"btn btn-sm btn-primary mx-2 mb-3\" (click.stop)=\"switchType('default')\">\u9ED8\u8BA4</button>\r\n<button class=\"btn btn-sm btn-primary mx-2 mb-3\" (click.stop)=\"switchType('standard')\">\u6807\u51C6</button>\r\n<button class=\"btn btn-sm btn-primary mx-2 mb-3\" (click.stop)=\"switchType('full')\">\u5B8C\u6574</button>\r\n\r\n<button class=\"btn btn-sm btn-primary mx-2 mb-3\" (click.stop)=\"clearconfig()\">\u6E05\u7A7A\u914D\u7F6E</button>\r\n\r\n<h3>\u81EA\u5B9A\u4E49\u914D\u7F6E</h3>\r\n<ckeditor #editor [editor]=\"Editor\" *ngIf=\"_config_ck\" [(ngModel)]=\"editorValue\" [config]=\"_config\" ></ckeditor>\r\n\r\n<h3>\u7C7B\u578B</h3>\r\n<ckeditor #editor [editor]=\"Editor\" *ngIf=\"_config_ck\" [(ngModel)]=\"editorValue\" [config]=\"_config_ck\" (change)=\"ckChange($event)\" (ready)=\"ckReady($event)\"></ckeditor>\r\n\r\n{{editorValue}}" }]
1000
- }] });
1001
-
1002
- const routes = [{
1003
- path: 'dome',
1004
- component: CkEditorDomeComponent,
1005
- }];
1006
- class CkEditorRoutingModule {
1007
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: CkEditorRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1008
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.1.5", ngImport: i0, type: CkEditorRoutingModule, imports: [i1$1.RouterModule], exports: [RouterModule] }); }
1009
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: CkEditorRoutingModule, imports: [RouterModule.forChild(routes), RouterModule] }); }
1010
- }
1011
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: CkEditorRoutingModule, decorators: [{
1012
- type: NgModule,
1013
- args: [{
1014
- imports: [RouterModule.forChild(routes)],
1015
- exports: [RouterModule],
1016
- }]
1017
- }] });
1018
-
1019
- class CkEditorConfig {
1020
- constructor(data) {
1021
- /**文件容器名称 */
1022
- // placeholder: any = new FormControl('', Validators.required);
1023
- this['Ckeditor.ImagesContainerName'] = ['', []];
1024
- /**多选 */
1025
- // placeholder: any = new FormControl('', Validators.required);
1026
- this['Ckeditor.InitialContent'] = ['', []];
1027
- if (data) {
1028
- for (const key in data) {
1029
- if (data.hasOwnProperty(key)) {
1030
- this[key] = data[key];
1031
- }
1032
- }
1033
- }
1034
- }
1035
- }
1036
-
1037
- class CkEditorConfigComponent {
1038
- constructor(fb) {
1039
- this.fb = fb;
1040
- }
1041
- set Entity(v) {
1042
- this._Entity = v;
1043
- this.dataLoaded();
1044
- }
1045
- set selected(v) {
1046
- this._selected = v || '';
1047
- // this.dataLoaded()
1048
- }
1049
- set type(v) {
1050
- this._type = v;
1051
- // this.dataLoaded()
1052
- }
1053
- //
1054
- get formConfiguration() {
1055
- return this._Entity.get('formConfiguration');
1056
- }
1057
- async dataLoaded() {
1058
- // if (this.Entity && (this._selected || this._selected === '')) {
1059
- if (this._Entity && this._type) {
1060
- await this.AfterInit();
1061
- this.submitclick.nativeElement.click();
1062
- }
1063
- }
1064
- AfterInit() {
1065
- return new Promise((resolve, rejects) => {
1066
- this._Entity.setControl('formConfiguration', this.fb.group(new CkEditorConfig()));
1067
- if (this._selected && this._selected.formControlName == this._type) {
1068
- this.formConfiguration.patchValue({
1069
- ...this._selected.formConfiguration,
1070
- });
1071
- }
1072
- resolve(true);
1073
- });
1074
- }
1075
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: CkEditorConfigComponent, deps: [{ token: i1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
1076
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: CkEditorConfigComponent, selector: "ck-editor-config", inputs: { Entity: "Entity", selected: "selected", type: "type" }, viewQueries: [{ propertyName: "submitclick", first: true, predicate: ["submitclick"], descendants: true, static: true }], ngImport: i0, template: "<form [formGroup]=\"_Entity\">\n <div formGroupName=\"formConfiguration\">\n <div class=\"mb-3\">\n <label class=\"form-label\">{{'DigniteAbpDynamicFormsCkEditor::ImagesContainerName' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"Ckeditor.ImagesContainerName\">\n </div>\n <div class=\"mb-3\">\n <label class=\"form-label\">{{'DigniteAbpDynamicFormsCkEditor::InitialContent' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"Ckeditor.InitialContent\">\n </div>\n <button type=\"submit\" (abpInit)=\"submitclick?.nativeElement?.click()\" style=\"display: none;\"\n #submitclick></button>\n </div>\n</form>", styles: [""], dependencies: [{ kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i2$1.InitDirective, selector: "[abpInit]", outputs: ["abpInit"] }, { kind: "directive", type: i3.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i3.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "pipe", type: i2$1.LocalizationPipe, name: "abpLocalization" }] }); }
1077
- }
1078
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: CkEditorConfigComponent, decorators: [{
1079
- type: Component,
1080
- args: [{ selector: 'ck-editor-config', template: "<form [formGroup]=\"_Entity\">\n <div formGroupName=\"formConfiguration\">\n <div class=\"mb-3\">\n <label class=\"form-label\">{{'DigniteAbpDynamicFormsCkEditor::ImagesContainerName' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"Ckeditor.ImagesContainerName\">\n </div>\n <div class=\"mb-3\">\n <label class=\"form-label\">{{'DigniteAbpDynamicFormsCkEditor::InitialContent' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"Ckeditor.InitialContent\">\n </div>\n <button type=\"submit\" (abpInit)=\"submitclick?.nativeElement?.click()\" style=\"display: none;\"\n #submitclick></button>\n </div>\n</form>" }]
1081
- }], ctorParameters: () => [{ type: i1.FormBuilder }], propDecorators: { Entity: [{
1082
- type: Input
1083
- }], selected: [{
1084
- type: Input
1085
- }], type: [{
1086
- type: Input
1087
- }], submitclick: [{
1088
- type: ViewChild,
1089
- args: ['submitclick', { static: true }]
1090
- }] } });
1091
-
1092
- let isBase64UploadAdapter$1 = class isBase64UploadAdapter {
1093
- constructor(loader, ImagesContainerName, restService) {
1094
- this.reader = new FileReader();
1095
- this.Base64 = false;
1096
- this.createFile = (input, config) => this.restService.request({
1097
- method: 'POST',
1098
- url: '/api/file-explorer/files',
1099
- params: { containerName: input.containerName, cellName: input.cellName, directoryId: input.directoryId, entityId: input.entityId },
1100
- body: input.file,
1101
- }, { apiName: 'FileExplorer', ...config });
1102
- this.loader = loader;
1103
- this.ImagesContainerName = ImagesContainerName;
1104
- this.restService = restService;
1105
- }
1106
- upload() {
1107
- return new Promise((resolve, reject) => {
1108
- const reader = this.reader;
1109
- if (this.Base64) {
1110
- reader.addEventListener('load', () => {
1111
- resolve({ default: reader.result });
1112
- });
1113
- reader.addEventListener('error', err => {
1114
- reject(err);
1115
- });
1116
- reader.addEventListener('abort', () => {
1117
- reject();
1118
- });
1119
- this.loader.file.then((file) => {
1120
- reader.readAsDataURL(file);
1121
- });
1122
- }
1123
- else {
1124
- this.loader.file.then((file) => {
1125
- var formData = new FormData();
1126
- formData.append('file', file, file.name);
1127
- this.createFile({
1128
- file: formData,
1129
- containerName: this.ImagesContainerName,
1130
- directoryId: '',
1131
- entityId: ''
1132
- }).subscribe((response) => {
1133
- resolve({ default: response.url });
1134
- }, (error) => {
1135
- reject(error);
1136
- });
1137
- });
1138
- }
1139
- });
1140
- }
1141
- };
1142
-
1143
849
  class CkEditorControlComponent {
1144
850
  constructor() {
1145
851
  this.config = inject(ConfigStateService);
@@ -1148,18 +854,17 @@ class CkEditorControlComponent {
1148
854
  this.ckEditorValue = '';
1149
855
  /**系统语言 */
1150
856
  this.currentCulture = this.config.getOne('localization')?.currentCulture?.name;
1151
- this.Editor = ClassicEditor;
857
+ this.CkEditorModeEnum = CkEditorModeEnum;
1152
858
  this.fb = inject(FormBuilder);
1153
859
  /**字段配置列表 */
1154
860
  this._fields = '';
1155
- this.languagesMap = LanguagesMap;
861
+ this.cdr = inject(ChangeDetectorRef);
1156
862
  this._SetCkEditorConfigsService = inject(SetCkEditorConfigsService);
1157
863
  this.lazyLoadService = inject(LazyLoadService);
1158
864
  this.subscriptionService = inject(SubscriptionService);
1159
865
  this.invalidfeedback = false;
1160
866
  /**图片容器名称 */
1161
867
  this.imagesContainerName = '';
1162
- this.loadckeditor();
1163
868
  }
1164
869
  onReady(editor) {
1165
870
  let _this = this;
@@ -1197,16 +902,36 @@ class CkEditorControlComponent {
1197
902
  this.ckEditorValue =
1198
903
  this._selected || this._fields.field.formConfiguration['Ckeditor.InitialContent'];
1199
904
  this.setckeditorInput(this.ckEditorValue);
1200
- this.submitclick.nativeElement.click();
905
+ this.cdr.detectChanges(); // 手动触发变更检测
906
+ await this.loadckeditor();
907
+ this.submitclick?.nativeElement?.click();
1201
908
  }
1202
909
  }
1203
910
  loadckeditor() {
911
+ let _that = this;
912
+ let formConfiguration = this._fields.field.formConfiguration;
1204
913
  return new Promise(async (resolve) => {
1205
- this.loadStyle();
1206
- let configs = await this._SetCkEditorConfigsService.get({
1207
- language: this.currentCulture,
914
+ await import('ckeditor5').then(async (res) => {
915
+ this.loadStyle();
916
+ if (formConfiguration['Ckeditor.Mode'] == CkEditorModeEnum.Simple) {
917
+ _that.Editor = res.InlineEditor;
918
+ }
919
+ else if (formConfiguration['Ckeditor.Mode'] == CkEditorModeEnum.Classic) {
920
+ _that.Editor = res.ClassicEditor;
921
+ }
922
+ else {
923
+ formConfiguration['Ckeditor.Mode'] = CkEditorModeEnum.Simple;
924
+ _that.Editor = res.InlineEditor;
925
+ }
926
+ let configs = await _that._SetCkEditorConfigsService.get({
927
+ language: _that.currentCulture,
928
+ type: formConfiguration['Ckeditor.Mode']
929
+ });
930
+ if (!this.imagesContainerName) {
931
+ configs?.toolbar?.items?.splice(configs?.toolbar?.items?.indexOf('insertImage'), 1);
932
+ }
933
+ _that.ckOptions = configs;
1208
934
  });
1209
- this.ckOptions = configs;
1210
935
  resolve(true);
1211
936
  });
1212
937
  }
@@ -1229,19 +954,17 @@ class CkEditorControlComponent {
1229
954
  ? this._selected
1230
955
  : this._fields.field.formConfiguration['Ckeditor.InitialContent'], ValidatorsArray);
1231
956
  this.extraProperties.setControl(this._fields.field.name, newControl);
1232
- this.imagesContainerName = this._fields.field.formConfiguration['Ckeditor.ImagesContainerName'];
1233
- if (!this.imagesContainerName) {
1234
- this.ckOptions?.toolbar?.items?.splice(this.ckOptions?.toolbar?.items?.indexOf('insertImage'), 1);
1235
- }
957
+ this.imagesContainerName =
958
+ this._fields.field.formConfiguration['Ckeditor.ImagesContainerName'];
1236
959
  resolve(true);
1237
960
  });
1238
961
  }
1239
962
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: CkEditorControlComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1240
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: CkEditorControlComponent, selector: "ck-editor-control", inputs: { fields: "fields", parentFiledName: "parentFiledName", selected: "selected", entity: "entity" }, viewQueries: [{ propertyName: "submitclick", first: true, predicate: ["submitclick"], descendants: true, static: true }], ngImport: i0, template: "<form [formGroup]=\"_entity\">\n <div formGroupName=\"extraProperties\">\n <div class=\"mb-3\">\n <label class=\"form-label\" *ngIf=\"_fields.displayName\">{{ _fields.displayName }}</label>\n <ng-container *ngIf=\"ckOptions\">\n\n <ckeditor [editor]=\"Editor\" *ngIf=\"Editor\" [config]=\"ckOptions\" (ready)=\"onReady($event)\"\n [formControlName]=\"_fields.field.name\">\n </ckeditor>\n </ng-container>\n <small class=\"form-text text-muted d-block\"\n *ngIf=\"_fields.field.description\">{{_fields.field.description}}</small>\n </div>\n </div>\n <button type=\"submit\" style=\"display: none;\" #submitclick></button>\n</form>", styles: [""], dependencies: [{ kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i3.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i3.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "component", type: i4.CKEditorComponent, selector: "ckeditor", inputs: ["editor", "config", "data", "tagName", "watchdog", "editorWatchdogConfig", "disableTwoWayDataBinding", "disabled"], outputs: ["ready", "change", "blur", "focus", "error"] }] }); }
963
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: CkEditorControlComponent, selector: "ck-editor-control", inputs: { fields: "fields", parentFiledName: "parentFiledName", selected: "selected", entity: "entity" }, viewQueries: [{ propertyName: "submitclick", first: true, predicate: ["submitclick"], descendants: true, static: true }], ngImport: i0, template: "<form [formGroup]=\"_entity\">\n <div formGroupName=\"extraProperties\">\n <div class=\"mb-3\">\n <label class=\"form-label\" *ngIf=\"_fields.displayName\">{{ _fields.displayName }}</label>\n <ng-container *ngIf=\"ckOptions\">\n <ckeditor class=\"form-textarea\" [editor]=\"Editor\" *ngIf=\"Editor\" [config]=\"ckOptions\" (ready)=\"onReady($event)\"\n [formControlName]=\"_fields.field.name\">\n </ckeditor>\n </ng-container>\n <small class=\"form-text text-muted d-block\"\n *ngIf=\"_fields.field.description\">{{_fields.field.description}}</small>\n </div>\n </div>\n <button type=\"submit\" style=\"display: none;\" #submitclick></button>\n</form>", styles: ["@charset \"UTF-8\";:root .ck.ck-editor__editable_inline{min-height:160px!important}.ck.ck-editor__main>.ck-editor__editable{background:var(--bs-body-bg)!important}.ck.ck-toolbar,.ck.ck-button.ck-list-item-button,.ck.ck-button.ck-list-item-button.ck-on,.ck.ck-dropdown__panel{background:var(--bs-body-bg)!important}.ck.ck-editor__editable_inline{border-color:var(--ck-color-base-border)!important}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1$1.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i4.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i4.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "component", type: i4$1.CKEditorComponent, selector: "ckeditor", inputs: ["editor", "config", "data", "tagName", "watchdog", "editorWatchdogConfig", "disableTwoWayDataBinding", "disabled"], outputs: ["ready", "change", "blur", "focus", "error"] }] }); }
1241
964
  }
1242
965
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: CkEditorControlComponent, decorators: [{
1243
966
  type: Component,
1244
- args: [{ selector: 'ck-editor-control', template: "<form [formGroup]=\"_entity\">\n <div formGroupName=\"extraProperties\">\n <div class=\"mb-3\">\n <label class=\"form-label\" *ngIf=\"_fields.displayName\">{{ _fields.displayName }}</label>\n <ng-container *ngIf=\"ckOptions\">\n\n <ckeditor [editor]=\"Editor\" *ngIf=\"Editor\" [config]=\"ckOptions\" (ready)=\"onReady($event)\"\n [formControlName]=\"_fields.field.name\">\n </ckeditor>\n </ng-container>\n <small class=\"form-text text-muted d-block\"\n *ngIf=\"_fields.field.description\">{{_fields.field.description}}</small>\n </div>\n </div>\n <button type=\"submit\" style=\"display: none;\" #submitclick></button>\n</form>" }]
967
+ args: [{ selector: 'ck-editor-control', template: "<form [formGroup]=\"_entity\">\n <div formGroupName=\"extraProperties\">\n <div class=\"mb-3\">\n <label class=\"form-label\" *ngIf=\"_fields.displayName\">{{ _fields.displayName }}</label>\n <ng-container *ngIf=\"ckOptions\">\n <ckeditor class=\"form-textarea\" [editor]=\"Editor\" *ngIf=\"Editor\" [config]=\"ckOptions\" (ready)=\"onReady($event)\"\n [formControlName]=\"_fields.field.name\">\n </ckeditor>\n </ng-container>\n <small class=\"form-text text-muted d-block\"\n *ngIf=\"_fields.field.description\">{{_fields.field.description}}</small>\n </div>\n </div>\n <button type=\"submit\" style=\"display: none;\" #submitclick></button>\n</form>", styles: ["@charset \"UTF-8\";:root .ck.ck-editor__editable_inline{min-height:160px!important}.ck.ck-editor__main>.ck-editor__editable{background:var(--bs-body-bg)!important}.ck.ck-toolbar,.ck.ck-button.ck-list-item-button,.ck.ck-button.ck-list-item-button.ck-on,.ck.ck-dropdown__panel{background:var(--bs-body-bg)!important}.ck.ck-editor__editable_inline{border-color:var(--ck-color-base-border)!important}\n"] }]
1245
968
  }], ctorParameters: () => [], propDecorators: { fields: [{
1246
969
  type: Input
1247
970
  }], parentFiledName: [{
@@ -1278,17 +1001,12 @@ function AddFieldControlGroup(array = []) {
1278
1001
  class CkEditorModule {
1279
1002
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: CkEditorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1280
1003
  static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.1.5", ngImport: i0, type: CkEditorModule, declarations: [CkEditorControlComponent,
1281
- CkEditorConfigComponent,
1282
- CkEditorDomeComponent], imports: [FormsModule,
1283
- CoreModule,
1004
+ CkEditorConfigComponent], imports: [CoreModule,
1284
1005
  ThemeSharedModule,
1285
- ReactiveFormsModule,
1286
1006
  CkEditorRoutingModule,
1287
1007
  CKEditorModule] }); }
1288
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: CkEditorModule, imports: [FormsModule,
1289
- CoreModule,
1008
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: CkEditorModule, imports: [CoreModule,
1290
1009
  ThemeSharedModule,
1291
- ReactiveFormsModule,
1292
1010
  CkEditorRoutingModule,
1293
1011
  CKEditorModule] }); }
1294
1012
  }
@@ -1298,17 +1016,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
1298
1016
  declarations: [
1299
1017
  CkEditorControlComponent,
1300
1018
  CkEditorConfigComponent,
1301
- CkEditorDomeComponent,
1302
1019
  ],
1303
1020
  imports: [
1304
- FormsModule,
1305
1021
  CoreModule,
1306
1022
  ThemeSharedModule,
1307
- ReactiveFormsModule,
1308
1023
  CkEditorRoutingModule,
1309
1024
  CKEditorModule,
1310
1025
  ],
1311
- exports: []
1312
1026
  }]
1313
1027
  }] });
1314
1028
 
@@ -1373,28 +1087,6 @@ class isBase64UploadAdapter {
1373
1087
  }
1374
1088
  }
1375
1089
 
1376
- class SetCkeditorContentPipe {
1377
- constructor() {
1378
- this.sanitized = inject(DomSanitizer);
1379
- }
1380
- transform(value, ...args) {
1381
- if (value) {
1382
- value = value.replace(/<oembed url/ig, "<iframe src").replace(/oembed>/ig, "iframe>");
1383
- value = value.replace(/<figure class="media"/ig, "<div").replace(/figure>/ig, "div>");
1384
- }
1385
- return this.sanitized.bypassSecurityTrustHtml(value);
1386
- }
1387
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: SetCkeditorContentPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
1388
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.1.5", ngImport: i0, type: SetCkeditorContentPipe, isStandalone: true, name: "setCkeditorContent" }); }
1389
- }
1390
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: SetCkeditorContentPipe, decorators: [{
1391
- type: Pipe,
1392
- args: [{
1393
- name: 'setCkeditorContent',
1394
- standalone: true
1395
- }]
1396
- }] });
1397
-
1398
1090
  /*
1399
1091
  * Public API Surface of ck-editor
1400
1092
  */
@@ -1403,5 +1095,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
1403
1095
  * Generated bundle index. Do not edit.
1404
1096
  */
1405
1097
 
1406
- export { AddFieldControlGroup, CkEditorModule, CkEditorRoutingModule, CkEditorTypesObject, LanguagesMap, SetCkEditorConfigsService, SetCkeditorContentPipe, ckEditorFieldControlGroup, defaults, easy, full, getExcludeAssignControl, isBase64UploadAdapter, standard };
1098
+ export { AddFieldControlGroup, CkEditorModeEnum, CkEditorModeEnumOptions, CkEditorModule, SetCkEditorConfigsService, ckEditorFieldControlGroup, getExcludeAssignControl, isBase64UploadAdapter };
1407
1099
  //# sourceMappingURL=dignite-ng-expand.ck-editor.mjs.map