@flogeez/angular-tiptap-editor 2.1.1 → 2.1.3

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 CHANGED
@@ -5,6 +5,23 @@ 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.3] - 2026-01-21
9
+
10
+ ### Fixed
11
+
12
+ - **Linting & Code Quality**: Systematically resolved all remaining lint errors across the library and demo app.
13
+ - **Improved Type Safety**: Replaced numerous `any` types with specific interfaces or `unknown`, and added explicit `eslint-disable` comments where dynamic logic (like Tiptap chaining) requires it.
14
+ - **Accessibility (A11y)**: Enhanced interactive components with appropriate ARIA roles, `tabindex`, and keyboard event handlers (`keydown.enter`, `keydown.space`, `keydown.escape`) to meet modern accessibility standards.
15
+ - **Output Naming Consistency**: Renamed several `@Output()` properties to avoid conflicts with native DOM events and `on-` prefixes (e.g., `onClick` -> `buttonClick`).
16
+ - **Regular Expressions**: Fixed redundant escape characters in slash command patterns.
17
+ - **Case Declarations**: Wrapped switch case blocks with curly braces to properly scope lexical declarations.
18
+
19
+ ## [2.1.2] - 2026-01-21
20
+
21
+ ### Fixed
22
+
23
+ - **Editable State Synchronization**: Fixed an issue where the `editable` state from the `[config]` input was ignored in favor of the standalone `[editable]` input. Both are now correctly merged, with `config.editable` taking precedence.
24
+
8
25
  ## [2.1.1] - 2026-01-20
9
26
 
10
27
  ### Fixed
package/README.md CHANGED
@@ -69,12 +69,7 @@ import { AngularTiptapEditorComponent } from "@flogeez/angular-tiptap-editor";
69
69
  selector: "app-example",
70
70
  standalone: true,
71
71
  imports: [AngularTiptapEditorComponent],
72
- template: `
73
- <angular-tiptap-editor
74
- [content]="content"
75
- (contentChange)="onContentChange($event)"
76
- />
77
- `,
72
+ template: ` <angular-tiptap-editor [content]="content" (contentChange)="onContentChange($event)" /> `,
78
73
  })
