@kolkov/angular-editor 3.0.0-beta.0 → 3.0.0-beta.1
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 +9 -5
- package/assets/icons/icons.svg +156 -0
- package/esm2020/kolkov-angular-editor.mjs +4 -4
- package/esm2020/lib/ae-button/ae-button.component.mjs +21 -22
- package/esm2020/lib/ae-select/ae-select.component.mjs +185 -185
- package/esm2020/lib/ae-toolbar-set/ae-toolbar-set.component.mjs +14 -12
- package/esm2020/lib/angular-editor-toolbar.component.mjs +365 -363
- package/esm2020/lib/angular-editor.component.mjs +415 -415
- package/esm2020/lib/angular-editor.module.mjs +27 -27
- package/esm2020/lib/angular-editor.service.mjs +264 -264
- package/esm2020/lib/config.mjs +35 -35
- package/esm2020/lib/utils.mjs +3 -3
- package/esm2020/public-api.mjs +10 -10
- package/fesm2015/kolkov-angular-editor.mjs +1284 -1284
- package/fesm2015/kolkov-angular-editor.mjs.map +1 -1
- package/fesm2020/kolkov-angular-editor.mjs +1278 -1278
- package/fesm2020/kolkov-angular-editor.mjs.map +1 -1
- package/kolkov-angular-editor.d.ts +5 -5
- package/lib/ae-button/ae-button.component.d.ts +7 -10
- package/lib/ae-select/ae-select.component.d.ts +46 -46
- package/lib/ae-toolbar-set/ae-toolbar-set.component.d.ts +6 -6
- package/lib/angular-editor-toolbar.component.d.ts +97 -97
- package/lib/angular-editor.component.d.ts +133 -133
- package/lib/angular-editor.module.d.ts +13 -13
- package/lib/angular-editor.service.d.ts +87 -87
- package/lib/config.d.ts +39 -39
- package/lib/utils.d.ts +1 -1
- package/package.json +1 -1
- package/public-api.d.ts +8 -8
- package/src/lib/style.scss +290 -0
- package/assets/FontAwesome.otf +0 -0
- package/assets/fontawesome-webfont.eot +0 -0
- package/assets/fontawesome-webfont.svg +0 -2671
- package/assets/fontawesome-webfont.ttf +0 -0
- package/assets/fontawesome-webfont.woff +0 -0
- package/assets/fontawesome-webfont.woff2 +0 -0
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
import { ElementRef, EventEmitter, OnInit, Renderer2 } from '@angular/core';
|
|
2
|
-
import { ControlValueAccessor } from '@angular/forms';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export interface SelectOption {
|
|
5
|
-
label: string;
|
|
6
|
-
value: string;
|
|
7
|
-
}
|
|
8
|
-
export declare class AeSelectComponent implements OnInit, ControlValueAccessor {
|
|
9
|
-
private elRef;
|
|
10
|
-
private r;
|
|
11
|
-
options: SelectOption[];
|
|
12
|
-
isHidden: boolean;
|
|
13
|
-
selectedOption: SelectOption;
|
|
14
|
-
disabled: boolean;
|
|
15
|
-
optionId: number;
|
|
16
|
-
get label(): string;
|
|
17
|
-
opened: boolean;
|
|
18
|
-
get value(): string;
|
|
19
|
-
hidden: string;
|
|
20
|
-
changeEvent: EventEmitter<any>;
|
|
21
|
-
labelButton: ElementRef;
|
|
22
|
-
constructor(elRef: ElementRef, r: Renderer2);
|
|
23
|
-
ngOnInit(): void;
|
|
24
|
-
hide(): void;
|
|
25
|
-
optionSelect(option: SelectOption, event: MouseEvent): void;
|
|
26
|
-
toggleOpen(event: MouseEvent): void;
|
|
27
|
-
onClick($event: MouseEvent): void;
|
|
28
|
-
close(): void;
|
|
29
|
-
get isOpen(): boolean;
|
|
30
|
-
writeValue(value: any): void;
|
|
31
|
-
setValue(value: any): void;
|
|
32
|
-
onChange: any;
|
|
33
|
-
onTouched: any;
|
|
34
|
-
registerOnChange(fn: any): void;
|
|
35
|
-
registerOnTouched(fn: any): void;
|
|
36
|
-
setDisabledState(isDisabled: boolean): void;
|
|
37
|
-
handleKeyDown($event: KeyboardEvent): void;
|
|
38
|
-
_handleArrowDown($event: any): void;
|
|
39
|
-
_handleArrowUp($event: any): void;
|
|
40
|
-
_handleSpace($event: any): void;
|
|
41
|
-
_handleEnter($event: any): void;
|
|
42
|
-
_handleTab($event: any): void;
|
|
43
|
-
_handleBackspace(): void;
|
|
44
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<AeSelectComponent, never>;
|
|
45
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<AeSelectComponent, "ae-select", never, { "options": "options"; "isHidden": "hidden"; }, { "changeEvent": "change"; }, never, never>;
|
|
46
|
-
}
|
|
1
|
+
import { ElementRef, EventEmitter, OnInit, Renderer2 } from '@angular/core';
|
|
2
|
+
import { ControlValueAccessor } from '@angular/forms';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export interface SelectOption {
|
|
5
|
+
label: string;
|
|
6
|
+
value: string;
|
|
7
|
+
}
|
|
8
|
+
export declare class AeSelectComponent implements OnInit, ControlValueAccessor {
|
|
9
|
+
private elRef;
|
|
10
|
+
private r;
|
|
11
|
+
options: SelectOption[];
|
|
12
|
+
isHidden: boolean;
|
|
13
|
+
selectedOption: SelectOption;
|
|
14
|
+
disabled: boolean;
|
|
15
|
+
optionId: number;
|
|
16
|
+
get label(): string;
|
|
17
|
+
opened: boolean;
|
|
18
|
+
get value(): string;
|
|
19
|
+
hidden: string;
|
|
20
|
+
changeEvent: EventEmitter<any>;
|
|
21
|
+
labelButton: ElementRef;
|
|
22
|
+
constructor(elRef: ElementRef, r: Renderer2);
|
|
23
|
+
ngOnInit(): void;
|
|
24
|
+
hide(): void;
|
|
25
|
+
optionSelect(option: SelectOption, event: MouseEvent): void;
|
|
26
|
+
toggleOpen(event: MouseEvent): void;
|
|
27
|
+
onClick($event: MouseEvent): void;
|
|
28
|
+
close(): void;
|
|
29
|
+
get isOpen(): boolean;
|
|
30
|
+
writeValue(value: any): void;
|
|
31
|
+
setValue(value: any): void;
|
|
32
|
+
onChange: any;
|
|
33
|
+
onTouched: any;
|
|
34
|
+
registerOnChange(fn: any): void;
|
|
35
|
+
registerOnTouched(fn: any): void;
|
|
36
|
+
setDisabledState(isDisabled: boolean): void;
|
|
37
|
+
handleKeyDown($event: KeyboardEvent): void;
|
|
38
|
+
_handleArrowDown($event: any): void;
|
|
39
|
+
_handleArrowUp($event: any): void;
|
|
40
|
+
_handleSpace($event: any): void;
|
|
41
|
+
_handleEnter($event: any): void;
|
|
42
|
+
_handleTab($event: any): void;
|
|
43
|
+
_handleBackspace(): void;
|
|
44
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AeSelectComponent, never>;
|
|
45
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AeSelectComponent, "ae-select", never, { "options": "options"; "isHidden": "hidden"; }, { "changeEvent": "change"; }, never, never>;
|
|
46
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
export declare class AeToolbarSetComponent {
|
|
3
|
-
constructor();
|
|
4
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<AeToolbarSetComponent, never>;
|
|
5
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<AeToolbarSetComponent, "ae-toolbar-set", never, {}, {}, never, ["*"]>;
|
|
6
|
-
}
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class AeToolbarSetComponent {
|
|
3
|
+
constructor();
|
|
4
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AeToolbarSetComponent, never>;
|
|
5
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AeToolbarSetComponent, "ae-toolbar-set, [aeToolbarSet]", never, {}, {}, never, ["*"]>;
|
|
6
|
+
}
|
|
@@ -1,97 +1,97 @@
|
|
|
1
|
-
import { ElementRef, EventEmitter, Renderer2 } from '@angular/core';
|
|
2
|
-
import { AngularEditorService, UploadResponse } from './angular-editor.service';
|
|
3
|
-
import { HttpResponse, HttpEvent } from '@angular/common/http';
|
|
4
|
-
import { CustomClass } from './config';
|
|
5
|
-
import { SelectOption } from './ae-select/ae-select.component';
|
|
6
|
-
import { Observable } from 'rxjs';
|
|
7
|
-
import * as i0 from "@angular/core";
|
|
8
|
-
export declare class AngularEditorToolbarComponent {
|
|
9
|
-
private r;
|
|
10
|
-
private editorService;
|
|
11
|
-
private er;
|
|
12
|
-
private doc;
|
|
13
|
-
htmlMode: boolean;
|
|
14
|
-
linkSelected: boolean;
|
|
15
|
-
block: string;
|
|
16
|
-
fontName: string;
|
|
17
|
-
fontSize: string;
|
|
18
|
-
foreColour: any;
|
|
19
|
-
backColor: any;
|
|
20
|
-
headings: SelectOption[];
|
|
21
|
-
fontSizes: SelectOption[];
|
|
22
|
-
customClassId: string;
|
|
23
|
-
_customClasses: CustomClass[];
|
|
24
|
-
customClassList: SelectOption[];
|
|
25
|
-
tagMap: {
|
|
26
|
-
BLOCKQUOTE: string;
|
|
27
|
-
A: string;
|
|
28
|
-
};
|
|
29
|
-
select: string[];
|
|
30
|
-
buttons: string[];
|
|
31
|
-
id: string;
|
|
32
|
-
uploadUrl: string;
|
|
33
|
-
upload: (file: File) => Observable<HttpEvent<UploadResponse>>;
|
|
34
|
-
showToolbar: boolean;
|
|
35
|
-
fonts: SelectOption[];
|
|
36
|
-
set customClasses(classes: CustomClass[]);
|
|
37
|
-
set defaultFontName(value: string);
|
|
38
|
-
set defaultFontSize(value: string);
|
|
39
|
-
hiddenButtons: string[][];
|
|
40
|
-
execute: EventEmitter<string>;
|
|
41
|
-
myInputFile: ElementRef;
|
|
42
|
-
get isLinkButtonDisabled(): boolean;
|
|
43
|
-
constructor(r: Renderer2, editorService: AngularEditorService, er: ElementRef, doc: any);
|
|
44
|
-
/**
|
|
45
|
-
* Trigger command from editor header buttons
|
|
46
|
-
* @param command string from toolbar buttons
|
|
47
|
-
*/
|
|
48
|
-
triggerCommand(command: string): void;
|
|
49
|
-
/**
|
|
50
|
-
* highlight editor buttons when cursor moved or positioning
|
|
51
|
-
*/
|
|
52
|
-
triggerButtons(): void;
|
|
53
|
-
/**
|
|
54
|
-
* trigger highlight editor buttons when cursor moved or positioning in block
|
|
55
|
-
*/
|
|
56
|
-
triggerBlocks(nodes: Node[]): void;
|
|
57
|
-
/**
|
|
58
|
-
* insert URL link
|
|
59
|
-
*/
|
|
60
|
-
insertUrl(): void;
|
|
61
|
-
/**
|
|
62
|
-
* insert Video link
|
|
63
|
-
*/
|
|
64
|
-
insertVideo(): void;
|
|
65
|
-
/** insert color */
|
|
66
|
-
insertColor(color: string, where: string): void;
|
|
67
|
-
/**
|
|
68
|
-
* set font Name/family
|
|
69
|
-
* @param foreColor string
|
|
70
|
-
*/
|
|
71
|
-
setFontName(foreColor: string): void;
|
|
72
|
-
/**
|
|
73
|
-
* set font Size
|
|
74
|
-
* @param fontSize string
|
|
75
|
-
*/
|
|
76
|
-
setFontSize(fontSize: string): void;
|
|
77
|
-
/**
|
|
78
|
-
* toggle editor mode (WYSIWYG or SOURCE)
|
|
79
|
-
* @param m boolean
|
|
80
|
-
*/
|
|
81
|
-
setEditorMode(m: boolean): void;
|
|
82
|
-
/**
|
|
83
|
-
* Upload image when file is selected.
|
|
84
|
-
*/
|
|
85
|
-
onFileChanged(event: any): void;
|
|
86
|
-
watchUploadImage(response: HttpResponse<{
|
|
87
|
-
imageUrl: string;
|
|
88
|
-
}>, event: any): void;
|
|
89
|
-
/**
|
|
90
|
-
* Set custom class
|
|
91
|
-
*/
|
|
92
|
-
setCustomClass(classId: string): void;
|
|
93
|
-
isButtonHidden(name: string): boolean;
|
|
94
|
-
focus(): void;
|
|
95
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<AngularEditorToolbarComponent, never>;
|
|
96
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<AngularEditorToolbarComponent, "angular-editor-toolbar", never, { "id": "id"; "uploadUrl": "uploadUrl"; "upload": "upload"; "showToolbar": "showToolbar"; "fonts": "fonts"; "customClasses": "customClasses"; "defaultFontName": "defaultFontName"; "defaultFontSize": "defaultFontSize"; "hiddenButtons": "hiddenButtons"; }, { "execute": "execute"; }, never, ["*"]>;
|
|
97
|
-
}
|
|
1
|
+
import { ElementRef, EventEmitter, Renderer2 } from '@angular/core';
|
|
2
|
+
import { AngularEditorService, UploadResponse } from './angular-editor.service';
|
|
3
|
+
import { HttpResponse, HttpEvent } from '@angular/common/http';
|
|
4
|
+
import { CustomClass } from './config';
|
|
5
|
+
import { SelectOption } from './ae-select/ae-select.component';
|
|
6
|
+
import { Observable } from 'rxjs';
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
export declare class AngularEditorToolbarComponent {
|
|
9
|
+
private r;
|
|
10
|
+
private editorService;
|
|
11
|
+
private er;
|
|
12
|
+
private doc;
|
|
13
|
+
htmlMode: boolean;
|
|
14
|
+
linkSelected: boolean;
|
|
15
|
+
block: string;
|
|
16
|
+
fontName: string;
|
|
17
|
+
fontSize: string;
|
|
18
|
+
foreColour: any;
|
|
19
|
+
backColor: any;
|
|
20
|
+
headings: SelectOption[];
|
|
21
|
+
fontSizes: SelectOption[];
|
|
22
|
+
customClassId: string;
|
|
23
|
+
_customClasses: CustomClass[];
|
|
24
|
+
customClassList: SelectOption[];
|
|
25
|
+
tagMap: {
|
|
26
|
+
BLOCKQUOTE: string;
|
|
27
|
+
A: string;
|
|
28
|
+
};
|
|
29
|
+
select: string[];
|
|
30
|
+
buttons: string[];
|
|
31
|
+
id: string;
|
|
32
|
+
uploadUrl: string;
|
|
33
|
+
upload: (file: File) => Observable<HttpEvent<UploadResponse>>;
|
|
34
|
+
showToolbar: boolean;
|
|
35
|
+
fonts: SelectOption[];
|
|
36
|
+
set customClasses(classes: CustomClass[]);
|
|
37
|
+
set defaultFontName(value: string);
|
|
38
|
+
set defaultFontSize(value: string);
|
|
39
|
+
hiddenButtons: string[][];
|
|
40
|
+
execute: EventEmitter<string>;
|
|
41
|
+
myInputFile: ElementRef;
|
|
42
|
+
get isLinkButtonDisabled(): boolean;
|
|
43
|
+
constructor(r: Renderer2, editorService: AngularEditorService, er: ElementRef, doc: any);
|
|
44
|
+
/**
|
|
45
|
+
* Trigger command from editor header buttons
|
|
46
|
+
* @param command string from toolbar buttons
|
|
47
|
+
*/
|
|
48
|
+
triggerCommand(command: string): void;
|
|
49
|
+
/**
|
|
50
|
+
* highlight editor buttons when cursor moved or positioning
|
|
51
|
+
*/
|
|
52
|
+
triggerButtons(): void;
|
|
53
|
+
/**
|
|
54
|
+
* trigger highlight editor buttons when cursor moved or positioning in block
|
|
55
|
+
*/
|
|
56
|
+
triggerBlocks(nodes: Node[]): void;
|
|
57
|
+
/**
|
|
58
|
+
* insert URL link
|
|
59
|
+
*/
|
|
60
|
+
insertUrl(): void;
|
|
61
|
+
/**
|
|
62
|
+
* insert Video link
|
|
63
|
+
*/
|
|
64
|
+
insertVideo(): void;
|
|
65
|
+
/** insert color */
|
|
66
|
+
insertColor(color: string, where: string): void;
|
|
67
|
+
/**
|
|
68
|
+
* set font Name/family
|
|
69
|
+
* @param foreColor string
|
|
70
|
+
*/
|
|
71
|
+
setFontName(foreColor: string): void;
|
|
72
|
+
/**
|
|
73
|
+
* set font Size
|
|
74
|
+
* @param fontSize string
|
|
75
|
+
*/
|
|
76
|
+
setFontSize(fontSize: string): void;
|
|
77
|
+
/**
|
|
78
|
+
* toggle editor mode (WYSIWYG or SOURCE)
|
|
79
|
+
* @param m boolean
|
|
80
|
+
*/
|
|
81
|
+
setEditorMode(m: boolean): void;
|
|
82
|
+
/**
|
|
83
|
+
* Upload image when file is selected.
|
|
84
|
+
*/
|
|
85
|
+
onFileChanged(event: any): void;
|
|
86
|
+
watchUploadImage(response: HttpResponse<{
|
|
87
|
+
imageUrl: string;
|
|
88
|
+
}>, event: any): void;
|
|
89
|
+
/**
|
|
90
|
+
* Set custom class
|
|
91
|
+
*/
|
|
92
|
+
setCustomClass(classId: string): void;
|
|
93
|
+
isButtonHidden(name: string): boolean;
|
|
94
|
+
focus(): void;
|
|
95
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AngularEditorToolbarComponent, never>;
|
|
96
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AngularEditorToolbarComponent, "angular-editor-toolbar", never, { "id": "id"; "uploadUrl": "uploadUrl"; "upload": "upload"; "showToolbar": "showToolbar"; "fonts": "fonts"; "customClasses": "customClasses"; "defaultFontName": "defaultFontName"; "defaultFontSize": "defaultFontSize"; "hiddenButtons": "hiddenButtons"; }, { "execute": "execute"; }, never, ["*"]>;
|
|
97
|
+
}
|
|
@@ -1,133 +1,133 @@
|
|
|
1
|
-
import { AfterViewInit, ChangeDetectorRef, ElementRef, EventEmitter, OnDestroy, OnInit, Renderer2, TemplateRef } from '@angular/core';
|
|
2
|
-
import { ControlValueAccessor } from '@angular/forms';
|
|
3
|
-
import { DomSanitizer } from '@angular/platform-browser';
|
|
4
|
-
import { AngularEditorToolbarComponent } from './angular-editor-toolbar.component';
|
|
5
|
-
import { AngularEditorService } from './angular-editor.service';
|
|
6
|
-
import { AngularEditorConfig } from './config';
|
|
7
|
-
import * as i0 from "@angular/core";
|
|
8
|
-
export declare class AngularEditorComponent implements OnInit, ControlValueAccessor, AfterViewInit, OnDestroy {
|
|
9
|
-
private r;
|
|
10
|
-
private editorService;
|
|
11
|
-
private doc;
|
|
12
|
-
private sanitizer;
|
|
13
|
-
private cdRef;
|
|
14
|
-
private autoFocus;
|
|
15
|
-
private onChange;
|
|
16
|
-
private onTouched;
|
|
17
|
-
modeVisual: boolean;
|
|
18
|
-
showPlaceholder: boolean;
|
|
19
|
-
disabled: boolean;
|
|
20
|
-
focused: boolean;
|
|
21
|
-
touched: boolean;
|
|
22
|
-
changed: boolean;
|
|
23
|
-
focusInstance: any;
|
|
24
|
-
blurInstance: any;
|
|
25
|
-
id: string;
|
|
26
|
-
config: AngularEditorConfig;
|
|
27
|
-
placeholder: string;
|
|
28
|
-
tabIndex: number | null;
|
|
29
|
-
html: any;
|
|
30
|
-
textArea: ElementRef;
|
|
31
|
-
editorWrapper: ElementRef;
|
|
32
|
-
editorToolbar: AngularEditorToolbarComponent;
|
|
33
|
-
customButtonsTemplateRef?: TemplateRef<any>;
|
|
34
|
-
executeCommandFn: any;
|
|
35
|
-
viewMode: EventEmitter<boolean>;
|
|
36
|
-
/** emits `blur` event when focused out from the textarea */
|
|
37
|
-
blurEvent: EventEmitter<FocusEvent>;
|
|
38
|
-
/** emits `focus` event when focused in to the textarea */
|
|
39
|
-
focusEvent: EventEmitter<FocusEvent>;
|
|
40
|
-
tabindex: number;
|
|
41
|
-
onFocus(): void;
|
|
42
|
-
constructor(r: Renderer2, editorService: AngularEditorService, doc: any, sanitizer: DomSanitizer, cdRef: ChangeDetectorRef, defaultTabIndex: string, autoFocus: any);
|
|
43
|
-
ngOnInit(): void;
|
|
44
|
-
ngAfterViewInit(): void;
|
|
45
|
-
onPaste(event: ClipboardEvent): string;
|
|
46
|
-
/**
|
|
47
|
-
* Executed command from editor header buttons
|
|
48
|
-
* @param command string from triggerCommand
|
|
49
|
-
* @param value
|
|
50
|
-
*/
|
|
51
|
-
executeCommand(command: string, value?: string): void;
|
|
52
|
-
/**
|
|
53
|
-
* focus event
|
|
54
|
-
*/
|
|
55
|
-
onTextAreaFocus(event: FocusEvent): void;
|
|
56
|
-
/**
|
|
57
|
-
* @description fires when cursor leaves textarea
|
|
58
|
-
*/
|
|
59
|
-
onTextAreaMouseOut(event: MouseEvent): void;
|
|
60
|
-
/**
|
|
61
|
-
* blur event
|
|
62
|
-
*/
|
|
63
|
-
onTextAreaBlur(event: FocusEvent): void;
|
|
64
|
-
/**
|
|
65
|
-
* focus the text area when the editor is focused
|
|
66
|
-
*/
|
|
67
|
-
focus(): void;
|
|
68
|
-
/**
|
|
69
|
-
* Executed from the contenteditable section while the input property changes
|
|
70
|
-
* @param element html element from contenteditable
|
|
71
|
-
*/
|
|
72
|
-
onContentChange(element: HTMLElement): void;
|
|
73
|
-
/**
|
|
74
|
-
* Set the function to be called
|
|
75
|
-
* when the control receives a change event.
|
|
76
|
-
*
|
|
77
|
-
* @param fn a function
|
|
78
|
-
*/
|
|
79
|
-
registerOnChange(fn: any): void;
|
|
80
|
-
/**
|
|
81
|
-
* Set the function to be called
|
|
82
|
-
* when the control receives a touch event.
|
|
83
|
-
*
|
|
84
|
-
* @param fn a function
|
|
85
|
-
*/
|
|
86
|
-
registerOnTouched(fn: any): void;
|
|
87
|
-
/**
|
|
88
|
-
* Write a new value to the element.
|
|
89
|
-
*
|
|
90
|
-
* @param value value to be executed when there is a change in contenteditable
|
|
91
|
-
*/
|
|
92
|
-
writeValue(value: any): void;
|
|
93
|
-
/**
|
|
94
|
-
* refresh view/HTML of the editor
|
|
95
|
-
*
|
|
96
|
-
* @param value html string from the editor
|
|
97
|
-
*/
|
|
98
|
-
refreshView(value: string): void;
|
|
99
|
-
/**
|
|
100
|
-
* toggles placeholder based on input string
|
|
101
|
-
*
|
|
102
|
-
* @param value A HTML string from the editor
|
|
103
|
-
*/
|
|
104
|
-
togglePlaceholder(value: boolean): void;
|
|
105
|
-
/**
|
|
106
|
-
* Implements disabled state for this element
|
|
107
|
-
*
|
|
108
|
-
* @param isDisabled Disabled flag
|
|
109
|
-
*/
|
|
110
|
-
setDisabledState(isDisabled: boolean): void;
|
|
111
|
-
/**
|
|
112
|
-
* toggles editor mode based on bToSource bool
|
|
113
|
-
*
|
|
114
|
-
* @param bToSource A boolean value from the editor
|
|
115
|
-
*/
|
|
116
|
-
toggleEditorMode(bToSource: boolean): void;
|
|
117
|
-
/**
|
|
118
|
-
* toggles editor buttons when cursor moved or positioning
|
|
119
|
-
*
|
|
120
|
-
* Send a node array from the contentEditable of the editor
|
|
121
|
-
*/
|
|
122
|
-
exec(): void;
|
|
123
|
-
private configure;
|
|
124
|
-
getFonts(): {
|
|
125
|
-
label: string;
|
|
126
|
-
value: string;
|
|
127
|
-
}[];
|
|
128
|
-
getCustomTags(): string;
|
|
129
|
-
ngOnDestroy(): void;
|
|
130
|
-
filterStyles(html: string): string;
|
|
131
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<AngularEditorComponent, [null, null, null, null, null, { attribute: "tabindex"; }, { attribute: "autofocus"; }]>;
|
|
132
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<AngularEditorComponent, "angular-editor", never, { "id": "id"; "config": "config"; "placeholder": "placeholder"; "tabIndex": "tabIndex"; }, { "html": "html"; "viewMode": "viewMode"; "blurEvent": "blur"; "focusEvent": "focus"; }, ["customButtonsTemplateRef"], never>;
|
|
133
|
-
}
|
|
1
|
+
import { AfterViewInit, ChangeDetectorRef, ElementRef, EventEmitter, OnDestroy, OnInit, Renderer2, TemplateRef } from '@angular/core';
|
|
2
|
+
import { ControlValueAccessor } from '@angular/forms';
|
|
3
|
+
import { DomSanitizer } from '@angular/platform-browser';
|
|
4
|
+
import { AngularEditorToolbarComponent } from './angular-editor-toolbar.component';
|
|
5
|
+
import { AngularEditorService } from './angular-editor.service';
|
|
6
|
+
import { AngularEditorConfig } from './config';
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
export declare class AngularEditorComponent implements OnInit, ControlValueAccessor, AfterViewInit, OnDestroy {
|
|
9
|
+
private r;
|
|
10
|
+
private editorService;
|
|
11
|
+
private doc;
|
|
12
|
+
private sanitizer;
|
|
13
|
+
private cdRef;
|
|
14
|
+
private autoFocus;
|
|
15
|
+
private onChange;
|
|
16
|
+
private onTouched;
|
|
17
|
+
modeVisual: boolean;
|
|
18
|
+
showPlaceholder: boolean;
|
|
19
|
+
disabled: boolean;
|
|
20
|
+
focused: boolean;
|
|
21
|
+
touched: boolean;
|
|
22
|
+
changed: boolean;
|
|
23
|
+
focusInstance: any;
|
|
24
|
+
blurInstance: any;
|
|
25
|
+
id: string;
|
|
26
|
+
config: AngularEditorConfig;
|
|
27
|
+
placeholder: string;
|
|
28
|
+
tabIndex: number | null;
|
|
29
|
+
html: any;
|
|
30
|
+
textArea: ElementRef;
|
|
31
|
+
editorWrapper: ElementRef;
|
|
32
|
+
editorToolbar: AngularEditorToolbarComponent;
|
|
33
|
+
customButtonsTemplateRef?: TemplateRef<any>;
|
|
34
|
+
executeCommandFn: any;
|
|
35
|
+
viewMode: EventEmitter<boolean>;
|
|
36
|
+
/** emits `blur` event when focused out from the textarea */
|
|
37
|
+
blurEvent: EventEmitter<FocusEvent>;
|
|
38
|
+
/** emits `focus` event when focused in to the textarea */
|
|
39
|
+
focusEvent: EventEmitter<FocusEvent>;
|
|
40
|
+
tabindex: number;
|
|
41
|
+
onFocus(): void;
|
|
42
|
+
constructor(r: Renderer2, editorService: AngularEditorService, doc: any, sanitizer: DomSanitizer, cdRef: ChangeDetectorRef, defaultTabIndex: string, autoFocus: any);
|
|
43
|
+
ngOnInit(): void;
|
|
44
|
+
ngAfterViewInit(): void;
|
|
45
|
+
onPaste(event: ClipboardEvent): string;
|
|
46
|
+
/**
|
|
47
|
+
* Executed command from editor header buttons
|
|
48
|
+
* @param command string from triggerCommand
|
|
49
|
+
* @param value
|
|
50
|
+
*/
|
|
51
|
+
executeCommand(command: string, value?: string): void;
|
|
52
|
+
/**
|
|
53
|
+
* focus event
|
|
54
|
+
*/
|
|
55
|
+
onTextAreaFocus(event: FocusEvent): void;
|
|
56
|
+
/**
|
|
57
|
+
* @description fires when cursor leaves textarea
|
|
58
|
+
*/
|
|
59
|
+
onTextAreaMouseOut(event: MouseEvent): void;
|
|
60
|
+
/**
|
|
61
|
+
* blur event
|
|
62
|
+
*/
|
|
63
|
+
onTextAreaBlur(event: FocusEvent): void;
|
|
64
|
+
/**
|
|
65
|
+
* focus the text area when the editor is focused
|
|
66
|
+
*/
|
|
67
|
+
focus(): void;
|
|
68
|
+
/**
|
|
69
|
+
* Executed from the contenteditable section while the input property changes
|
|
70
|
+
* @param element html element from contenteditable
|
|
71
|
+
*/
|
|
72
|
+
onContentChange(element: HTMLElement): void;
|
|
73
|
+
/**
|
|
74
|
+
* Set the function to be called
|
|
75
|
+
* when the control receives a change event.
|
|
76
|
+
*
|
|
77
|
+
* @param fn a function
|
|
78
|
+
*/
|
|
79
|
+
registerOnChange(fn: any): void;
|
|
80
|
+
/**
|
|
81
|
+
* Set the function to be called
|
|
82
|
+
* when the control receives a touch event.
|
|
83
|
+
*
|
|
84
|
+
* @param fn a function
|
|
85
|
+
*/
|
|
86
|
+
registerOnTouched(fn: any): void;
|
|
87
|
+
/**
|
|
88
|
+
* Write a new value to the element.
|
|
89
|
+
*
|
|
90
|
+
* @param value value to be executed when there is a change in contenteditable
|
|
91
|
+
*/
|
|
92
|
+
writeValue(value: any): void;
|
|
93
|
+
/**
|
|
94
|
+
* refresh view/HTML of the editor
|
|
95
|
+
*
|
|
96
|
+
* @param value html string from the editor
|
|
97
|
+
*/
|
|
98
|
+
refreshView(value: string): void;
|
|
99
|
+
/**
|
|
100
|
+
* toggles placeholder based on input string
|
|
101
|
+
*
|
|
102
|
+
* @param value A HTML string from the editor
|
|
103
|
+
*/
|
|
104
|
+
togglePlaceholder(value: boolean): void;
|
|
105
|
+
/**
|
|
106
|
+
* Implements disabled state for this element
|
|
107
|
+
*
|
|
108
|
+
* @param isDisabled Disabled flag
|
|
109
|
+
*/
|
|
110
|
+
setDisabledState(isDisabled: boolean): void;
|
|
111
|
+
/**
|
|
112
|
+
* toggles editor mode based on bToSource bool
|
|
113
|
+
*
|
|
114
|
+
* @param bToSource A boolean value from the editor
|
|
115
|
+
*/
|
|
116
|
+
toggleEditorMode(bToSource: boolean): void;
|
|
117
|
+
/**
|
|
118
|
+
* toggles editor buttons when cursor moved or positioning
|
|
119
|
+
*
|
|
120
|
+
* Send a node array from the contentEditable of the editor
|
|
121
|
+
*/
|
|
122
|
+
exec(): void;
|
|
123
|
+
private configure;
|
|
124
|
+
getFonts(): {
|
|
125
|
+
label: string;
|
|
126
|
+
value: string;
|
|
127
|
+
}[];
|
|
128
|
+
getCustomTags(): string;
|
|
129
|
+
ngOnDestroy(): void;
|
|
130
|
+
filterStyles(html: string): string;
|
|
131
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AngularEditorComponent, [null, null, null, null, null, { attribute: "tabindex"; }, { attribute: "autofocus"; }]>;
|
|
132
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AngularEditorComponent, "angular-editor", never, { "id": "id"; "config": "config"; "placeholder": "placeholder"; "tabIndex": "tabIndex"; }, { "html": "html"; "viewMode": "viewMode"; "blurEvent": "blur"; "focusEvent": "focus"; }, ["customButtonsTemplateRef"], never>;
|
|
133
|
+
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
import * as i1 from "./angular-editor.component";
|
|
3
|
-
import * as i2 from "./angular-editor-toolbar.component";
|
|
4
|
-
import * as i3 from "./ae-select/ae-select.component";
|
|
5
|
-
import * as i4 from "./ae-button/ae-button.component";
|
|
6
|
-
import * as i5 from "./ae-toolbar-set/ae-toolbar-set.component";
|
|
7
|
-
import * as i6 from "@angular/common";
|
|
8
|
-
import * as i7 from "@angular/forms";
|
|
9
|
-
export declare class AngularEditorModule {
|
|
10
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<AngularEditorModule, never>;
|
|
11
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<AngularEditorModule, [typeof i1.AngularEditorComponent, typeof i2.AngularEditorToolbarComponent, typeof i3.AeSelectComponent, typeof i4.AeButtonComponent, typeof i5.AeToolbarSetComponent], [typeof i6.CommonModule, typeof i7.FormsModule, typeof i7.ReactiveFormsModule], [typeof i1.AngularEditorComponent, typeof i2.AngularEditorToolbarComponent, typeof i4.AeButtonComponent, typeof i5.AeToolbarSetComponent]>;
|
|
12
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<AngularEditorModule>;
|
|
13
|
-
}
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./angular-editor.component";
|
|
3
|
+
import * as i2 from "./angular-editor-toolbar.component";
|
|
4
|
+
import * as i3 from "./ae-select/ae-select.component";
|
|
5
|
+
import * as i4 from "./ae-button/ae-button.component";
|
|
6
|
+
import * as i5 from "./ae-toolbar-set/ae-toolbar-set.component";
|
|
7
|
+
import * as i6 from "@angular/common";
|
|
8
|
+
import * as i7 from "@angular/forms";
|
|
9
|
+
export declare class AngularEditorModule {
|
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AngularEditorModule, never>;
|
|
11
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<AngularEditorModule, [typeof i1.AngularEditorComponent, typeof i2.AngularEditorToolbarComponent, typeof i3.AeSelectComponent, typeof i4.AeButtonComponent, typeof i5.AeToolbarSetComponent], [typeof i6.CommonModule, typeof i7.FormsModule, typeof i7.ReactiveFormsModule], [typeof i1.AngularEditorComponent, typeof i2.AngularEditorToolbarComponent, typeof i4.AeButtonComponent, typeof i5.AeToolbarSetComponent]>;
|
|
12
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<AngularEditorModule>;
|
|
13
|
+
}
|