@skyux/text-editor 5.0.1 → 5.5.0-alpha.0
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 +7 -1
- package/bundles/skyux-text-editor.umd.js +370 -223
- package/documentation.json +316 -302
- package/esm2015/index.js +15 -0
- package/esm2015/index.js.map +1 -0
- package/esm2015/lib/modules/rich-text-display/rich-text-display.component.js +39 -0
- package/esm2015/lib/modules/rich-text-display/rich-text-display.component.js.map +1 -0
- package/esm2015/lib/modules/rich-text-display/rich-text-display.module.js +18 -0
- package/esm2015/lib/modules/rich-text-display/rich-text-display.module.js.map +1 -0
- package/esm2015/lib/modules/shared/forms-utility.js +10 -0
- package/esm2015/lib/modules/shared/forms-utility.js.map +1 -0
- package/esm2015/lib/modules/shared/sky-text-editor-resources.module.js +106 -0
- package/esm2015/lib/modules/shared/sky-text-editor-resources.module.js.map +1 -0
- package/esm2015/lib/modules/text-editor/defaults/font-list-defaults.js +42 -0
- package/esm2015/lib/modules/text-editor/defaults/font-list-defaults.js.map +1 -0
- package/esm2015/lib/modules/text-editor/defaults/font-size-list-defaults.js +7 -0
- package/esm2015/lib/modules/text-editor/defaults/font-size-list-defaults.js.map +1 -0
- package/esm2015/lib/modules/text-editor/defaults/menu-defaults.js +5 -0
- package/esm2015/lib/modules/text-editor/defaults/menu-defaults.js.map +1 -0
- package/esm2015/lib/modules/text-editor/defaults/style-state-defaults.js +15 -0
- package/esm2015/lib/modules/text-editor/defaults/style-state-defaults.js.map +1 -0
- package/esm2015/lib/modules/text-editor/defaults/toolbar-action-defaults.js +12 -0
- package/esm2015/lib/modules/text-editor/defaults/toolbar-action-defaults.js.map +1 -0
- package/esm2015/lib/modules/text-editor/menubar/text-editor-menubar.component.js +196 -0
- package/esm2015/lib/modules/text-editor/menubar/text-editor-menubar.component.js.map +1 -0
- package/esm2015/lib/modules/text-editor/services/text-editor-adapter.service.js +473 -0
- package/esm2015/lib/modules/text-editor/services/text-editor-adapter.service.js.map +1 -0
- package/esm2015/lib/modules/text-editor/services/text-editor-selection.service.js +80 -0
- package/esm2015/lib/modules/text-editor/services/text-editor-selection.service.js.map +1 -0
- package/esm2015/lib/modules/text-editor/services/text-editor.service.js +61 -0
- package/esm2015/lib/modules/text-editor/services/text-editor.service.js.map +1 -0
- package/esm2015/lib/modules/text-editor/services/text-sanitization.service.js +38 -0
- package/esm2015/lib/modules/text-editor/services/text-sanitization.service.js.map +1 -0
- package/esm2015/lib/modules/text-editor/text-editor.component.js +322 -0
- package/esm2015/lib/modules/text-editor/text-editor.component.js.map +1 -0
- package/esm2015/lib/modules/text-editor/text-editor.module.js +99 -0
- package/esm2015/lib/modules/text-editor/text-editor.module.js.map +1 -0
- package/esm2015/lib/modules/text-editor/toolbar/text-editor-toolbar.component.js +175 -0
- package/esm2015/lib/modules/text-editor/toolbar/text-editor-toolbar.component.js.map +1 -0
- package/esm2015/lib/modules/text-editor/types/editor-command.js +2 -0
- package/esm2015/lib/modules/text-editor/types/editor-command.js.map +1 -0
- package/esm2015/lib/modules/text-editor/types/editor-setting.js +2 -0
- package/esm2015/lib/modules/text-editor/types/editor-setting.js.map +1 -0
- package/esm2015/lib/modules/text-editor/types/font-state.js +2 -0
- package/esm2015/lib/modules/text-editor/types/font-state.js.map +1 -0
- package/esm2015/lib/modules/text-editor/types/menu-type.js +2 -0
- package/esm2015/lib/modules/text-editor/types/menu-type.js.map +1 -0
- package/esm2015/lib/modules/text-editor/types/style-state.js +2 -0
- package/esm2015/lib/modules/text-editor/types/style-state.js.map +1 -0
- package/esm2015/lib/modules/text-editor/types/text-editor-merge-field.js +2 -0
- package/esm2015/lib/modules/text-editor/types/text-editor-merge-field.js.map +1 -0
- package/esm2015/lib/modules/text-editor/types/toolbar-action-type.js +2 -0
- package/esm2015/lib/modules/text-editor/types/toolbar-action-type.js.map +1 -0
- package/esm2015/lib/modules/text-editor/url-modal/text-editor-url-modal-context.js +6 -0
- package/esm2015/lib/modules/text-editor/url-modal/text-editor-url-modal-context.js.map +1 -0
- package/esm2015/lib/modules/text-editor/url-modal/text-editor-url-modal-result.js +2 -0
- package/esm2015/lib/modules/text-editor/url-modal/text-editor-url-modal-result.js.map +1 -0
- package/esm2015/lib/modules/text-editor/url-modal/text-editor-url-modal.component.js +121 -0
- package/esm2015/lib/modules/text-editor/url-modal/text-editor-url-modal.component.js.map +1 -0
- package/esm2015/lib/modules/text-editor/url-modal/text-editor-url-target.js +9 -0
- package/esm2015/lib/modules/text-editor/url-modal/text-editor-url-target.js.map +1 -0
- package/esm2015/skyux-text-editor.js +2 -2
- package/esm2015/skyux-text-editor.js.map +1 -0
- package/fesm2015/skyux-text-editor.js +411 -265
- package/fesm2015/skyux-text-editor.js.map +1 -1
- package/index.d.ts +12 -0
- package/{modules → lib/modules}/rich-text-display/rich-text-display.component.d.ts +0 -0
- package/{modules → lib/modules}/rich-text-display/rich-text-display.module.d.ts +0 -0
- package/{modules → lib/modules}/shared/forms-utility.d.ts +0 -0
- package/{modules → lib/modules}/shared/sky-text-editor-resources.module.d.ts +0 -0
- package/{modules → lib/modules}/text-editor/defaults/font-list-defaults.d.ts +0 -0
- package/{modules → lib/modules}/text-editor/defaults/font-size-list-defaults.d.ts +0 -0
- package/{modules → lib/modules}/text-editor/defaults/menu-defaults.d.ts +0 -0
- package/{modules → lib/modules}/text-editor/defaults/style-state-defaults.d.ts +0 -0
- package/{modules → lib/modules}/text-editor/defaults/toolbar-action-defaults.d.ts +0 -0
- package/{modules → lib/modules}/text-editor/menubar/text-editor-menubar.component.d.ts +0 -0
- package/{modules → lib/modules}/text-editor/services/text-editor-adapter.service.d.ts +0 -0
- package/{modules → lib/modules}/text-editor/services/text-editor-selection.service.d.ts +0 -0
- package/{modules → lib/modules}/text-editor/services/text-editor.service.d.ts +8 -0
- package/{modules → lib/modules}/text-editor/services/text-sanitization.service.d.ts +0 -0
- package/{modules → lib/modules}/text-editor/text-editor.component.d.ts +24 -10
- package/{modules → lib/modules}/text-editor/text-editor.module.d.ts +0 -0
- package/{modules → lib/modules}/text-editor/toolbar/text-editor-toolbar.component.d.ts +0 -0
- package/{modules → lib/modules}/text-editor/types/editor-command.d.ts +0 -0
- package/{modules → lib/modules}/text-editor/types/editor-setting.d.ts +6 -2
- package/{modules → lib/modules}/text-editor/types/font-state.d.ts +0 -0
- package/{modules → lib/modules}/text-editor/types/menu-type.d.ts +0 -0
- package/{modules → lib/modules}/text-editor/types/style-state.d.ts +0 -0
- package/{modules → lib/modules}/text-editor/types/text-editor-merge-field.d.ts +0 -0
- package/{modules → lib/modules}/text-editor/types/toolbar-action-type.d.ts +0 -0
- package/{modules → lib/modules}/text-editor/url-modal/text-editor-url-modal-context.d.ts +0 -0
- package/{modules → lib/modules}/text-editor/url-modal/text-editor-url-modal-result.d.ts +0 -0
- package/{modules → lib/modules}/text-editor/url-modal/text-editor-url-modal.component.d.ts +0 -0
- package/{modules → lib/modules}/text-editor/url-modal/text-editor-url-target.d.ts +0 -0
- package/package.json +13 -13
- package/skyux-text-editor.d.ts +1 -1
- package/LICENSE +0 -21
- package/bundles/skyux-text-editor.umd.js.map +0 -1
- package/esm2015/modules/rich-text-display/rich-text-display.component.js +0 -37
- package/esm2015/modules/rich-text-display/rich-text-display.module.js +0 -26
- package/esm2015/modules/shared/forms-utility.js +0 -10
- package/esm2015/modules/shared/sky-text-editor-resources.module.js +0 -41
- package/esm2015/modules/text-editor/defaults/font-list-defaults.js +0 -42
- package/esm2015/modules/text-editor/defaults/font-size-list-defaults.js +0 -5
- package/esm2015/modules/text-editor/defaults/menu-defaults.js +0 -8
- package/esm2015/modules/text-editor/defaults/style-state-defaults.js +0 -15
- package/esm2015/modules/text-editor/defaults/toolbar-action-defaults.js +0 -12
- package/esm2015/modules/text-editor/menubar/text-editor-menubar.component.js +0 -189
- package/esm2015/modules/text-editor/services/text-editor-adapter.service.js +0 -451
- package/esm2015/modules/text-editor/services/text-editor-selection.service.js +0 -76
- package/esm2015/modules/text-editor/services/text-editor.service.js +0 -49
- package/esm2015/modules/text-editor/services/text-sanitization.service.js +0 -38
- package/esm2015/modules/text-editor/text-editor.component.js +0 -282
- package/esm2015/modules/text-editor/text-editor.module.js +0 -101
- package/esm2015/modules/text-editor/toolbar/text-editor-toolbar.component.js +0 -163
- package/esm2015/modules/text-editor/types/editor-command.js +0 -2
- package/esm2015/modules/text-editor/types/editor-setting.js +0 -2
- package/esm2015/modules/text-editor/types/font-state.js +0 -2
- package/esm2015/modules/text-editor/types/menu-type.js +0 -2
- package/esm2015/modules/text-editor/types/style-state.js +0 -2
- package/esm2015/modules/text-editor/types/text-editor-merge-field.js +0 -2
- package/esm2015/modules/text-editor/types/toolbar-action-type.js +0 -2
- package/esm2015/modules/text-editor/url-modal/text-editor-url-modal-context.js +0 -6
- package/esm2015/modules/text-editor/url-modal/text-editor-url-modal-result.js +0 -2
- package/esm2015/modules/text-editor/url-modal/text-editor-url-modal.component.js +0 -112
- package/esm2015/modules/text-editor/url-modal/text-editor-url-target.js +0 -9
- package/esm2015/public-api.js +0 -15
- package/public-api.d.ts +0 -12
package/index.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export * from './lib/modules/rich-text-display/rich-text-display.module';
|
|
2
|
+
export * from './lib/modules/text-editor/types/font-state';
|
|
3
|
+
export * from './lib/modules/text-editor/types/menu-type';
|
|
4
|
+
export * from './lib/modules/text-editor/types/style-state';
|
|
5
|
+
export * from './lib/modules/text-editor/types/text-editor-merge-field';
|
|
6
|
+
export * from './lib/modules/text-editor/types/toolbar-action-type';
|
|
7
|
+
export * from './lib/modules/text-editor/text-editor.module';
|
|
8
|
+
export { SkyRichTextDisplayComponent as λ1 } from './lib/modules/rich-text-display/rich-text-display.component';
|
|
9
|
+
export { SkyTextEditorMenubarComponent as λ2 } from './lib/modules/text-editor/menubar/text-editor-menubar.component';
|
|
10
|
+
export { SkyTextEditorUrlModalComponent as λ3 } from './lib/modules/text-editor/url-modal/text-editor-url-modal.component';
|
|
11
|
+
export { SkyTextEditorToolbarComponent as λ4 } from './lib/modules/text-editor/toolbar/text-editor-toolbar.component';
|
|
12
|
+
export { SkyTextEditorComponent as λ5 } from './lib/modules/text-editor/text-editor.component';
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -11,6 +11,10 @@ export declare class SkyTextEditorService {
|
|
|
11
11
|
editors: {
|
|
12
12
|
[key: string]: EditorSetting;
|
|
13
13
|
};
|
|
14
|
+
/**
|
|
15
|
+
* Returns the blur observable from the editor with the corresponding id.
|
|
16
|
+
*/
|
|
17
|
+
blurListener(id: string): Observable<unknown>;
|
|
14
18
|
/**
|
|
15
19
|
* Returns the click observable from the editor with the corresponding id.
|
|
16
20
|
*/
|
|
@@ -19,6 +23,10 @@ export declare class SkyTextEditorService {
|
|
|
19
23
|
* Returns the command change observable from the editor with the corresponding id.
|
|
20
24
|
*/
|
|
21
25
|
commandChangeListener(id: string): Observable<unknown>;
|
|
26
|
+
/**
|
|
27
|
+
* Returns the input change observable from the editor with the corresponding id.
|
|
28
|
+
*/
|
|
29
|
+
inputListener(id: string): Observable<unknown>;
|
|
22
30
|
/**
|
|
23
31
|
* Removes editor from the `editors` index by id.
|
|
24
32
|
*/
|
|
File without changes
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AfterViewInit, ChangeDetectorRef, OnDestroy } from '@angular/core';
|
|
2
|
-
import {
|
|
1
|
+
import { AfterViewInit, ChangeDetectorRef, NgZone, OnDestroy } from '@angular/core';
|
|
2
|
+
import { NgControl } from '@angular/forms';
|
|
3
3
|
import { Subject } from 'rxjs';
|
|
4
4
|
import { SkyCoreAdapterService } from '@skyux/core';
|
|
5
5
|
import { SkyTextEditorAdapterService } from './services/text-editor-adapter.service';
|
|
@@ -14,12 +14,14 @@ import * as i0 from "@angular/core";
|
|
|
14
14
|
/**
|
|
15
15
|
* The text editor component lets users format and manipulate text.
|
|
16
16
|
*/
|
|
17
|
-
export declare class SkyTextEditorComponent implements AfterViewInit,
|
|
17
|
+
export declare class SkyTextEditorComponent implements AfterViewInit, OnDestroy {
|
|
18
18
|
private changeDetector;
|
|
19
19
|
private coreAdapterService;
|
|
20
20
|
private adapterService;
|
|
21
21
|
private editorService;
|
|
22
22
|
private sanitizationService;
|
|
23
|
+
private ngControl;
|
|
24
|
+
private zone;
|
|
23
25
|
/**
|
|
24
26
|
* Indicates whether to put focus on the editor after it renders.
|
|
25
27
|
*/
|
|
@@ -70,6 +72,9 @@ export declare class SkyTextEditorComponent implements AfterViewInit, ControlVal
|
|
|
70
72
|
* @default [ 'font-family', 'font-size', 'font-style', 'color', 'list', 'link ]
|
|
71
73
|
*/
|
|
72
74
|
toolbarActions: SkyTextEditorToolbarActionType[];
|
|
75
|
+
/**
|
|
76
|
+
* The internal value of the control.
|
|
77
|
+
*/
|
|
73
78
|
set value(value: string);
|
|
74
79
|
get value(): string;
|
|
75
80
|
private focusInitialized;
|
|
@@ -80,21 +85,30 @@ export declare class SkyTextEditorComponent implements AfterViewInit, ControlVal
|
|
|
80
85
|
private _initialStyleState;
|
|
81
86
|
private _placeholder;
|
|
82
87
|
private _value;
|
|
83
|
-
constructor(changeDetector: ChangeDetectorRef, coreAdapterService: SkyCoreAdapterService, adapterService: SkyTextEditorAdapterService, editorService: SkyTextEditorService, sanitizationService: SkyTextSanitizationService);
|
|
88
|
+
constructor(changeDetector: ChangeDetectorRef, coreAdapterService: SkyCoreAdapterService, adapterService: SkyTextEditorAdapterService, editorService: SkyTextEditorService, sanitizationService: SkyTextSanitizationService, ngControl: NgControl, zone: NgZone);
|
|
84
89
|
ngAfterViewInit(): void;
|
|
85
90
|
ngOnDestroy(): void;
|
|
86
91
|
onIframeLoad(): void;
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
92
|
+
/**
|
|
93
|
+
* Implemented as part of ControlValueAccessor.
|
|
94
|
+
*/
|
|
95
|
+
writeValue(value: string): void;
|
|
96
|
+
/**
|
|
97
|
+
* Implemented as part of ControlValueAccessor.
|
|
98
|
+
*/
|
|
99
|
+
registerOnChange(fn: (value: any) => void): void;
|
|
100
|
+
/**
|
|
101
|
+
* Implemented as part of ControlValueAccessor.
|
|
102
|
+
*/
|
|
103
|
+
registerOnTouched(fn: () => void): void;
|
|
90
104
|
/**
|
|
91
105
|
* Implemented as part of ControlValueAccessor.
|
|
92
106
|
*/
|
|
93
107
|
setDisabledState(isDisabled: boolean): void;
|
|
94
|
-
|
|
95
|
-
updateValueAndStyle(): void;
|
|
108
|
+
private updateStyle;
|
|
96
109
|
private initIframe;
|
|
97
|
-
|
|
110
|
+
private ViewToModelUpdate;
|
|
111
|
+
private _onTouched;
|
|
98
112
|
private _onChange;
|
|
99
113
|
static ɵfac: i0.ɵɵFactoryDeclaration<SkyTextEditorComponent, never>;
|
|
100
114
|
static ɵcmp: i0.ɵɵComponentDeclaration<SkyTextEditorComponent, "sky-text-editor", never, { "autofocus": "autofocus"; "disabled": "disabled"; "fontList": "fontList"; "fontSizeList": "fontSizeList"; "id": "id"; "initialStyleState": "initialStyleState"; "menus": "menus"; "mergeFields": "mergeFields"; "placeholder": "placeholder"; "toolbarActions": "toolbarActions"; }, {}, never, never>;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -3,11 +3,15 @@ import { Subject } from 'rxjs';
|
|
|
3
3
|
* @internal
|
|
4
4
|
*/
|
|
5
5
|
export interface EditorSetting {
|
|
6
|
+
blurListener: () => void;
|
|
7
|
+
blurObservable: Subject<unknown>;
|
|
8
|
+
clickListener: () => void;
|
|
6
9
|
clickObservable: Subject<unknown>;
|
|
7
10
|
commandChangeObservable: Subject<unknown>;
|
|
8
11
|
iframeElementRef: HTMLIFrameElement;
|
|
12
|
+
inputListener: () => void;
|
|
13
|
+
inputObservable: Subject<unknown>;
|
|
14
|
+
pasteListener: (e: ClipboardEvent) => void;
|
|
9
15
|
selectionChangeObservable: Subject<unknown>;
|
|
10
|
-
clickListener: () => void;
|
|
11
16
|
selectionListener: () => void;
|
|
12
|
-
pasteListener: (e: ClipboardEvent) => void;
|
|
13
17
|
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skyux/text-editor",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.5.0-alpha.0",
|
|
4
4
|
"peerDependencies": {
|
|
5
|
-
"@angular/common": "^12.2.
|
|
6
|
-
"@angular/core": "^12.2.
|
|
7
|
-
"@angular/forms": "^12.2.
|
|
8
|
-
"@angular/router": "^12.2.
|
|
9
|
-
"@skyux/colorpicker": "
|
|
10
|
-
"@skyux/core": "
|
|
11
|
-
"@skyux/i18n": "
|
|
12
|
-
"@skyux/indicators": "
|
|
13
|
-
"@skyux/modals": "
|
|
14
|
-
"@skyux/tabs": "
|
|
15
|
-
"@skyux/theme": "
|
|
16
|
-
"@skyux/validation": "
|
|
5
|
+
"@angular/common": "^12.2.16",
|
|
6
|
+
"@angular/core": "^12.2.16",
|
|
7
|
+
"@angular/forms": "^12.2.16",
|
|
8
|
+
"@angular/router": "^12.2.16",
|
|
9
|
+
"@skyux/colorpicker": "5.5.0-alpha.0",
|
|
10
|
+
"@skyux/core": "5.5.0-alpha.0",
|
|
11
|
+
"@skyux/i18n": "5.5.0-alpha.0",
|
|
12
|
+
"@skyux/indicators": "5.5.0-alpha.0",
|
|
13
|
+
"@skyux/modals": "5.5.0-alpha.0",
|
|
14
|
+
"@skyux/tabs": "5.5.0-alpha.0",
|
|
15
|
+
"@skyux/theme": "5.5.0-alpha.0",
|
|
16
|
+
"@skyux/validation": "5.5.0-alpha.0"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"dompurify": "2.3.2",
|
package/skyux-text-editor.d.ts
CHANGED
package/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2020 Blackbaud
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|