@flogeez/angular-tiptap-editor 2.0.3 → 2.1.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/CHANGELOG.md +63 -3
- package/README.md +168 -107
- package/fesm2022/flogeez-angular-tiptap-editor.mjs +204 -130
- package/fesm2022/flogeez-angular-tiptap-editor.mjs.map +1 -1
- package/index.d.ts +284 -167
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,36 +5,63 @@ All notable changes to `@flogeez/angular-tiptap-editor` will be documented in th
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [2.1.1] - 2026-01-20
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
|
|
12
|
+
- **Height Units**: Fixed a bug where `minHeight` would result in a double "px" unit (e.g., `200pxpx`) in the DOM.
|
|
13
|
+
- **Character Count Styling**: Improved the footer readability by adding padding to the character/word count area.
|
|
14
|
+
|
|
15
|
+
## [2.1.0] - 2026-01-20
|
|
16
|
+
|
|
17
|
+
### Added
|
|
18
|
+
|
|
19
|
+
- **Unified Configuration**: Introduced `AteEditorConfig`, a single flatter interface to manage all editor settings (fundamentals, display options, and modules) via a new `[config]` input.
|
|
20
|
+
- **Enhanced Image Upload Config**: Restructured image upload settings with dedicated `AteImageUploadConfig`, supporting quality, dimensions, max size (in MB), and allowed types.
|
|
21
|
+
- **Menu Visibility Controls**: Added root-level boolean flags to toggle specific bubble menus (`showBubbleMenu`, `showTableMenu`, `showCellMenu`, `showImageBubbleMenu`) and slash commands (`enableSlashCommands`).
|
|
22
|
+
- **Improved Developer Experience**: Updated the demo's code generator to produce consolidated `AteEditorConfig` boilerplate, making it easier for developers to copy-paste configurations.
|
|
23
|
+
|
|
24
|
+
### Changed
|
|
25
|
+
|
|
26
|
+
- **Configuration Precedence**: Standardized the merging logic across all components, ensuring individual inputs correctly override global configuration values while maintaining sensible defaults.
|
|
27
|
+
- **Public API**: Exported `AteEditorConfig` in the public API for better type safety in host applications.
|
|
28
|
+
|
|
8
29
|
## [2.0.3] - 2026-01-19
|
|
9
30
|
|
|
10
31
|
### Added
|
|
32
|
+
|
|
11
33
|
- **Edit Toggle**: Added an optional toggle button to switch between editable and view-only modes.
|
|
12
34
|
- **Design Tokens Improvements**: Refined menu border-radius and image styling for a more consistent visual experience.
|
|
13
35
|
|
|
14
36
|
## [2.0.2] - 2026-01-18
|
|
15
37
|
|
|
16
38
|
### Added
|
|
39
|
+
|
|
17
40
|
- **Peer Dependencies Optimization**: Added `@tiptap/pm` to `peerDependencies`. This ensures a single shared instance of ProseMirror across the application.
|
|
18
41
|
|
|
19
42
|
### Fixed
|
|
20
|
-
- **Slash Commands**: Migrated internal ProseMirror imports (`state`, `view`) to the official `@tiptap/pm` bridge. This aligns the library with Tiptap's recommended architecture and improves compatibility with modern bundlers.
|
|
21
43
|
|
|
44
|
+
- **Slash Commands**: Migrated internal ProseMirror imports (`state`, `view`) to the official `@tiptap/pm` bridge. This aligns the library with Tiptap's recommended architecture and improves compatibility with modern bundlers.
|
|
22
45
|
|
|
23
46
|
## [2.0.1] - 2026-01-17
|
|
24
47
|
|
|
25
48
|
### Added
|
|
49
|
+
|
|
26
50
|
- **Global Footer Toggle**: Added `[showFooter]` input to easily toggle the entire editor footer (counters and limits).
|
|
27
51
|
|
|
28
52
|
### Changed
|
|
53
|
+
|
|
29
54
|
- **Enhanced Slash Commands**: Complete visual overhaul of the slash command menu with improved padding and consistent token-based styling.
|
|
30
55
|
|
|
31
56
|
## [2.0.0] - 2026-01-17
|
|
57
|
+
|
|
32
58
|
🚀 **Major Release**
|
|
33
59
|
|
|
34
60
|
> **Note:** I decided to skip v1.0.0 to align the version number with **Tiptap v2**.
|
|
35
61
|
> This structure prepares the project for the upcoming migration to **Tiptap v3** (which will correspond to my v3.0.0).
|
|
36
62
|
|
|
37
63
|
### Added
|
|
64
|
+
|
|
38
65
|
- **Extensible I18n**: The translation system is now open. You can add any language (e.g., `es`, `it`) via `addTranslations()`, and the `SupportedLocale` type now accepts any string with autocomplete for default languages.
|
|
39
66
|
- **Per-Instance I18n Override**: Added ability to define a specific language for a given editor instance via the `[locale]` input, without affecting the global language of other editors.
|
|
40
67
|
- **Global I18n Singleton**: The translation service is now a global singleton (`providedIn: 'root'`), allowing for application-wide language switching with a single call.
|
|
@@ -45,18 +72,22 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
45
72
|
- **Precise Inline Code**: Separated "Inline Code" and "Code Block" in menus and translations for better clarity.
|
|
46
73
|
|
|
47
74
|
### Fixed
|
|
75
|
+
|
|
48
76
|
- **Inline Code Toggle**: Fixed a reactivity bug where the "Code" button in the toolbar became disabled when already inside a code mark, preventing it from being toggled off.
|
|
49
77
|
|
|
50
78
|
### Changed
|
|
79
|
+
|
|
51
80
|
- **Service Isolation**: `EditorCommandsService`, `LinkService`, `ColorPickerService`, and `ImageService` are no longer global (`root`). They are now provided at the component level for each editor instance, ensuring perfect isolation in multi-editor scenarios.
|
|
52
81
|
- **Internal Refactoring**: Systemic use of `currentTranslations` (computed signal) across all internal components for perfect reactivity to language changes.
|
|
53
82
|
|
|
54
83
|
### Breaking Changes
|
|
84
|
+
|
|
55
85
|
- **Service Injection**: If you were injecting `EditorCommandsService` (or other internal services) directly into your own global services/components, it will no longer work. You must now interact with the editor via its public API (`@ViewChild`).
|
|
56
86
|
|
|
57
87
|
## [0.6.0] - 2026-01-14
|
|
58
88
|
|
|
59
89
|
### Added
|
|
90
|
+
|
|
60
91
|
- **Reactive State Management**: New "Snapshot & Signal" architecture with optimized change detection (OnPush).
|
|
61
92
|
- **Custom Extension Tracking**: Automatic state tracking for custom Tiptap Marks and Nodes (zero-config).
|
|
62
93
|
- **Extensible State**: New `stateCalculators` input to inject custom logic into the reactive editor state.
|
|
@@ -68,6 +99,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
68
99
|
- **Danger Button Variant**: New `danger` variant for actions like "Reset Color" or "Remove Link", providing clear visual feedback for destructive operations.
|
|
69
100
|
|
|
70
101
|
### Fixed
|
|
102
|
+
|
|
71
103
|
- **Multi-instance Support**: Full service isolation, allowing multiple editors on the same page without shared state.
|
|
72
104
|
- **Bubble Menu Conflicts**: Fixed overlapping menus by implementing a strict priority system (specialized menus now hide the main text menu).
|
|
73
105
|
- **Image Bubble Menu Persistence**: Corrected Tippy.js behavior to prevent menus from disappearing when re-clicking an already-selected image.
|
|
@@ -76,6 +108,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
76
108
|
- **Atomic Image Replacement**: Refactored image service to perform atomic updates, fixing the "extra space" bug and preventing layout shifts during asynchronous uploads.
|
|
77
109
|
|
|
78
110
|
### Changed
|
|
111
|
+
|
|
79
112
|
- **Architectural Refactoring**: `EditorCommandsService` is now a clean facade/proxy for specialized services (`ImageService`, `ColorPickerService`, `LinkService`).
|
|
80
113
|
- **Optimized State Performance**: Refactored state calculators (notably `MarksCalculator`) to minimize DOM access and avoid unnecessary layout recalculations (reflow).
|
|
81
114
|
- **Centralized Color Utilities**: Consolidated color normalization, luminance, and contrast calculations into a shared utility for perfect consistency.
|
|
@@ -85,10 +118,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
85
118
|
## [0.5.5] - 2026-01-09
|
|
86
119
|
|
|
87
120
|
### Added
|
|
121
|
+
|
|
88
122
|
- **Bubble Menus Confinement**: Menus now properly respect the editor's boundaries and are clipped by the container when scrolling, specifically optimized for `fillContainer` mode.
|
|
89
123
|
- **Unified Command Execution**: Centralized all editor operations within `EditorCommandsService`, ensuring consistent behavior between the toolbar and bubble menus.
|
|
90
124
|
|
|
91
125
|
### Fixed
|
|
126
|
+
|
|
92
127
|
- **Bubble Menus Positionning**: Refactored positioning logic for all bubble menus (Text, Image, Table, Cell, Slash) using Tippy's `sticky` plugin for real-time tracking during resizing and scrolling.
|
|
93
128
|
- **Bubble Menus Performances**: Significant performance boost in `getImageRect` and `getTableRect` using direct ProseMirror DOM lookups.
|
|
94
129
|
- **Performance Optimization**: Implemented `ChangeDetectionStrategy.OnPush` across all library components to minimize change detection cycles. Improved resource management by enabling Tippy's sticky polling only while menus are visible.
|
|
@@ -96,12 +131,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
96
131
|
## [0.5.4] - 2026-01-08
|
|
97
132
|
|
|
98
133
|
### Added
|
|
134
|
+
|
|
99
135
|
- **Enhanced Color Pickers**: Refactored text and highlight pickers with a curated palette of predefined colors for faster styling.
|
|
100
136
|
- **Intelligent Bubble Menus**: Automatic hiding when approaching the toolbar and smart restoration when leaving, ensuring a non-obstructive editing experience.
|
|
101
137
|
|
|
102
138
|
## [0.5.3] - 2026-01-08
|
|
103
139
|
|
|
104
140
|
### Added
|
|
141
|
+
|
|
105
142
|
- **Unified Color Picker**: Refactored text and highlight color pickers into a single, generic `TiptapColorPickerComponent` for better maintainability (DRY).
|
|
106
143
|
- **Advanced Highlight Picker**: The highlight button now displays the selected color as its background, with automatic icon contrast (black/white) for perfect visibility.
|
|
107
144
|
- **Improved Text Color Picker**: Added an adaptive contrast background to the text color button when a very light color is selected, ensuring the icon remains visible.
|
|
@@ -111,6 +148,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
111
148
|
## [0.5.2] - 2026-01-07
|
|
112
149
|
|
|
113
150
|
### Added
|
|
151
|
+
|
|
114
152
|
- **Word Count Toggle**: Added `showWordCount` input to independently control the visibility of the word counter.
|
|
115
153
|
- **Character Limit**: Added `maxCharacters` support with visual feedback and dynamic blocking.
|
|
116
154
|
- **Footer Configuration Section**: New section in the demo to manage counters and limits with a design consistent with other panels.
|
|
@@ -118,101 +156,119 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
118
156
|
## [0.5.1] - 2026-01-07
|
|
119
157
|
|
|
120
158
|
### Fixed
|
|
159
|
+
|
|
121
160
|
- **Library Dependencies**: Added missing `@tiptap/extension-color` and `@tiptap/extension-text-style` to peerDependencies.
|
|
122
161
|
|
|
123
162
|
## [0.5.0] - 2026-01-07
|
|
124
163
|
|
|
125
164
|
### Added
|
|
165
|
+
|
|
126
166
|
- **Full Theming System**: Introduced a complete set of CSS variables (`--ate-*`) for deep editor customization.
|
|
127
167
|
- **Dark Mode Support**: Native support for dark mode via `.dark` class or `[data-theme="dark"]` attribute on the editor component.
|
|
128
168
|
- **Theme Customizer**: New interactive panel in the demo application to customize and export CSS themes in real-time.
|
|
129
169
|
- **Improved Slash Menu**: Refactored slash menu with better UI, keyboard navigation, and easier command filtering.
|
|
130
170
|
|
|
131
171
|
### Breaking Changes
|
|
172
|
+
|
|
132
173
|
- **Slash Commands API**: The `slashCommands` input now takes a `SlashCommandsConfig` object (a set of boolean flags) to toggle default commands, instead of a list of command items.
|
|
133
174
|
- **Custom Slash Commands**: To provide your own commands, you must now use the new `customSlashCommands` input.
|
|
134
175
|
- **CSS Variables**: The editor now relies heavily on CSS variables. If you had deep CSS overrides, you might need to update them to use the new `--ate-*` tokens.
|
|
135
176
|
|
|
136
177
|
### Fixed
|
|
178
|
+
|
|
137
179
|
- **Text Color Picker**: Improved initial color detection using computed styles and refined UI behavior to accurately reflect text color even when using theme defaults.
|
|
138
180
|
|
|
139
181
|
### Changed
|
|
182
|
+
|
|
140
183
|
- Renamed several internal components and services for better consistency.
|
|
141
184
|
|
|
142
185
|
## [0.4.0] - 2026-01-07
|
|
143
186
|
|
|
144
187
|
### Added
|
|
188
|
+
|
|
145
189
|
- Text color picker extension (PR #6 by @nicolashimmelmann)
|
|
146
190
|
- Integrated color picker into the main toolbar and bubble menu
|
|
147
|
-
- New `tiptapExtensions` and `tiptapOptions` inputs for deeper editor customization
|
|
148
|
-
|
|
191
|
+
- New `tiptapExtensions` and `tiptapOptions` inputs for deeper editor customization (PR #6 by @nicolashimmelmann)
|
|
149
192
|
|
|
150
193
|
## [0.3.7] - 2025-12-19
|
|
151
194
|
|
|
152
195
|
### Added
|
|
196
|
+
|
|
153
197
|
- `fillContainer` input to make the editor fill the full height of its parent container
|
|
154
198
|
|
|
155
199
|
## [0.3.6] - 2025-12-19
|
|
156
200
|
|
|
157
201
|
### Added
|
|
202
|
+
|
|
158
203
|
- Custom image upload handler (`imageUploadHandler` input)
|
|
159
204
|
- Support for both `Promise` and `Observable` return types in upload handler
|
|
160
205
|
|
|
161
206
|
## [0.3.5] - 2025-12-19
|
|
162
207
|
|
|
163
208
|
### Added
|
|
209
|
+
|
|
164
210
|
- `autofocus` input with multiple options (`false`, `'start'`, `'end'`, `'all'`, or position number)
|
|
165
211
|
- Autofocus property support (PR #5 by @elirov)
|
|
166
212
|
|
|
167
213
|
## [0.3.4] - 2025-12-19
|
|
168
214
|
|
|
169
215
|
### Fixed
|
|
216
|
+
|
|
170
217
|
- Removed console.log statements
|
|
171
218
|
|
|
172
219
|
## [0.3.3] - 2025-09-05
|
|
173
220
|
|
|
174
221
|
### Fixed
|
|
222
|
+
|
|
175
223
|
- Slash commands functionality improvements
|
|
176
224
|
|
|
177
225
|
## [0.3.2] - 2025-09-05
|
|
178
226
|
|
|
179
227
|
### Fixed
|
|
228
|
+
|
|
180
229
|
- Table functionality in slash commands
|
|
181
230
|
|
|
182
231
|
## [0.3.1] - 2025-09-03
|
|
183
232
|
|
|
184
233
|
### Added
|
|
234
|
+
|
|
185
235
|
- Table extension with bubble menu for cell editing
|
|
186
236
|
|
|
187
237
|
## [0.3.0] - 2025-09-01
|
|
188
238
|
|
|
189
239
|
### Added
|
|
240
|
+
|
|
190
241
|
- Table extension (insert, delete rows/columns, merge cells)
|
|
191
242
|
- Cell bubble menu for table editing
|
|
192
243
|
|
|
193
244
|
## [0.2.7] - 2025-08-22
|
|
194
245
|
|
|
195
246
|
### Fixed
|
|
247
|
+
|
|
196
248
|
- FormControls now fully Angular 18+ compliant
|
|
197
249
|
|
|
198
250
|
## [0.2.6] - 2025-08-21
|
|
199
251
|
|
|
200
252
|
### Fixed
|
|
253
|
+
|
|
201
254
|
- FormControl update when editor is not ready yet
|
|
202
255
|
|
|
203
256
|
## [0.2.5] - 2025-08-21
|
|
204
257
|
|
|
205
258
|
### Changed
|
|
259
|
+
|
|
206
260
|
- Updated README with StackBlitz demo link
|
|
207
261
|
|
|
208
262
|
## [0.2.4] - 2025-08-21
|
|
209
263
|
|
|
210
264
|
### Fixed
|
|
265
|
+
|
|
211
266
|
- FormControls improvements
|
|
212
267
|
|
|
213
268
|
## [0.2.3] - 2025-08-20
|
|
214
269
|
|
|
215
270
|
### Fixed
|
|
271
|
+
|
|
216
272
|
- Text alignment controls
|
|
217
273
|
- Image positioning
|
|
218
274
|
- Placeholder display
|
|
@@ -220,23 +276,27 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
220
276
|
## [0.2.2] - 2025-08-20
|
|
221
277
|
|
|
222
278
|
### Fixed
|
|
279
|
+
|
|
223
280
|
- Material Symbols font loading
|
|
224
281
|
|
|
225
282
|
## [0.2.1] - 2025-08-20
|
|
226
283
|
|
|
227
284
|
### Fixed
|
|
285
|
+
|
|
228
286
|
- Peer dependencies versions
|
|
229
287
|
- Library package name
|
|
230
288
|
|
|
231
289
|
## [0.2.0] - 2025-08-20
|
|
232
290
|
|
|
233
291
|
### Fixed
|
|
292
|
+
|
|
234
293
|
- Angular version compatibility
|
|
235
294
|
- GitHub Pages deployment path
|
|
236
295
|
|
|
237
296
|
## [0.1.0] - 2025-08-20
|
|
238
297
|
|
|
239
298
|
### Added
|
|
299
|
+
|
|
240
300
|
- Initial release
|
|
241
301
|
- Rich text editing with Tiptap
|
|
242
302
|
- Toolbar with formatting options (bold, italic, underline, strike, code)
|