79
74
  export class ExampleComponent {
80
75
  content = "<p>Hello <strong>World</strong>!</p>";
@@ -92,22 +87,14 @@ The editor can be fully configured using a single `[config]` object, which provi
92
87
 
93
88
  ```typescript
94
89
  import { Component } from "@angular/core";
95
- import {
96
- AngularTiptapEditorComponent,
97
- AteEditorConfig,
98
- DEFAULT_TOOLBAR_CONFIG,
99
- } from "@flogeez/angular-tiptap-editor";
90
+ import { AngularTiptapEditorComponent, AteEditorConfig, DEFAULT_TOOLBAR_CONFIG } from "@flogeez/angular-tiptap-editor";
100
91
 
101
92
  @Component({
102
93
  selector: "app-advanced",
103
94
  standalone: true,
104
95
  imports: [AngularTiptapEditorComponent],
105
96
  template: `
106
- <angular-tiptap-editor
107
- [content]="content"
108
- [config]="editorConfig"
109
- (contentChange)="onContentChange($event)"
110
- />
97
+ <angular-tiptap-editor [content]="content" [config]="editorConfig" (contentChange)="onContentChange($event)" />
111
98
  `,
112
99
  })
113
100
  export class AdvancedComponent {
@@ -155,11 +142,7 @@ import { AngularTiptapEditorComponent } from "@flogeez/angular-tiptap-editor";
155
142
  standalone: true,
156
143
  imports: [AngularTiptapEditorComponent],
157
144
  template: `
158
- <angular-tiptap-editor
159
- [content]="content"
160
- [tiptapExtensions]="extensions"
161
- (contentChange)="content = $event"
162
- />
145
+ <angular-tiptap-editor [content]="content" [tiptapExtensions]="extensions" (contentChange)="content = $event" />
163
146
  `,
164
147
  })
165
148
  export class CustomExtensionsComponent {
@@ -190,8 +173,7 @@ import { AngularTiptapEditorComponent } from "@flogeez/angular-tiptap-editor";
190
173
  [formControl]="contentControl"
191
174
  placeholder="Enter your content here..."
192
175
  [showCharacterCount]="true"
193
- [showWordCount]="true"
194
- />
176
+ [showWordCount]="true" />
195
177
  <button type="submit">Submit</button>
196
178
  </form>
197
179
  `,
@@ -244,10 +226,7 @@ export class CommandsComponent {
244
226
 
245
227
  setContent() {
246
228
  if (this.editor) {
247
- this.editorCommandsService.setContent(
248
- this.editor,
249
- "<h1>New Content</h1>",
250
- );
229
+ this.editorCommandsService.setContent(this.editor, "<h1>New Content</h1>");
251
230
  }
252
231
  }
253
232
  }
@@ -274,7 +253,7 @@ If you need to extract complex data (like attributes, depth, or custom logic), y
274
253
  import { StateCalculator } from "@flogeez/angular-tiptap-editor";
275
254
 
276
255
  // This function will be called on every editor update
277
- export const MyCustomCalculator: StateCalculator = (editor) => {
256
+ export const MyCustomCalculator: StateCalculator = editor => {
278
257
  return {
279
258
  custom: {
280
259
  hasHighPriority: editor.isActive("priority"),
@@ -343,7 +322,7 @@ slashCommands: SlashCommandsConfig = {
343
322
  description: "Insert some AI magic",
344
323
  icon: "auto_fix",
345
324
  keywords: ["magic", "ai"],
346
- command: (editor) => editor.commands.insertContent("✨ Magic happened!"),
325
+ command: editor => editor.commands.insertContent("✨ Magic happened!"),
347
326
  },
348
327
  ],
349
328
  };
@@ -372,10 +351,7 @@ The handler can return either an **Observable** or a **Promise**.
372
351
  import { Component, inject } from "@angular/core";
373
352
  import { HttpClient } from "@angular/common/http";
374
353
  import { map } from "rxjs/operators";
375
- import {
376
- AngularTiptapEditorComponent,
377
- ImageUploadHandler,
378
- } from "@flogeez/angular-tiptap-editor";
354
+ import { AngularTiptapEditorComponent, ImageUploadHandler } from "@flogeez/angular-tiptap-editor";
379
355
 
380
356
  @Component({
381
357
  selector: "app-custom-upload",
@@ -385,21 +361,18 @@ import {
385
361
  <angular-tiptap-editor
386
362
  [content]="content"
387
363
  [imageUploadHandler]="uploadHandler"
388
- (contentChange)="onContentChange($event)"
389
- />
364
+ (contentChange)="onContentChange($event)" />
390
365
  `,
391
366
  })
392
367
  export class CustomUploadComponent {
393
368
  private http = inject(HttpClient);
394
369
  content = "";
395
370
 
396
- uploadHandler: ImageUploadHandler = (ctx) => {
371
+ uploadHandler: ImageUploadHandler = ctx => {
397
372
  const formData = new FormData();
398
373
  formData.append("image", ctx.file);
399
374
 
400
- return this.http
401
- .post<{ url: string }>("/api/upload", formData)
402
- .pipe(map((result) => ({ src: result.url })));
375
+ return this.http.post<{ url: string }>("/api/upload", formData).pipe(map(result => ({ src: result.url })));
403
376
  };
404
377
 
405
378
  onContentChange(newContent: string) {
@@ -411,13 +384,11 @@ export class CustomUploadComponent {
411
384
  #### Using Promise (async/await)
412
385
 
413
386
  ```typescript
414
- uploadHandler: ImageUploadHandler = async (ctx) => {
387
+ uploadHandler: ImageUploadHandler = async ctx => {
415
388
  const formData = new FormData();
416
389
  formData.append("image", ctx.file);
417
390
 
418
- const result = await firstValueFrom(
419
- this.http.post<{ url: string }>("/api/upload", formData),
420
- );
391
+ const result = await firstValueFrom(this.http.post<{ url: string }>("/api/upload", formData));
421
392
 
422
393
  return { src: result.url };
423
394
  };
@@ -619,16 +590,8 @@ angular-tiptap-editor {
619
590
  --ate-primary: #2563eb;
620
591
  --ate-primary-contrast: #ffffff;
621
592
  --ate-primary-light: color-mix(in srgb, var(--ate-primary), transparent 90%);
622
- --ate-primary-lighter: color-mix(
623
- in srgb,
624
- var(--ate-primary),
625
- transparent 95%
626
- );
627
- --ate-primary-light-alpha: color-mix(
628
- in srgb,
629
- var(--ate-primary),
630
- transparent 85%
631
- );
593
+ --ate-primary-lighter: color-mix(in srgb, var(--ate-primary), transparent 95%);
594
+ --ate-primary-light-alpha: color-mix(in srgb, var(--ate-primary), transparent 85%);
632
595
 
633
596
  --ate-surface: #ffffff;
634
597
  --ate-surface-secondary: #f8f9fa;