@stackch/angular-material-richtext-editor 1.0.0 → 1.2.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/index.d.ts
CHANGED
|
@@ -17,6 +17,10 @@ declare class StackchRichtextEditorConfig {
|
|
|
17
17
|
showRemoveFormat: boolean;
|
|
18
18
|
i18n?: Partial<StackchRichtextEditorI18n>;
|
|
19
19
|
}
|
|
20
|
+
interface StackchRichtextMetrics {
|
|
21
|
+
htmlLength: number;
|
|
22
|
+
textLength: number;
|
|
23
|
+
}
|
|
20
24
|
declare class StackchRichtextEditorI18n {
|
|
21
25
|
placeholder: string;
|
|
22
26
|
undoTitle: string;
|
|
@@ -70,6 +74,7 @@ declare class StackchRichtextEditorMaterial implements ControlValueAccessor {
|
|
|
70
74
|
get disabled(): boolean;
|
|
71
75
|
private _disabled;
|
|
72
76
|
valueChange: EventEmitter<string>;
|
|
77
|
+
metricsChange: EventEmitter<StackchRichtextMetrics>;
|
|
73
78
|
editorRef: ElementRef<HTMLDivElement>;
|
|
74
79
|
constructor(cdr: ChangeDetectorRef);
|
|
75
80
|
config?: Partial<StackchRichtextEditorConfig> | null;
|
|
@@ -131,6 +136,7 @@ declare class StackchRichtextEditorMaterial implements ControlValueAccessor {
|
|
|
131
136
|
onKeyup(_evt: KeyboardEvent): void;
|
|
132
137
|
onPaste(evt: ClipboardEvent): void;
|
|
133
138
|
private emitValue;
|
|
139
|
+
private emitMetrics;
|
|
134
140
|
private cleanupEmptyStylesAndSpans;
|
|
135
141
|
get canUndo(): boolean;
|
|
136
142
|
get canRedo(): boolean;
|
|
@@ -147,12 +153,17 @@ declare class StackchRichtextEditorMaterial implements ControlValueAccessor {
|
|
|
147
153
|
private focusEditor;
|
|
148
154
|
private applyInlineStyle;
|
|
149
155
|
private applyInlineStyleSmart;
|
|
150
|
-
private
|
|
151
|
-
private
|
|
156
|
+
private applySelectionStyles;
|
|
157
|
+
private collectTextSegments;
|
|
158
|
+
private intersectsRange;
|
|
159
|
+
private applyStylesToSegment;
|
|
160
|
+
private toCssProperty;
|
|
161
|
+
private mergeAdjacentStyledSpans;
|
|
152
162
|
private isBoldCarrier;
|
|
153
163
|
private boldAncestorContainingRange;
|
|
154
164
|
private ancestorContainingRange;
|
|
155
|
-
private
|
|
165
|
+
private isItalicCarrier;
|
|
166
|
+
private isUnderlineCarrier;
|
|
156
167
|
private deselectBoldBySplitting;
|
|
157
168
|
private deselectItalicBySplitting;
|
|
158
169
|
private deselectUnderlineBySplitting;
|
|
@@ -161,8 +172,7 @@ declare class StackchRichtextEditorMaterial implements ControlValueAccessor {
|
|
|
161
172
|
private stripBoldWithin;
|
|
162
173
|
private liftOutOfBoldAncestors;
|
|
163
174
|
private splitOutOfAncestor;
|
|
164
|
-
private
|
|
165
|
-
private maybeUnwrapNormalSpan;
|
|
175
|
+
private saveSelectionFromRange;
|
|
166
176
|
private wrapSelectionWith;
|
|
167
177
|
private insertTextAtSelection;
|
|
168
178
|
private updateInlineStates;
|
|
@@ -172,12 +182,14 @@ declare class StackchRichtextEditorMaterial implements ControlValueAccessor {
|
|
|
172
182
|
private isNodeBold;
|
|
173
183
|
private isNodeItalic;
|
|
174
184
|
private isNodeUnderline;
|
|
175
|
-
private isItalicCarrier;
|
|
176
|
-
private isUnderlineCarrier;
|
|
177
|
-
private computeBoldActiveForRange;
|
|
178
|
-
private computeItalicActiveForRange;
|
|
179
|
-
private computeUnderlineActiveForRange;
|
|
180
185
|
private removeInlineStyleInRange;
|
|
186
|
+
private pruneDanglingStyleCarriers;
|
|
187
|
+
private elementHasVisibleContent;
|
|
188
|
+
private isolateRangeFromStyleCarriers;
|
|
189
|
+
private selectionHasStyle;
|
|
190
|
+
private findCarrierContainingRange;
|
|
191
|
+
private isStyleCarrier;
|
|
192
|
+
private splitCarrierAroundSelection;
|
|
181
193
|
toggleBold(): void;
|
|
182
194
|
toggleItalic(): void;
|
|
183
195
|
toggleUnderline(): void;
|
|
@@ -191,7 +203,7 @@ declare class StackchRichtextEditorMaterial implements ControlValueAccessor {
|
|
|
191
203
|
private normalizeSpacingSpans;
|
|
192
204
|
private setHeading;
|
|
193
205
|
static ɵfac: i0.ɵɵFactoryDeclaration<StackchRichtextEditorMaterial, never>;
|
|
194
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<StackchRichtextEditorMaterial, "stackch-richtext-editor-material", never, { "placeholder": { "alias": "placeholder"; "required": false; }; "showToolbar": { "alias": "showToolbar"; "required": false; }; "fonts": { "alias": "fonts"; "required": false; }; "fontSizes": { "alias": "fontSizes"; "required": false; }; "height": { "alias": "height"; "required": false; }; "minHeight": { "alias": "minHeight"; "required": false; }; "maxHeight": { "alias": "maxHeight"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "config": { "alias": "config"; "required": false; }; }, { "valueChange": "valueChange"; }, never, never, true, never>;
|
|
206
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<StackchRichtextEditorMaterial, "stackch-richtext-editor-material", never, { "placeholder": { "alias": "placeholder"; "required": false; }; "showToolbar": { "alias": "showToolbar"; "required": false; }; "fonts": { "alias": "fonts"; "required": false; }; "fontSizes": { "alias": "fontSizes"; "required": false; }; "height": { "alias": "height"; "required": false; }; "minHeight": { "alias": "minHeight"; "required": false; }; "maxHeight": { "alias": "maxHeight"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "config": { "alias": "config"; "required": false; }; }, { "valueChange": "valueChange"; "metricsChange": "metricsChange"; }, never, never, true, never>;
|
|
195
207
|
}
|
|
196
208
|
|
|
197
209
|
declare class StackchRichtextEditorMaterialToolbar {
|
|
@@ -246,3 +258,4 @@ declare class StackchRichtextEditorMaterialToolbar {
|
|
|
246
258
|
}
|
|
247
259
|
|
|
248
260
|
export { STACKCH_RTE_I18N_DE, STACKCH_RTE_I18N_FR, STACKCH_RTE_I18N_IT, StackchRichtextEditorConfig, StackchRichtextEditorI18n, StackchRichtextEditorMaterial, StackchRichtextEditorMaterialToolbar };
|
|
261
|
+
export type { StackchRichtextMetrics };
|
package/package.json
CHANGED