@skyux/text-editor 12.23.0 → 13.0.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/fesm2022/skyux-text-editor.mjs +39 -39
- package/fesm2022/skyux-text-editor.mjs.map +1 -1
- package/index.d.ts +349 -13
- package/package.json +17 -17
- package/lib/modules/rich-text-display/rich-text-display.component.d.ts +0 -14
- package/lib/modules/rich-text-display/rich-text-display.module.d.ts +0 -7
- package/lib/modules/shared/sky-text-editor-resources.module.d.ts +0 -10
- package/lib/modules/text-editor/defaults/font-list-defaults.d.ts +0 -5
- package/lib/modules/text-editor/defaults/font-size-list-defaults.d.ts +0 -4
- package/lib/modules/text-editor/defaults/link-window-options-defaults.d.ts +0 -2
- package/lib/modules/text-editor/defaults/menu-defaults.d.ts +0 -5
- package/lib/modules/text-editor/defaults/style-state-defaults.d.ts +0 -5
- package/lib/modules/text-editor/defaults/toolbar-action-defaults.d.ts +0 -5
- package/lib/modules/text-editor/menubar/text-editor-menubar.component.d.ts +0 -38
- package/lib/modules/text-editor/services/text-editor-adapter.service.d.ts +0 -49
- package/lib/modules/text-editor/services/text-editor-selection.service.d.ts +0 -13
- package/lib/modules/text-editor/services/text-editor.service.d.ts +0 -41
- package/lib/modules/text-editor/services/text-sanitization.service.d.ts +0 -16
- package/lib/modules/text-editor/text-editor.component.d.ts +0 -149
- package/lib/modules/text-editor/text-editor.module.d.ts +0 -8
- package/lib/modules/text-editor/toolbar/text-editor-toolbar.component.d.ts +0 -39
- package/lib/modules/text-editor/types/editor-command.d.ts +0 -7
- package/lib/modules/text-editor/types/editor-setting.d.ts +0 -19
- package/lib/modules/text-editor/types/font-state.d.ts +0 -10
- package/lib/modules/text-editor/types/link-window-options-type.d.ts +0 -1
- package/lib/modules/text-editor/types/menu-type.d.ts +0 -1
- package/lib/modules/text-editor/types/style-state.d.ts +0 -35
- package/lib/modules/text-editor/types/text-editor-merge-field.d.ts +0 -15
- package/lib/modules/text-editor/types/toolbar-action-type.d.ts +0 -1
- package/lib/modules/text-editor/url-modal/text-editor-url-modal-context.d.ts +0 -9
- package/lib/modules/text-editor/url-modal/text-editor-url-modal-result.d.ts +0 -8
- package/lib/modules/text-editor/url-modal/text-editor-url-modal.component.d.ts +0 -26
- package/lib/modules/text-editor/url-modal/text-editor-url-target.d.ts +0 -7
package/index.d.ts
CHANGED
|
@@ -1,13 +1,349 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { AfterViewInit, OnDestroy, TemplateRef, ElementRef, OnInit } from '@angular/core';
|
|
3
|
+
import { SafeHtml, DomSanitizer } from '@angular/platform-browser';
|
|
4
|
+
import { ControlValueAccessor, NgControl } from '@angular/forms';
|
|
5
|
+
import * as i1 from '@skyux/forms';
|
|
6
|
+
import { SkyRequiredStateDirective } from '@skyux/forms';
|
|
7
|
+
import { Subject } from 'rxjs';
|
|
8
|
+
import { SkyDropdownMessage } from '@skyux/popovers';
|
|
9
|
+
import { SkyColorpickerMessage, SkyColorpickerOutput } from '@skyux/colorpicker';
|
|
10
|
+
import { SkyTabIndex } from '@skyux/tabs';
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* The `SkyTextSanitizationService` user the `DOMPurify` library to sanitize strings for use
|
|
14
|
+
* in the DOM. `DOMPurify` allows more customization than Angular's internal `DomSanitizer` so we
|
|
15
|
+
* can preserve `<style>` tags and allow `target` attributes for new tab links.
|
|
16
|
+
* @internal
|
|
17
|
+
*/
|
|
18
|
+
declare class SkyTextSanitizationService {
|
|
19
|
+
#private;
|
|
20
|
+
/**
|
|
21
|
+
* Returns a sanitized string, allowing target attribute for new tab links.
|
|
22
|
+
*/
|
|
23
|
+
sanitize(htmlString: string): string;
|
|
24
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SkyTextSanitizationService, never>;
|
|
25
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<SkyTextSanitizationService>;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
declare class SkyRichTextDisplayComponent {
|
|
29
|
+
#private;
|
|
30
|
+
/**
|
|
31
|
+
* The rich text to display.
|
|
32
|
+
*/
|
|
33
|
+
set richText(value: string | undefined);
|
|
34
|
+
sanitizedText: SafeHtml;
|
|
35
|
+
constructor(sanitizer: DomSanitizer, sanitizationService: SkyTextSanitizationService);
|
|
36
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SkyRichTextDisplayComponent, never>;
|
|
37
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SkyRichTextDisplayComponent, "sky-rich-text-display", never, { "richText": { "alias": "richText"; "required": false; }; }, {}, never, never, false, never>;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
declare class SkyRichTextDisplayModule {
|
|
41
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SkyRichTextDisplayModule, never>;
|
|
42
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<SkyRichTextDisplayModule, [typeof SkyRichTextDisplayComponent], never, [typeof SkyRichTextDisplayComponent]>;
|
|
43
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<SkyRichTextDisplayModule>;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
interface SkyTextEditorFont {
|
|
47
|
+
/**
|
|
48
|
+
* The display name of the font.
|
|
49
|
+
*/
|
|
50
|
+
name: string;
|
|
51
|
+
/**
|
|
52
|
+
* The CSS `font-family` value for the font.
|
|
53
|
+
*/
|
|
54
|
+
value: string;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
type SkyTextEditorLinkWindowOptionsType = 'new' | 'existing';
|
|
58
|
+
|
|
59
|
+
type SkyTextEditorMenuType = 'edit' | 'format' | 'merge-field';
|
|
60
|
+
|
|
61
|
+
interface SkyTextEditorStyleState {
|
|
62
|
+
/**
|
|
63
|
+
* The background color. Accepts any CSS color value.
|
|
64
|
+
*/
|
|
65
|
+
backColor: string;
|
|
66
|
+
/**
|
|
67
|
+
* The font color. Accepts any CSS color value.
|
|
68
|
+
*/
|
|
69
|
+
fontColor: string;
|
|
70
|
+
/**
|
|
71
|
+
* The font size in pixels.
|
|
72
|
+
*/
|
|
73
|
+
fontSize: number;
|
|
74
|
+
/**
|
|
75
|
+
* The font family. Available values: `"Blackbaud Sans"`,
|
|
76
|
+
* `"Arial"`, `"sans-serif"`, `"Arial Black"`, `"Courier New"`, and `"Times New Roman"`.
|
|
77
|
+
*/
|
|
78
|
+
font: string;
|
|
79
|
+
/**
|
|
80
|
+
* Whether to make text bold.
|
|
81
|
+
*/
|
|
82
|
+
boldState: boolean;
|
|
83
|
+
/**
|
|
84
|
+
* Whether to italicize text.
|
|
85
|
+
*/
|
|
86
|
+
italicState: boolean;
|
|
87
|
+
/**
|
|
88
|
+
* Whether to underline text.
|
|
89
|
+
*/
|
|
90
|
+
underlineState: boolean;
|
|
91
|
+
/**
|
|
92
|
+
* Whether to format text as a link.
|
|
93
|
+
*/
|
|
94
|
+
linkState: boolean;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
interface SkyTextEditorMergeField {
|
|
98
|
+
/**
|
|
99
|
+
* The identifier for the merge field.
|
|
100
|
+
*/
|
|
101
|
+
id: string;
|
|
102
|
+
/**
|
|
103
|
+
* Display text for the merge field. If it is more than 18 characters, the component truncates to 15 characters.
|
|
104
|
+
*/
|
|
105
|
+
name: string;
|
|
106
|
+
/**
|
|
107
|
+
* The `src` attribute for a preview image to represent the merge field
|
|
108
|
+
* in the text editor. By default, the `name` value appears in a blue rectangle.
|
|
109
|
+
*/
|
|
110
|
+
previewImageUrl?: string;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
type SkyTextEditorToolbarActionType = 'font-family' | 'font-size' | 'font-style' | 'color' | 'list' | 'alignment' | 'indentation' | 'undo-redo' | 'link';
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* The text editor component lets users format and manipulate text.
|
|
117
|
+
*/
|
|
118
|
+
declare class SkyTextEditorComponent implements AfterViewInit, OnDestroy, ControlValueAccessor {
|
|
119
|
+
#private;
|
|
120
|
+
/**
|
|
121
|
+
* Whether to put focus on the editor after it renders.
|
|
122
|
+
*/
|
|
123
|
+
autofocus: boolean | undefined;
|
|
124
|
+
/**
|
|
125
|
+
* Whether to disable the text editor on template-driven forms. Don't use this input on reactive forms because they may overwrite the input or leave the control out of sync.
|
|
126
|
+
* To set the disabled state on reactive forms, use the `FormControl` instead.
|
|
127
|
+
* @default false
|
|
128
|
+
*/
|
|
129
|
+
set disabled(value: boolean);
|
|
130
|
+
get disabled(): boolean;
|
|
131
|
+
/**
|
|
132
|
+
* The fonts to include in the font picker.
|
|
133
|
+
* @default [{name: 'Blackbaud Sans', value: '"Blackbaud Sans", Arial, sans-serif'}, {name: 'Arial', value: 'Arial'}, {name: 'Arial Black', value: '"Arial Black"'}, {name: 'Courier New', value: '"Courier New"'}, {name: 'Georgia', value: 'Georgia, serif'}, {name: 'Tahoma', value: 'Tahoma, Geneva, sans-serif'}, {name: 'Times New Roman', value: '"Times New Roman"'}, {name: 'Trebuchet MS', value: '"Trebuchet MS", sans-serif'}, {name: 'Verdana', value: 'Verdana, Geneva, sans-serif'}]
|
|
134
|
+
*/
|
|
135
|
+
set fontList(value: SkyTextEditorFont[] | undefined);
|
|
136
|
+
get fontList(): SkyTextEditorFont[];
|
|
137
|
+
/**
|
|
138
|
+
* The font sizes to include in the font size picker.
|
|
139
|
+
* @default [6, 8, 9, 10, 11, 12, 13, 14, 15, 16, 18, 20, 22, 24, 26, 28, 36, 48]
|
|
140
|
+
*/
|
|
141
|
+
set fontSizeList(value: number[] | undefined);
|
|
142
|
+
get fontSizeList(): number[];
|
|
143
|
+
/**
|
|
144
|
+
* The content of the help popover. When specified along with `labelText`, a [help inline](https://developer.blackbaud.com/skyux/components/help-inline)
|
|
145
|
+
* button is added to the text editor. The help inline button displays a [popover](https://developer.blackbaud.com/skyux/components/popover)
|
|
146
|
+
* when clicked using the specified content and optional title. This property only applies when `labelText` is also specified.
|
|
147
|
+
*/
|
|
148
|
+
helpPopoverContent: string | TemplateRef<unknown> | undefined;
|
|
149
|
+
/**
|
|
150
|
+
* The title of the help popover. This property only applies when `helpPopoverContent` is
|
|
151
|
+
* also specified.
|
|
152
|
+
*/
|
|
153
|
+
helpPopoverTitle: string | undefined;
|
|
154
|
+
/**
|
|
155
|
+
* [Persistent inline help text](https://developer.blackbaud.com/skyux/design/guidelines/user-assistance#inline-help) that provides
|
|
156
|
+
* additional context to the user.
|
|
157
|
+
*/
|
|
158
|
+
hintText: string | undefined;
|
|
159
|
+
/**
|
|
160
|
+
* The unique ID attribute for the text editor.
|
|
161
|
+
* By default, the component generates a random ID.
|
|
162
|
+
*/
|
|
163
|
+
set id(value: string | undefined);
|
|
164
|
+
get id(): string;
|
|
165
|
+
/**
|
|
166
|
+
* The initial styles for all content, including background color, font size, and link state.
|
|
167
|
+
*/
|
|
168
|
+
set initialStyleState(state: SkyTextEditorStyleState | undefined);
|
|
169
|
+
get initialStyleState(): SkyTextEditorStyleState;
|
|
170
|
+
/**
|
|
171
|
+
* The text to display as the text editor's label.
|
|
172
|
+
*/
|
|
173
|
+
set labelText(value: string | undefined);
|
|
174
|
+
get labelText(): string | undefined;
|
|
175
|
+
/**
|
|
176
|
+
* The menus to include in the menu bar.
|
|
177
|
+
* @default [ 'edit', 'format' ]
|
|
178
|
+
*/
|
|
179
|
+
set menus(value: SkyTextEditorMenuType[] | undefined);
|
|
180
|
+
get menus(): SkyTextEditorMenuType[];
|
|
181
|
+
/**
|
|
182
|
+
* The merge fields to include in the merge field menu.
|
|
183
|
+
*/
|
|
184
|
+
set mergeFields(value: SkyTextEditorMergeField[] | undefined);
|
|
185
|
+
get mergeFields(): SkyTextEditorMergeField[];
|
|
186
|
+
/**
|
|
187
|
+
* Placeholder text to display when the text entry area is empty.
|
|
188
|
+
*/
|
|
189
|
+
set placeholder(value: string | undefined);
|
|
190
|
+
get placeholder(): string;
|
|
191
|
+
/**
|
|
192
|
+
* Whether the text editor is stacked on another form component. When specified,
|
|
193
|
+
* the appropriate vertical spacing is automatically added to the text editor.
|
|
194
|
+
*/
|
|
195
|
+
stacked: boolean;
|
|
196
|
+
/**
|
|
197
|
+
* The actions to include in the toolbar in the specified order.
|
|
198
|
+
* @default [ 'font-family', 'font-size', 'font-style', 'color', 'list', 'link ]
|
|
199
|
+
*/
|
|
200
|
+
set toolbarActions(value: SkyTextEditorToolbarActionType[] | undefined);
|
|
201
|
+
get toolbarActions(): SkyTextEditorToolbarActionType[];
|
|
202
|
+
/**
|
|
203
|
+
* The target window options for adding a hyperlink.
|
|
204
|
+
* @default [ 'new', 'existing' ]
|
|
205
|
+
*/
|
|
206
|
+
set linkWindowOptions(value: SkyTextEditorLinkWindowOptionsType[] | undefined);
|
|
207
|
+
get linkWindowOptions(): SkyTextEditorLinkWindowOptionsType[];
|
|
208
|
+
/**
|
|
209
|
+
* A help key that identifies the global help content to display. When specified along with `labelText`, a [help inline](https://developer.blackbaud.com/skyux/components/help-inline)
|
|
210
|
+
* button is placed beside the text editor label. Clicking the button invokes [global help](https://developer.blackbaud.com/skyux/learn/develop/global-help)
|
|
211
|
+
* as configured by the application. This property only applies when `labelText` is also specified.
|
|
212
|
+
*/
|
|
213
|
+
helpKey: string | undefined;
|
|
214
|
+
iframeRef: ElementRef | undefined;
|
|
215
|
+
/**
|
|
216
|
+
* The internal value of the control.
|
|
217
|
+
*/
|
|
218
|
+
set value(value: string | undefined);
|
|
219
|
+
get value(): string;
|
|
220
|
+
inputTemplateRef: TemplateRef<unknown> | undefined;
|
|
221
|
+
editorFocusStream: Subject<void>;
|
|
222
|
+
formControlClass: boolean;
|
|
223
|
+
protected editorFocused: boolean;
|
|
224
|
+
protected readonly errorId: string;
|
|
225
|
+
protected readonly ngControl: NgControl;
|
|
226
|
+
protected readonly requiredState: SkyRequiredStateDirective;
|
|
227
|
+
constructor();
|
|
228
|
+
ngAfterViewInit(): void;
|
|
229
|
+
ngOnDestroy(): void;
|
|
230
|
+
onIframeLoad(): void;
|
|
231
|
+
/**
|
|
232
|
+
* Implemented as part of ControlValueAccessor.
|
|
233
|
+
*/
|
|
234
|
+
writeValue(value: string): void;
|
|
235
|
+
/**
|
|
236
|
+
* Implemented as part of ControlValueAccessor.
|
|
237
|
+
*/
|
|
238
|
+
registerOnChange(fn: (value: any) => void): void;
|
|
239
|
+
/**
|
|
240
|
+
* Implemented as part of ControlValueAccessor.
|
|
241
|
+
*/
|
|
242
|
+
registerOnTouched(fn: () => void): void;
|
|
243
|
+
/**
|
|
244
|
+
* Implemented as part of ControlValueAccessor.
|
|
245
|
+
*/
|
|
246
|
+
setDisabledState(isDisabled: boolean): void;
|
|
247
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SkyTextEditorComponent, never>;
|
|
248
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SkyTextEditorComponent, "sky-text-editor", never, { "autofocus": { "alias": "autofocus"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "fontList": { "alias": "fontList"; "required": false; }; "fontSizeList": { "alias": "fontSizeList"; "required": false; }; "helpPopoverContent": { "alias": "helpPopoverContent"; "required": false; }; "helpPopoverTitle": { "alias": "helpPopoverTitle"; "required": false; }; "hintText": { "alias": "hintText"; "required": false; }; "id": { "alias": "id"; "required": false; }; "initialStyleState": { "alias": "initialStyleState"; "required": false; }; "labelText": { "alias": "labelText"; "required": false; }; "menus": { "alias": "menus"; "required": false; }; "mergeFields": { "alias": "mergeFields"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "stacked": { "alias": "stacked"; "required": false; }; "toolbarActions": { "alias": "toolbarActions"; "required": false; }; "linkWindowOptions": { "alias": "linkWindowOptions"; "required": false; }; "helpKey": { "alias": "helpKey"; "required": false; }; }, {}, never, ["sky-form-error"], true, [{ directive: typeof i1.SkyRequiredStateDirective; inputs: { "required": "required"; }; outputs: {}; }]>;
|
|
249
|
+
static ngAcceptInputType_disabled: unknown;
|
|
250
|
+
static ngAcceptInputType_stacked: unknown;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
declare class SkyTextEditorModule {
|
|
254
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SkyTextEditorModule, never>;
|
|
255
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<SkyTextEditorModule, never, [typeof SkyTextEditorComponent], [typeof SkyTextEditorComponent, typeof i1.SkyFormErrorModule]>;
|
|
256
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<SkyTextEditorModule>;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
/**
|
|
260
|
+
* @internal
|
|
261
|
+
*/
|
|
262
|
+
declare class SkyTextEditorMenubarComponent implements OnDestroy, OnInit {
|
|
263
|
+
#private;
|
|
264
|
+
editorFocusStream: Subject<void>;
|
|
265
|
+
menus: SkyTextEditorMenuType[];
|
|
266
|
+
mergeFields: SkyTextEditorMergeField[];
|
|
267
|
+
disabled: boolean;
|
|
268
|
+
editDropdownStream: Subject<SkyDropdownMessage>;
|
|
269
|
+
editItems: {
|
|
270
|
+
function?: () => void;
|
|
271
|
+
isDivider?: boolean;
|
|
272
|
+
label?: string;
|
|
273
|
+
keyShortcut?: string;
|
|
274
|
+
}[] | undefined;
|
|
275
|
+
formatDropdownStream: Subject<SkyDropdownMessage>;
|
|
276
|
+
formatItems: {
|
|
277
|
+
function?: () => void;
|
|
278
|
+
isDivider?: boolean;
|
|
279
|
+
label?: string;
|
|
280
|
+
keyShortcut?: string;
|
|
281
|
+
}[] | undefined;
|
|
282
|
+
mergeFieldDropdownStream: Subject<SkyDropdownMessage>;
|
|
283
|
+
ngOnInit(): void;
|
|
284
|
+
ngOnDestroy(): void;
|
|
285
|
+
execCommand(command: string, value?: string): void;
|
|
286
|
+
insertMergeField(field: SkyTextEditorMergeField): void;
|
|
287
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SkyTextEditorMenubarComponent, never>;
|
|
288
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SkyTextEditorMenubarComponent, "sky-text-editor-menubar", never, { "editorFocusStream": { "alias": "editorFocusStream"; "required": false; }; "menus": { "alias": "menus"; "required": false; }; "mergeFields": { "alias": "mergeFields"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, {}, never, never, true, never>;
|
|
289
|
+
static ngAcceptInputType_disabled: unknown;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
/**
|
|
293
|
+
* @internal
|
|
294
|
+
*/
|
|
295
|
+
declare class SkyTextEditorToolbarComponent implements OnInit {
|
|
296
|
+
#private;
|
|
297
|
+
set editorFocusStream(value: Subject<void>);
|
|
298
|
+
get editorFocusStream(): Subject<void>;
|
|
299
|
+
fontList: SkyTextEditorFont[];
|
|
300
|
+
fontSizeList: number[];
|
|
301
|
+
toolbarActions: SkyTextEditorToolbarActionType[];
|
|
302
|
+
linkWindowOptions: SkyTextEditorLinkWindowOptionsType[];
|
|
303
|
+
set styleState(value: SkyTextEditorStyleState);
|
|
304
|
+
get styleState(): SkyTextEditorStyleState;
|
|
305
|
+
disabled: boolean;
|
|
306
|
+
backColorpickerStream: Subject<SkyColorpickerMessage>;
|
|
307
|
+
colorpickerStream: Subject<SkyColorpickerMessage>;
|
|
308
|
+
fontPickerStream: Subject<SkyDropdownMessage>;
|
|
309
|
+
fontSizeStream: Subject<SkyDropdownMessage>;
|
|
310
|
+
styleStateFontName: string | undefined;
|
|
311
|
+
ngOnInit(): void;
|
|
312
|
+
execCommand(command: string, value?: string): void;
|
|
313
|
+
toggleFontStyle(currentState: boolean, newState: boolean, command: string): void;
|
|
314
|
+
link(): void;
|
|
315
|
+
unlink(): void;
|
|
316
|
+
changeFontSize(size: number): void;
|
|
317
|
+
onColorpickerColorChanged(color: SkyColorpickerOutput, isBackground?: boolean): void;
|
|
318
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SkyTextEditorToolbarComponent, never>;
|
|
319
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SkyTextEditorToolbarComponent, "sky-text-editor-toolbar", never, { "editorFocusStream": { "alias": "editorFocusStream"; "required": false; }; "fontList": { "alias": "fontList"; "required": false; }; "fontSizeList": { "alias": "fontSizeList"; "required": false; }; "toolbarActions": { "alias": "toolbarActions"; "required": false; }; "linkWindowOptions": { "alias": "linkWindowOptions"; "required": false; }; "styleState": { "alias": "styleState"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, {}, never, never, true, never>;
|
|
320
|
+
static ngAcceptInputType_disabled: unknown;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
/**
|
|
324
|
+
* @internal
|
|
325
|
+
*/
|
|
326
|
+
declare class SkyTextEditorUrlModalComponent {
|
|
327
|
+
#private;
|
|
328
|
+
set activeTab(value: number);
|
|
329
|
+
get activeTab(): number;
|
|
330
|
+
set emailAddress(value: string);
|
|
331
|
+
get emailAddress(): string;
|
|
332
|
+
set url(value: string);
|
|
333
|
+
get url(): string;
|
|
334
|
+
emailAddressValid: boolean;
|
|
335
|
+
allowAllOpenLinkOptions: boolean;
|
|
336
|
+
openLinksInNewWindowOnly: boolean;
|
|
337
|
+
subject: string;
|
|
338
|
+
target: number | string;
|
|
339
|
+
valid: boolean;
|
|
340
|
+
constructor();
|
|
341
|
+
activeTabChanged(value: SkyTabIndex): void;
|
|
342
|
+
save(): void;
|
|
343
|
+
cancel(): void;
|
|
344
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SkyTextEditorUrlModalComponent, never>;
|
|
345
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SkyTextEditorUrlModalComponent, "sky-text-editor-url-modal", never, {}, {}, never, never, true, never>;
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
export { SkyRichTextDisplayModule, SkyTextEditorModule, SkyRichTextDisplayComponent as λ1, SkyTextEditorMenubarComponent as λ2, SkyTextEditorUrlModalComponent as λ3, SkyTextEditorToolbarComponent as λ4, SkyTextEditorComponent as λ5 };
|
|
349
|
+
export type { SkyTextEditorFont, SkyTextEditorLinkWindowOptionsType, SkyTextEditorMenuType, SkyTextEditorMergeField, SkyTextEditorStyleState, SkyTextEditorToolbarActionType };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skyux/text-editor",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "13.0.0-alpha.0",
|
|
4
4
|
"author": "Blackbaud, Inc.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"blackbaud",
|
|
@@ -16,22 +16,22 @@
|
|
|
16
16
|
},
|
|
17
17
|
"homepage": "https://github.com/blackbaud/skyux#readme",
|
|
18
18
|
"peerDependencies": {
|
|
19
|
-
"@angular/common": "^
|
|
20
|
-
"@angular/core": "^
|
|
21
|
-
"@angular/forms": "^
|
|
22
|
-
"@angular/platform-browser": "^
|
|
23
|
-
"@skyux/colorpicker": "
|
|
24
|
-
"@skyux/core": "
|
|
25
|
-
"@skyux/forms": "
|
|
26
|
-
"@skyux/help-inline": "
|
|
27
|
-
"@skyux/i18n": "
|
|
28
|
-
"@skyux/icon": "
|
|
29
|
-
"@skyux/layout": "
|
|
30
|
-
"@skyux/modals": "
|
|
31
|
-
"@skyux/popovers": "
|
|
32
|
-
"@skyux/tabs": "
|
|
33
|
-
"@skyux/theme": "
|
|
34
|
-
"@skyux/validation": "
|
|
19
|
+
"@angular/common": "^20.0.5",
|
|
20
|
+
"@angular/core": "^20.0.5",
|
|
21
|
+
"@angular/forms": "^20.0.5",
|
|
22
|
+
"@angular/platform-browser": "^20.0.5",
|
|
23
|
+
"@skyux/colorpicker": "13.0.0-alpha.0",
|
|
24
|
+
"@skyux/core": "13.0.0-alpha.0",
|
|
25
|
+
"@skyux/forms": "13.0.0-alpha.0",
|
|
26
|
+
"@skyux/help-inline": "13.0.0-alpha.0",
|
|
27
|
+
"@skyux/i18n": "13.0.0-alpha.0",
|
|
28
|
+
"@skyux/icon": "13.0.0-alpha.0",
|
|
29
|
+
"@skyux/layout": "13.0.0-alpha.0",
|
|
30
|
+
"@skyux/modals": "13.0.0-alpha.0",
|
|
31
|
+
"@skyux/popovers": "13.0.0-alpha.0",
|
|
32
|
+
"@skyux/tabs": "13.0.0-alpha.0",
|
|
33
|
+
"@skyux/theme": "13.0.0-alpha.0",
|
|
34
|
+
"@skyux/validation": "13.0.0-alpha.0"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"dompurify": "3.2.4",
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { DomSanitizer, SafeHtml } from '@angular/platform-browser';
|
|
2
|
-
import { SkyTextSanitizationService } from '../text-editor/services/text-sanitization.service';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class SkyRichTextDisplayComponent {
|
|
5
|
-
#private;
|
|
6
|
-
/**
|
|
7
|
-
* The rich text to display.
|
|
8
|
-
*/
|
|
9
|
-
set richText(value: string | undefined);
|
|
10
|
-
sanitizedText: SafeHtml;
|
|
11
|
-
constructor(sanitizer: DomSanitizer, sanitizationService: SkyTextSanitizationService);
|
|
12
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<SkyRichTextDisplayComponent, never>;
|
|
13
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SkyRichTextDisplayComponent, "sky-rich-text-display", never, { "richText": { "alias": "richText"; "required": false; }; }, {}, never, never, false, never>;
|
|
14
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
import * as i1 from "./rich-text-display.component";
|
|
3
|
-
export declare class SkyRichTextDisplayModule {
|
|
4
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<SkyRichTextDisplayModule, never>;
|
|
5
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<SkyRichTextDisplayModule, [typeof i1.SkyRichTextDisplayComponent], never, [typeof i1.SkyRichTextDisplayComponent]>;
|
|
6
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<SkyRichTextDisplayModule>;
|
|
7
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
import * as i1 from "@skyux/i18n";
|
|
3
|
-
/**
|
|
4
|
-
* Import into any component library module that needs to use resource strings.
|
|
5
|
-
*/
|
|
6
|
-
export declare class SkyTextEditorResourcesModule {
|
|
7
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<SkyTextEditorResourcesModule, never>;
|
|
8
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<SkyTextEditorResourcesModule, never, never, [typeof i1.SkyI18nModule]>;
|
|
9
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<SkyTextEditorResourcesModule>;
|
|
10
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { OnDestroy, OnInit } from '@angular/core';
|
|
2
|
-
import { SkyDropdownMessage } from '@skyux/popovers';
|
|
3
|
-
import { Subject } from 'rxjs';
|
|
4
|
-
import { SkyTextEditorMenuType } from '../types/menu-type';
|
|
5
|
-
import { SkyTextEditorMergeField } from '../types/text-editor-merge-field';
|
|
6
|
-
import * as i0 from "@angular/core";
|
|
7
|
-
/**
|
|
8
|
-
* @internal
|
|
9
|
-
*/
|
|
10
|
-
export declare class SkyTextEditorMenubarComponent implements OnDestroy, OnInit {
|
|
11
|
-
#private;
|
|
12
|
-
editorFocusStream: Subject<void>;
|
|
13
|
-
menus: SkyTextEditorMenuType[];
|
|
14
|
-
mergeFields: SkyTextEditorMergeField[];
|
|
15
|
-
disabled: boolean;
|
|
16
|
-
editDropdownStream: Subject<SkyDropdownMessage>;
|
|
17
|
-
editItems: {
|
|
18
|
-
function?: () => void;
|
|
19
|
-
isDivider?: boolean;
|
|
20
|
-
label?: string;
|
|
21
|
-
keyShortcut?: string;
|
|
22
|
-
}[] | undefined;
|
|
23
|
-
formatDropdownStream: Subject<SkyDropdownMessage>;
|
|
24
|
-
formatItems: {
|
|
25
|
-
function?: () => void;
|
|
26
|
-
isDivider?: boolean;
|
|
27
|
-
label?: string;
|
|
28
|
-
keyShortcut?: string;
|
|
29
|
-
}[] | undefined;
|
|
30
|
-
mergeFieldDropdownStream: Subject<SkyDropdownMessage>;
|
|
31
|
-
ngOnInit(): void;
|
|
32
|
-
ngOnDestroy(): void;
|
|
33
|
-
execCommand(command: string, value?: string): void;
|
|
34
|
-
insertMergeField(field: SkyTextEditorMergeField): void;
|
|
35
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<SkyTextEditorMenubarComponent, never>;
|
|
36
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SkyTextEditorMenubarComponent, "sky-text-editor-menubar", never, { "editorFocusStream": { "alias": "editorFocusStream"; "required": false; }; "menus": { "alias": "menus"; "required": false; }; "mergeFields": { "alias": "mergeFields"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, {}, never, never, true, never>;
|
|
37
|
-
static ngAcceptInputType_disabled: unknown;
|
|
38
|
-
}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { ValidationErrors } from '@angular/forms';
|
|
2
|
-
import { SkyAppWindowRef } from '@skyux/core';
|
|
3
|
-
import { EditorCommand } from '../types/editor-command';
|
|
4
|
-
import { EditorSetting } from '../types/editor-setting';
|
|
5
|
-
import { SkyTextEditorStyleState } from '../types/style-state';
|
|
6
|
-
import { UrlModalResult } from '../url-modal/text-editor-url-modal-result';
|
|
7
|
-
import { SkyTextEditorSelectionService } from './text-editor-selection.service';
|
|
8
|
-
import { SkyTextEditorService } from './text-editor.service';
|
|
9
|
-
import * as i0 from "@angular/core";
|
|
10
|
-
/**
|
|
11
|
-
* @internal
|
|
12
|
-
*/
|
|
13
|
-
export declare class SkyTextEditorAdapterService {
|
|
14
|
-
#private;
|
|
15
|
-
constructor(selectionService: SkyTextEditorSelectionService, textEditorService: SkyTextEditorService, windowService: SkyAppWindowRef);
|
|
16
|
-
/**
|
|
17
|
-
* Creates a text editor inside the supplied iframe element.
|
|
18
|
-
*/
|
|
19
|
-
initEditor(id: string, iframeElement: HTMLIFrameElement, styleState: SkyTextEditorStyleState, placeholder?: string): void;
|
|
20
|
-
disableEditor(focusableChildren: HTMLElement[], textEditorNativeElement: HTMLElement): void;
|
|
21
|
-
enableEditor(focusableChildren: HTMLElement[], textEditorNativeElement: HTMLElement): void;
|
|
22
|
-
/**
|
|
23
|
-
* Executes a command on the text editor with the corresponding id.
|
|
24
|
-
*/
|
|
25
|
-
execCommand(editorCommand: EditorCommand): Promise<void>;
|
|
26
|
-
getCurrentSelection(): Selection | null;
|
|
27
|
-
/**
|
|
28
|
-
* Returns a data URI using the provided text string.
|
|
29
|
-
* Used to display a merge field inside a string of text.
|
|
30
|
-
*/
|
|
31
|
-
getMergeFieldDataURI(text: string): string;
|
|
32
|
-
getStyleState(): Partial<SkyTextEditorStyleState>;
|
|
33
|
-
getEditorInnerHtml(): string;
|
|
34
|
-
setEditorInnerHtml(value: string): void;
|
|
35
|
-
focusEditor(): void;
|
|
36
|
-
getLink(): UrlModalResult | undefined;
|
|
37
|
-
getSelectedAnchorTag(): HTMLAnchorElement | null | undefined;
|
|
38
|
-
saveSelection(): Range | undefined;
|
|
39
|
-
selectElement(element: HTMLElement): void;
|
|
40
|
-
setErrorAttributes(errorId: string, errors: ValidationErrors | null): void;
|
|
41
|
-
setLabelAttribute(label: string | undefined): void;
|
|
42
|
-
setPlaceholder(placeholder?: string): void;
|
|
43
|
-
setRequiredAttribute(required: boolean): void;
|
|
44
|
-
setFontSize(fontSize: number): Promise<void>;
|
|
45
|
-
removeObservers(setting: EditorSetting): void;
|
|
46
|
-
editorSelected(): boolean;
|
|
47
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<SkyTextEditorAdapterService, never>;
|
|
48
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<SkyTextEditorAdapterService>;
|
|
49
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
/**
|
|
3
|
-
* @internal
|
|
4
|
-
*/
|
|
5
|
-
export declare class SkyTextEditorSelectionService {
|
|
6
|
-
isElementSelected(documentEl: Document, element: HTMLElement): boolean;
|
|
7
|
-
getCurrentSelection(documentEl: Document): Selection | null;
|
|
8
|
-
getCurrentSelectionParentElement(documentEl: Document): Element | null | undefined;
|
|
9
|
-
getCurrentSelectionRange(documentEl: Document, windowEl: Window): Range | undefined;
|
|
10
|
-
selectElement(documentEl: Document, windowEl: Window, element: HTMLElement): void;
|
|
11
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<SkyTextEditorSelectionService, never>;
|
|
12
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<SkyTextEditorSelectionService>;
|
|
13
|
-
}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { Observable } from 'rxjs';
|
|
2
|
-
import { EditorSetting } from '../types/editor-setting';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
/**
|
|
5
|
-
* @internal
|
|
6
|
-
*/
|
|
7
|
-
export declare class SkyTextEditorService {
|
|
8
|
-
#private;
|
|
9
|
-
/**
|
|
10
|
-
* A dictionary representing all active text editors and their settings.
|
|
11
|
-
*/
|
|
12
|
-
set editor(value: EditorSetting);
|
|
13
|
-
get editor(): EditorSetting;
|
|
14
|
-
get isInitialized(): boolean;
|
|
15
|
-
/**
|
|
16
|
-
* Returns the blur observable from the editor with the corresponding id.
|
|
17
|
-
*/
|
|
18
|
-
blurListener(): Observable<unknown>;
|
|
19
|
-
/**
|
|
20
|
-
* Returns the click observable from the editor with the corresponding id.
|
|
21
|
-
*/
|
|
22
|
-
clickListener(): Observable<unknown>;
|
|
23
|
-
/**
|
|
24
|
-
* Returns the command change observable from the editor with the corresponding id.
|
|
25
|
-
*/
|
|
26
|
-
commandChangeListener(): Observable<unknown>;
|
|
27
|
-
/**
|
|
28
|
-
* Returns the focus observable from the editor with the corresponding id.
|
|
29
|
-
*/
|
|
30
|
-
focusListener(): Observable<unknown>;
|
|
31
|
-
/**
|
|
32
|
-
* Returns the input change observable from the editor with the corresponding id.
|
|
33
|
-
*/
|
|
34
|
-
inputListener(): Observable<unknown>;
|
|
35
|
-
/**
|
|
36
|
-
* Returns the selection change observable from the editor with the corresponding id.
|
|
37
|
-
*/
|
|
38
|
-
selectionChangeListener(): Observable<unknown>;
|
|
39
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<SkyTextEditorService, never>;
|
|
40
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<SkyTextEditorService>;
|
|
41
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
/**
|
|
3
|
-
* The `SkyTextSanitizationService` user the `DOMPurify` library to sanitize strings for use
|
|
4
|
-
* in the DOM. `DOMPurify` allows more customization than Angular's internal `DomSanitizer` so we
|
|
5
|
-
* can preserve `<style>` tags and allow `target` attributes for new tab links.
|
|
6
|
-
* @internal
|
|
7
|
-
*/
|
|
8
|
-
export declare class SkyTextSanitizationService {
|
|
9
|
-
#private;
|
|
10
|
-
/**
|
|
11
|
-
* Returns a sanitized string, allowing target attribute for new tab links.
|
|
12
|
-
*/
|
|
13
|
-
sanitize(htmlString: string): string;
|
|
14
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<SkyTextSanitizationService, never>;
|
|
15
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<SkyTextSanitizationService>;
|
|
16
|
-
}
|