@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
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
import { AfterViewInit, ElementRef, OnDestroy, TemplateRef } from '@angular/core';
|
|
2
|
-
import { ControlValueAccessor, NgControl } from '@angular/forms';
|
|
3
|
-
import { SkyRequiredStateDirective } from '@skyux/forms';
|
|
4
|
-
import { Subject } from 'rxjs';
|
|
5
|
-
import { SkyTextEditorFont } from './types/font-state';
|
|
6
|
-
import { SkyTextEditorLinkWindowOptionsType } from './types/link-window-options-type';
|
|
7
|
-
import { SkyTextEditorMenuType } from './types/menu-type';
|
|
8
|
-
import { SkyTextEditorStyleState } from './types/style-state';
|
|
9
|
-
import { SkyTextEditorMergeField } from './types/text-editor-merge-field';
|
|
10
|
-
import { SkyTextEditorToolbarActionType } from './types/toolbar-action-type';
|
|
11
|
-
import * as i0 from "@angular/core";
|
|
12
|
-
import * as i1 from "@skyux/forms";
|
|
13
|
-
/**
|
|
14
|
-
* The text editor component lets users format and manipulate text.
|
|
15
|
-
*/
|
|
16
|
-
export declare class SkyTextEditorComponent implements AfterViewInit, OnDestroy, ControlValueAccessor {
|
|
17
|
-
#private;
|
|
18
|
-
/**
|
|
19
|
-
* Whether to put focus on the editor after it renders.
|
|
20
|
-
*/
|
|
21
|
-
autofocus: boolean | undefined;
|
|
22
|
-
/**
|
|
23
|
-
* 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.
|
|
24
|
-
* To set the disabled state on reactive forms, use the `FormControl` instead.
|
|
25
|
-
* @default false
|
|
26
|
-
*/
|
|
27
|
-
set disabled(value: boolean);
|
|
28
|
-
get disabled(): boolean;
|
|
29
|
-
/**
|
|
30
|
-
* The fonts to include in the font picker.
|
|
31
|
-
* @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'}]
|
|
32
|
-
*/
|
|
33
|
-
set fontList(value: SkyTextEditorFont[] | undefined);
|
|
34
|
-
get fontList(): SkyTextEditorFont[];
|
|
35
|
-
/**
|
|
36
|
-
* The font sizes to include in the font size picker.
|
|
37
|
-
* @default [6, 8, 9, 10, 11, 12, 13, 14, 15, 16, 18, 20, 22, 24, 26, 28, 36, 48]
|
|
38
|
-
*/
|
|
39
|
-
set fontSizeList(value: number[] | undefined);
|
|
40
|
-
get fontSizeList(): number[];
|
|
41
|
-
/**
|
|
42
|
-
* The content of the help popover. When specified along with `labelText`, a [help inline](https://developer.blackbaud.com/skyux/components/help-inline)
|
|
43
|
-
* button is added to the text editor. The help inline button displays a [popover](https://developer.blackbaud.com/skyux/components/popover)
|
|
44
|
-
* when clicked using the specified content and optional title. This property only applies when `labelText` is also specified.
|
|
45
|
-
*/
|
|
46
|
-
helpPopoverContent: string | TemplateRef<unknown> | undefined;
|
|
47
|
-
/**
|
|
48
|
-
* The title of the help popover. This property only applies when `helpPopoverContent` is
|
|
49
|
-
* also specified.
|
|
50
|
-
*/
|
|
51
|
-
helpPopoverTitle: string | undefined;
|
|
52
|
-
/**
|
|
53
|
-
* [Persistent inline help text](https://developer.blackbaud.com/skyux/design/guidelines/user-assistance#inline-help) that provides
|
|
54
|
-
* additional context to the user.
|
|
55
|
-
*/
|
|
56
|
-
hintText: string | undefined;
|
|
57
|
-
/**
|
|
58
|
-
* The unique ID attribute for the text editor.
|
|
59
|
-
* By default, the component generates a random ID.
|
|
60
|
-
*/
|
|
61
|
-
set id(value: string | undefined);
|
|
62
|
-
get id(): string;
|
|
63
|
-
/**
|
|
64
|
-
* The initial styles for all content, including background color, font size, and link state.
|
|
65
|
-
*/
|
|
66
|
-
set initialStyleState(state: SkyTextEditorStyleState | undefined);
|
|
67
|
-
get initialStyleState(): SkyTextEditorStyleState;
|
|
68
|
-
/**
|
|
69
|
-
* The text to display as the text editor's label.
|
|
70
|
-
*/
|
|
71
|
-
set labelText(value: string | undefined);
|
|
72
|
-
get labelText(): string | undefined;
|
|
73
|
-
/**
|
|
74
|
-
* The menus to include in the menu bar.
|
|
75
|
-
* @default [ 'edit', 'format' ]
|
|
76
|
-
*/
|
|
77
|
-
set menus(value: SkyTextEditorMenuType[] | undefined);
|
|
78
|
-
get menus(): SkyTextEditorMenuType[];
|
|
79
|
-
/**
|
|
80
|
-
* The merge fields to include in the merge field menu.
|
|
81
|
-
*/
|
|
82
|
-
set mergeFields(value: SkyTextEditorMergeField[] | undefined);
|
|
83
|
-
get mergeFields(): SkyTextEditorMergeField[];
|
|
84
|
-
/**
|
|
85
|
-
* Placeholder text to display when the text entry area is empty.
|
|
86
|
-
*/
|
|
87
|
-
set placeholder(value: string | undefined);
|
|
88
|
-
get placeholder(): string;
|
|
89
|
-
/**
|
|
90
|
-
* Whether the text editor is stacked on another form component. When specified,
|
|
91
|
-
* the appropriate vertical spacing is automatically added to the text editor.
|
|
92
|
-
*/
|
|
93
|
-
stacked: boolean;
|
|
94
|
-
/**
|
|
95
|
-
* The actions to include in the toolbar in the specified order.
|
|
96
|
-
* @default [ 'font-family', 'font-size', 'font-style', 'color', 'list', 'link ]
|
|
97
|
-
*/
|
|
98
|
-
set toolbarActions(value: SkyTextEditorToolbarActionType[] | undefined);
|
|
99
|
-
get toolbarActions(): SkyTextEditorToolbarActionType[];
|
|
100
|
-
/**
|
|
101
|
-
* The target window options for adding a hyperlink.
|
|
102
|
-
* @default [ 'new', 'existing' ]
|
|
103
|
-
*/
|
|
104
|
-
set linkWindowOptions(value: SkyTextEditorLinkWindowOptionsType[] | undefined);
|
|
105
|
-
get linkWindowOptions(): SkyTextEditorLinkWindowOptionsType[];
|
|
106
|
-
/**
|
|
107
|
-
* 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)
|
|
108
|
-
* button is placed beside the text editor label. Clicking the button invokes [global help](https://developer.blackbaud.com/skyux/learn/develop/global-help)
|
|
109
|
-
* as configured by the application. This property only applies when `labelText` is also specified.
|
|
110
|
-
*/
|
|
111
|
-
helpKey: string | undefined;
|
|
112
|
-
iframeRef: ElementRef | undefined;
|
|
113
|
-
/**
|
|
114
|
-
* The internal value of the control.
|
|
115
|
-
*/
|
|
116
|
-
set value(value: string | undefined);
|
|
117
|
-
get value(): string;
|
|
118
|
-
inputTemplateRef: TemplateRef<unknown> | undefined;
|
|
119
|
-
editorFocusStream: Subject<void>;
|
|
120
|
-
formControlClass: boolean;
|
|
121
|
-
protected editorFocused: boolean;
|
|
122
|
-
protected readonly errorId: string;
|
|
123
|
-
protected readonly ngControl: NgControl;
|
|
124
|
-
protected readonly requiredState: SkyRequiredStateDirective;
|
|
125
|
-
constructor();
|
|
126
|
-
ngAfterViewInit(): void;
|
|
127
|
-
ngOnDestroy(): void;
|
|
128
|
-
onIframeLoad(): void;
|
|
129
|
-
/**
|
|
130
|
-
* Implemented as part of ControlValueAccessor.
|
|
131
|
-
*/
|
|
132
|
-
writeValue(value: string): void;
|
|
133
|
-
/**
|
|
134
|
-
* Implemented as part of ControlValueAccessor.
|
|
135
|
-
*/
|
|
136
|
-
registerOnChange(fn: (value: any) => void): void;
|
|
137
|
-
/**
|
|
138
|
-
* Implemented as part of ControlValueAccessor.
|
|
139
|
-
*/
|
|
140
|
-
registerOnTouched(fn: () => void): void;
|
|
141
|
-
/**
|
|
142
|
-
* Implemented as part of ControlValueAccessor.
|
|
143
|
-
*/
|
|
144
|
-
setDisabledState(isDisabled: boolean): void;
|
|
145
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<SkyTextEditorComponent, never>;
|
|
146
|
-
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: {}; }]>;
|
|
147
|
-
static ngAcceptInputType_disabled: unknown;
|
|
148
|
-
static ngAcceptInputType_stacked: unknown;
|
|
149
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
import * as i1 from "./text-editor.component";
|
|
3
|
-
import * as i2 from "@skyux/forms";
|
|
4
|
-
export declare class SkyTextEditorModule {
|
|
5
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<SkyTextEditorModule, never>;
|
|
6
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<SkyTextEditorModule, never, [typeof i1.SkyTextEditorComponent], [typeof i1.SkyTextEditorComponent, typeof i2.SkyFormErrorModule]>;
|
|
7
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<SkyTextEditorModule>;
|
|
8
|
-
}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { OnInit } from '@angular/core';
|
|
2
|
-
import { SkyColorpickerMessage, SkyColorpickerOutput } from '@skyux/colorpicker';
|
|
3
|
-
import { SkyDropdownMessage } from '@skyux/popovers';
|
|
4
|
-
import { Subject } from 'rxjs';
|
|
5
|
-
import { SkyTextEditorFont } from '../types/font-state';
|
|
6
|
-
import { SkyTextEditorLinkWindowOptionsType } from '../types/link-window-options-type';
|
|
7
|
-
import { SkyTextEditorStyleState } from '../types/style-state';
|
|
8
|
-
import { SkyTextEditorToolbarActionType } from '../types/toolbar-action-type';
|
|
9
|
-
import * as i0 from "@angular/core";
|
|
10
|
-
/**
|
|
11
|
-
* @internal
|
|
12
|
-
*/
|
|
13
|
-
export declare class SkyTextEditorToolbarComponent implements OnInit {
|
|
14
|
-
#private;
|
|
15
|
-
set editorFocusStream(value: Subject<void>);
|
|
16
|
-
get editorFocusStream(): Subject<void>;
|
|
17
|
-
fontList: SkyTextEditorFont[];
|
|
18
|
-
fontSizeList: number[];
|
|
19
|
-
toolbarActions: SkyTextEditorToolbarActionType[];
|
|
20
|
-
linkWindowOptions: SkyTextEditorLinkWindowOptionsType[];
|
|
21
|
-
set styleState(value: SkyTextEditorStyleState);
|
|
22
|
-
get styleState(): SkyTextEditorStyleState;
|
|
23
|
-
disabled: boolean;
|
|
24
|
-
backColorpickerStream: Subject<SkyColorpickerMessage>;
|
|
25
|
-
colorpickerStream: Subject<SkyColorpickerMessage>;
|
|
26
|
-
fontPickerStream: Subject<SkyDropdownMessage>;
|
|
27
|
-
fontSizeStream: Subject<SkyDropdownMessage>;
|
|
28
|
-
styleStateFontName: string | undefined;
|
|
29
|
-
ngOnInit(): void;
|
|
30
|
-
execCommand(command: string, value?: string): void;
|
|
31
|
-
toggleFontStyle(currentState: boolean, newState: boolean, command: string): void;
|
|
32
|
-
link(): void;
|
|
33
|
-
unlink(): void;
|
|
34
|
-
changeFontSize(size: number): void;
|
|
35
|
-
onColorpickerColorChanged(color: SkyColorpickerOutput, isBackground?: boolean): void;
|
|
36
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<SkyTextEditorToolbarComponent, never>;
|
|
37
|
-
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>;
|
|
38
|
-
static ngAcceptInputType_disabled: unknown;
|
|
39
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { Subject } from 'rxjs';
|
|
2
|
-
/**
|
|
3
|
-
* @internal
|
|
4
|
-
*/
|
|
5
|
-
export interface EditorSetting {
|
|
6
|
-
blurListener: () => void;
|
|
7
|
-
blurObservable: Subject<void>;
|
|
8
|
-
focusListener: () => void;
|
|
9
|
-
focusObservable: Subject<void>;
|
|
10
|
-
clickListener: () => void;
|
|
11
|
-
clickObservable: Subject<void>;
|
|
12
|
-
commandChangeObservable: Subject<void>;
|
|
13
|
-
iframeElementRef: HTMLIFrameElement;
|
|
14
|
-
inputListener: () => void;
|
|
15
|
-
inputObservable: Subject<void>;
|
|
16
|
-
pasteListener: (e: ClipboardEvent) => void;
|
|
17
|
-
selectionChangeObservable: Subject<void>;
|
|
18
|
-
selectionListener: () => void;
|
|
19
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type SkyTextEditorLinkWindowOptionsType = 'new' | 'existing';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type SkyTextEditorMenuType = 'edit' | 'format' | 'merge-field';
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
export interface SkyTextEditorStyleState {
|
|
2
|
-
/**
|
|
3
|
-
* The background color. Accepts any CSS color value.
|
|
4
|
-
*/
|
|
5
|
-
backColor: string;
|
|
6
|
-
/**
|
|
7
|
-
* The font color. Accepts any CSS color value.
|
|
8
|
-
*/
|
|
9
|
-
fontColor: string;
|
|
10
|
-
/**
|
|
11
|
-
* The font size in pixels.
|
|
12
|
-
*/
|
|
13
|
-
fontSize: number;
|
|
14
|
-
/**
|
|
15
|
-
* The font family. Available values: `"Blackbaud Sans"`,
|
|
16
|
-
* `"Arial"`, `"sans-serif"`, `"Arial Black"`, `"Courier New"`, and `"Times New Roman"`.
|
|
17
|
-
*/
|
|
18
|
-
font: string;
|
|
19
|
-
/**
|
|
20
|
-
* Whether to make text bold.
|
|
21
|
-
*/
|
|
22
|
-
boldState: boolean;
|
|
23
|
-
/**
|
|
24
|
-
* Whether to italicize text.
|
|
25
|
-
*/
|
|
26
|
-
italicState: boolean;
|
|
27
|
-
/**
|
|
28
|
-
* Whether to underline text.
|
|
29
|
-
*/
|
|
30
|
-
underlineState: boolean;
|
|
31
|
-
/**
|
|
32
|
-
* Whether to format text as a link.
|
|
33
|
-
*/
|
|
34
|
-
linkState: boolean;
|
|
35
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export interface SkyTextEditorMergeField {
|
|
2
|
-
/**
|
|
3
|
-
* The identifier for the merge field.
|
|
4
|
-
*/
|
|
5
|
-
id: string;
|
|
6
|
-
/**
|
|
7
|
-
* Display text for the merge field. If it is more than 18 characters, the component truncates to 15 characters.
|
|
8
|
-
*/
|
|
9
|
-
name: string;
|
|
10
|
-
/**
|
|
11
|
-
* The `src` attribute for a preview image to represent the merge field
|
|
12
|
-
* in the text editor. By default, the `name` value appears in a blue rectangle.
|
|
13
|
-
*/
|
|
14
|
-
previewImageUrl?: string;
|
|
15
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type SkyTextEditorToolbarActionType = 'font-family' | 'font-size' | 'font-style' | 'color' | 'list' | 'alignment' | 'indentation' | 'undo-redo' | 'link';
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { SkyTextEditorLinkWindowOptionsType } from '../types/link-window-options-type';
|
|
2
|
-
import { UrlModalResult } from './text-editor-url-modal-result';
|
|
3
|
-
/**
|
|
4
|
-
* @internal
|
|
5
|
-
*/
|
|
6
|
-
export declare class SkyUrlModalContext {
|
|
7
|
-
urlResult: UrlModalResult | undefined;
|
|
8
|
-
linkWindowOptions: SkyTextEditorLinkWindowOptionsType[] | undefined;
|
|
9
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { SkyTabIndex } from '@skyux/tabs';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
/**
|
|
4
|
-
* @internal
|
|
5
|
-
*/
|
|
6
|
-
export declare class SkyTextEditorUrlModalComponent {
|
|
7
|
-
#private;
|
|
8
|
-
set activeTab(value: number);
|
|
9
|
-
get activeTab(): number;
|
|
10
|
-
set emailAddress(value: string);
|
|
11
|
-
get emailAddress(): string;
|
|
12
|
-
set url(value: string);
|
|
13
|
-
get url(): string;
|
|
14
|
-
emailAddressValid: boolean;
|
|
15
|
-
allowAllOpenLinkOptions: boolean;
|
|
16
|
-
openLinksInNewWindowOnly: boolean;
|
|
17
|
-
subject: string;
|
|
18
|
-
target: number | string;
|
|
19
|
-
valid: boolean;
|
|
20
|
-
constructor();
|
|
21
|
-
activeTabChanged(value: SkyTabIndex): void;
|
|
22
|
-
save(): void;
|
|
23
|
-
cancel(): void;
|
|
24
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<SkyTextEditorUrlModalComponent, never>;
|
|
25
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SkyTextEditorUrlModalComponent, "sky-text-editor-url-modal", never, {}, {}, never, never, true, never>;
|
|
26
|
-
}
|