@stackch/angular-material-richtext-editor 1.2.0 → 1.2.2
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/index.d.ts
CHANGED
|
@@ -1,209 +1,13 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { ChangeDetectorRef, EventEmitter } from '@angular/core';
|
|
3
|
+
import { StackchRichtextEditorBase, StackchRichtextEditorConfig, StackchRichtextEditorI18n } from '@stackch/angular-richtext-editor';
|
|
4
|
+
export { STACKCH_RTE_I18N_DE, STACKCH_RTE_I18N_FR, STACKCH_RTE_I18N_IT, StackchRichtextEditorBase, StackchRichtextEditorConfig, StackchRichtextEditorI18n, StackchRichtextMetrics } from '@stackch/angular-richtext-editor';
|
|
4
5
|
|
|
5
|
-
declare class
|
|
6
|
-
|
|
7
|
-
showFontPanel: boolean;
|
|
8
|
-
showHeading: boolean;
|
|
9
|
-
showSpacing: boolean;
|
|
10
|
-
showColor: boolean;
|
|
11
|
-
showBold: boolean;
|
|
12
|
-
showItalic: boolean;
|
|
13
|
-
showUnderline: boolean;
|
|
14
|
-
showLists: boolean;
|
|
15
|
-
showAlign: boolean;
|
|
16
|
-
showLink: boolean;
|
|
17
|
-
showRemoveFormat: boolean;
|
|
18
|
-
i18n?: Partial<StackchRichtextEditorI18n>;
|
|
19
|
-
}
|
|
20
|
-
interface StackchRichtextMetrics {
|
|
21
|
-
htmlLength: number;
|
|
22
|
-
textLength: number;
|
|
23
|
-
}
|
|
24
|
-
declare class StackchRichtextEditorI18n {
|
|
25
|
-
placeholder: string;
|
|
26
|
-
undoTitle: string;
|
|
27
|
-
redoTitle: string;
|
|
28
|
-
fontPanelTitle: string;
|
|
29
|
-
fontSectionTitle: string;
|
|
30
|
-
sizeSectionTitle: string;
|
|
31
|
-
headingTitle: string;
|
|
32
|
-
spacingTitle: string;
|
|
33
|
-
marginTitle: string;
|
|
34
|
-
paddingTitle: string;
|
|
35
|
-
colorsTitle: string;
|
|
36
|
-
colorMenuTitle: string;
|
|
37
|
-
textColorTitle: string;
|
|
38
|
-
highlightTitle: string;
|
|
39
|
-
boldTitle: string;
|
|
40
|
-
italicTitle: string;
|
|
41
|
-
underlineTitle: string;
|
|
42
|
-
listsTitle: string;
|
|
43
|
-
bulletListTitle: string;
|
|
44
|
-
numberedListTitle: string;
|
|
45
|
-
alignTitle: string;
|
|
46
|
-
alignLeftTitle: string;
|
|
47
|
-
alignCenterTitle: string;
|
|
48
|
-
alignRightTitle: string;
|
|
49
|
-
alignJustifyTitle: string;
|
|
50
|
-
linkTitle: string;
|
|
51
|
-
removeFormatTitle: string;
|
|
52
|
-
paragraphLabel: string;
|
|
53
|
-
codeLabel: string;
|
|
54
|
-
h1Label: string;
|
|
55
|
-
h2Label: string;
|
|
56
|
-
h3Label: string;
|
|
57
|
-
h4Label: string;
|
|
58
|
-
h5Label: string;
|
|
59
|
-
h6Label: string;
|
|
60
|
-
}
|
|
61
|
-
declare const STACKCH_RTE_I18N_DE: Partial<StackchRichtextEditorI18n>;
|
|
62
|
-
declare const STACKCH_RTE_I18N_FR: Partial<StackchRichtextEditorI18n>;
|
|
63
|
-
declare const STACKCH_RTE_I18N_IT: Partial<StackchRichtextEditorI18n>;
|
|
64
|
-
declare class StackchRichtextEditorMaterial implements ControlValueAccessor {
|
|
65
|
-
private cdr;
|
|
66
|
-
placeholder: string;
|
|
67
|
-
showToolbar: boolean;
|
|
68
|
-
fonts: string[];
|
|
69
|
-
fontSizes: number[];
|
|
70
|
-
height?: number;
|
|
71
|
-
minHeight: number;
|
|
72
|
-
maxHeight?: number;
|
|
73
|
-
set disabled(value: boolean);
|
|
74
|
-
get disabled(): boolean;
|
|
75
|
-
private _disabled;
|
|
76
|
-
valueChange: EventEmitter<string>;
|
|
77
|
-
metricsChange: EventEmitter<StackchRichtextMetrics>;
|
|
78
|
-
editorRef: ElementRef<HTMLDivElement>;
|
|
6
|
+
declare class StackchRichtextEditorMaterial extends StackchRichtextEditorBase {
|
|
7
|
+
protected logPrefix: string;
|
|
79
8
|
constructor(cdr: ChangeDetectorRef);
|
|
80
|
-
config?: Partial<StackchRichtextEditorConfig> | null;
|
|
81
|
-
get cfg(): StackchRichtextEditorConfig;
|
|
82
|
-
get i18n(): StackchRichtextEditorI18n;
|
|
83
|
-
private onChange;
|
|
84
|
-
onTouched: () => void;
|
|
85
|
-
private savedRange;
|
|
86
|
-
private history;
|
|
87
|
-
private historyIndex;
|
|
88
|
-
private isRestoringHistory;
|
|
89
|
-
private snapshotTimer;
|
|
90
|
-
showFontMenu: boolean;
|
|
91
|
-
showSizeMenu: boolean;
|
|
92
|
-
showFontPanel: boolean;
|
|
93
|
-
showHeadingMenu: boolean;
|
|
94
|
-
showSpacingMenu: boolean;
|
|
95
|
-
showAlignMenu: boolean;
|
|
96
|
-
showColorMenu: boolean;
|
|
97
|
-
showListMenu: boolean;
|
|
98
|
-
isBoldActive: boolean;
|
|
99
|
-
isItalicActive: boolean;
|
|
100
|
-
isUnderlineActive: boolean;
|
|
101
|
-
saveSelection(): void;
|
|
102
|
-
onToolbarMouseDown(evt: Event): void;
|
|
103
|
-
onColorPointerDown(_evt: Event): void;
|
|
104
|
-
private restoreSelection;
|
|
105
|
-
private isRangeInEditor;
|
|
106
|
-
onSelectionChange(): void;
|
|
107
|
-
closeMenus(): void;
|
|
108
|
-
onKeydown(evt: KeyboardEvent): void;
|
|
109
|
-
toggleFontMenu(evt: Event): void;
|
|
110
|
-
toggleSizeMenu(evt: Event): void;
|
|
111
|
-
toggleFontPanel(evt: Event): void;
|
|
112
|
-
toggleHeadingMenu(evt: Event): void;
|
|
113
|
-
toggleSpacingMenu(evt: Event): void;
|
|
114
|
-
toggleAlignMenu(evt: Event): void;
|
|
115
|
-
toggleColorMenu(evt: Event): void;
|
|
116
|
-
toggleListMenu(evt: Event): void;
|
|
117
|
-
onPickAlign(where: 'left' | 'center' | 'right' | 'justify'): void;
|
|
118
|
-
onPickFont(font: string): void;
|
|
119
|
-
onPickFontSize(size: number): void;
|
|
120
|
-
onPickList(kind: 'ul' | 'ol'): void;
|
|
121
|
-
onPickHeading(tag: 'p' | 'pre' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'): void;
|
|
122
|
-
onPickSpacing(kind: 'margin' | 'padding', target: 'all' | 'vertical' | 'horizontal', value: number): void;
|
|
123
|
-
writeValue(value: string | null): void;
|
|
124
|
-
registerOnChange(fn: any): void;
|
|
125
|
-
registerOnTouched(fn: any): void;
|
|
126
|
-
setDisabledState(isDisabled: boolean): void;
|
|
127
|
-
cmd(command: string, value?: string): void;
|
|
128
|
-
applyFont(font: string): void;
|
|
129
|
-
applyFontSize(sizePx: string): void;
|
|
130
|
-
applyColor(color: string): void;
|
|
131
|
-
applyHighlight(color: string): void;
|
|
132
|
-
private expandRangeToWord;
|
|
133
|
-
insertLink(): void;
|
|
134
|
-
removeFormat(): void;
|
|
135
|
-
onInput(): void;
|
|
136
|
-
onKeyup(_evt: KeyboardEvent): void;
|
|
137
|
-
onPaste(evt: ClipboardEvent): void;
|
|
138
|
-
private emitValue;
|
|
139
|
-
private emitMetrics;
|
|
140
|
-
private cleanupEmptyStylesAndSpans;
|
|
141
|
-
get canUndo(): boolean;
|
|
142
|
-
get canRedo(): boolean;
|
|
143
|
-
undo(): void;
|
|
144
|
-
redo(): void;
|
|
145
|
-
private scheduleSnapshot;
|
|
146
|
-
private takeSnapshot;
|
|
147
|
-
private applySnapshot;
|
|
148
|
-
private serializeRange;
|
|
149
|
-
private restoreSerializedRange;
|
|
150
|
-
private nodePathFromNode;
|
|
151
|
-
private nodeFromPath;
|
|
152
|
-
private maxOffset;
|
|
153
|
-
private focusEditor;
|
|
154
|
-
private applyInlineStyle;
|
|
155
|
-
private applyInlineStyleSmart;
|
|
156
|
-
private applySelectionStyles;
|
|
157
|
-
private collectTextSegments;
|
|
158
|
-
private intersectsRange;
|
|
159
|
-
private applyStylesToSegment;
|
|
160
|
-
private toCssProperty;
|
|
161
|
-
private mergeAdjacentStyledSpans;
|
|
162
|
-
private isBoldCarrier;
|
|
163
|
-
private boldAncestorContainingRange;
|
|
164
|
-
private ancestorContainingRange;
|
|
165
|
-
private isItalicCarrier;
|
|
166
|
-
private isUnderlineCarrier;
|
|
167
|
-
private deselectBoldBySplitting;
|
|
168
|
-
private deselectItalicBySplitting;
|
|
169
|
-
private deselectUnderlineBySplitting;
|
|
170
|
-
private cleanupEmptyItalicSpans;
|
|
171
|
-
private cleanupEmptyUnderlineSpans;
|
|
172
|
-
private stripBoldWithin;
|
|
173
|
-
private liftOutOfBoldAncestors;
|
|
174
|
-
private splitOutOfAncestor;
|
|
175
|
-
private saveSelectionFromRange;
|
|
176
|
-
private wrapSelectionWith;
|
|
177
|
-
private insertTextAtSelection;
|
|
178
|
-
private updateInlineStates;
|
|
179
|
-
private computeBoldAnyForRange;
|
|
180
|
-
private computeItalicAnyForRange;
|
|
181
|
-
private computeUnderlineAnyForRange;
|
|
182
|
-
private isNodeBold;
|
|
183
|
-
private isNodeItalic;
|
|
184
|
-
private isNodeUnderline;
|
|
185
|
-
private removeInlineStyleInRange;
|
|
186
|
-
private pruneDanglingStyleCarriers;
|
|
187
|
-
private elementHasVisibleContent;
|
|
188
|
-
private isolateRangeFromStyleCarriers;
|
|
189
|
-
private selectionHasStyle;
|
|
190
|
-
private findCarrierContainingRange;
|
|
191
|
-
private isStyleCarrier;
|
|
192
|
-
private splitCarrierAroundSelection;
|
|
193
|
-
toggleBold(): void;
|
|
194
|
-
toggleItalic(): void;
|
|
195
|
-
toggleUnderline(): void;
|
|
196
|
-
private getCurrentRange;
|
|
197
|
-
private getEditorChildAncestor;
|
|
198
|
-
private findClosest;
|
|
199
|
-
private toggleList;
|
|
200
|
-
private alignBlocks;
|
|
201
|
-
private setBlockSpacing;
|
|
202
|
-
private applySpacingToSelection;
|
|
203
|
-
private normalizeSpacingSpans;
|
|
204
|
-
private setHeading;
|
|
205
9
|
static ɵfac: i0.ɵɵFactoryDeclaration<StackchRichtextEditorMaterial, never>;
|
|
206
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<StackchRichtextEditorMaterial, "stackch-richtext-editor-material", never, {
|
|
10
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<StackchRichtextEditorMaterial, "stackch-richtext-editor-material", never, {}, {}, never, never, true, never>;
|
|
207
11
|
}
|
|
208
12
|
|
|
209
13
|
declare class StackchRichtextEditorMaterialToolbar {
|
|
@@ -257,5 +61,4 @@ declare class StackchRichtextEditorMaterialToolbar {
|
|
|
257
61
|
static ɵcmp: i0.ɵɵComponentDeclaration<StackchRichtextEditorMaterialToolbar, "stackch-richtext-editor-material-toolbar", never, { "cfg": { "alias": "cfg"; "required": false; }; "i18n": { "alias": "i18n"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "fonts": { "alias": "fonts"; "required": false; }; "fontSizes": { "alias": "fontSizes"; "required": false; }; "isBoldActive": { "alias": "isBoldActive"; "required": false; }; "isItalicActive": { "alias": "isItalicActive"; "required": false; }; "isUnderlineActive": { "alias": "isUnderlineActive"; "required": false; }; "canUndo": { "alias": "canUndo"; "required": false; }; "canRedo": { "alias": "canRedo"; "required": false; }; "uiState": { "alias": "uiState"; "required": false; }; }, { "undo": "undo"; "redo": "redo"; "toggleFontPanel": "toggleFontPanel"; "toggleHeadingMenu": "toggleHeadingMenu"; "toggleSpacingMenu": "toggleSpacingMenu"; "toggleAlignMenu": "toggleAlignMenu"; "toggleColorMenu": "toggleColorMenu"; "toggleListMenu": "toggleListMenu"; "pickFont": "pickFont"; "pickFontSize": "pickFontSize"; "pickAlign": "pickAlign"; "pickList": "pickList"; "pickHeading": "pickHeading"; "pickSpacing": "pickSpacing"; "applyColor": "applyColor"; "applyHighlight": "applyHighlight"; "toggleBold": "toggleBold"; "toggleItalic": "toggleItalic"; "toggleUnderline": "toggleUnderline"; "insertLink": "insertLink"; "removeFormat": "removeFormat"; "saveSelectionRequest": "saveSelectionRequest"; }, never, never, true, never>;
|
|
258
62
|
}
|
|
259
63
|
|
|
260
|
-
export {
|
|
261
|
-
export type { StackchRichtextMetrics };
|
|
64
|
+
export { StackchRichtextEditorMaterial, StackchRichtextEditorMaterialToolbar };
|
package/package.json
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stackch/angular-material-richtext-editor",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.2",
|
|
4
4
|
"description": "Angular Material variant of the Stackch rich text editor (standalone component).",
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"@angular/common": "^20.3.4",
|
|
7
7
|
"@angular/core": "^20.3.4",
|
|
8
|
-
"@angular/material": "^20.2.8"
|
|
8
|
+
"@angular/material": "^20.2.8",
|
|
9
|
+
"@stackch/angular-richtext-editor": "^1.2.0"
|
|
9
10
|
},
|
|
10
11
|
"dependencies": {
|
|
11
12
|
"tslib": "^2.8.1"
|