@kolkov/angular-editor 3.0.0-beta.1 → 3.0.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.
Files changed (35) hide show
  1. package/CHANGELOG.md +57 -1
  2. package/README.md +75 -16
  3. package/assets/icons/icons.svg +2 -2
  4. package/fesm2022/kolkov-angular-editor.mjs +1360 -0
  5. package/fesm2022/kolkov-angular-editor.mjs.map +1 -0
  6. package/index.d.ts +412 -0
  7. package/package.json +10 -16
  8. package/themes/default.scss +22 -0
  9. package/esm2020/kolkov-angular-editor.mjs +0 -5
  10. package/esm2020/lib/ae-button/ae-button.component.mjs +0 -21
  11. package/esm2020/lib/ae-select/ae-select.component.mjs +0 -185
  12. package/esm2020/lib/ae-toolbar-set/ae-toolbar-set.component.mjs +0 -14
  13. package/esm2020/lib/angular-editor-toolbar.component.mjs +0 -365
  14. package/esm2020/lib/angular-editor.component.mjs +0 -415
  15. package/esm2020/lib/angular-editor.module.mjs +0 -27
  16. package/esm2020/lib/angular-editor.service.mjs +0 -275
  17. package/esm2020/lib/config.mjs +0 -36
  18. package/esm2020/lib/utils.mjs +0 -4
  19. package/esm2020/public-api.mjs +0 -11
  20. package/fesm2015/kolkov-angular-editor.mjs +0 -1324
  21. package/fesm2015/kolkov-angular-editor.mjs.map +0 -1
  22. package/fesm2020/kolkov-angular-editor.mjs +0 -1318
  23. package/fesm2020/kolkov-angular-editor.mjs.map +0 -1
  24. package/kolkov-angular-editor.d.ts +0 -5
  25. package/lib/ae-button/ae-button.component.d.ts +0 -7
  26. package/lib/ae-select/ae-select.component.d.ts +0 -46
  27. package/lib/ae-toolbar-set/ae-toolbar-set.component.d.ts +0 -6
  28. package/lib/angular-editor-toolbar.component.d.ts +0 -97
  29. package/lib/angular-editor.component.d.ts +0 -133
  30. package/lib/angular-editor.module.d.ts +0 -13
  31. package/lib/angular-editor.service.d.ts +0 -87
  32. package/lib/config.d.ts +0 -39
  33. package/lib/utils.d.ts +0 -1
  34. package/public-api.d.ts +0 -8
  35. package/src/lib/style.scss +0 -290
package/CHANGELOG.md CHANGED
@@ -1,5 +1,61 @@
1
+ <a name="3.0.0"></a>
2
+ ## [3.0.0](https://github.com/kolkov/angular-editor/compare/v2.0.0...v3.0.0) (2025-11-22) Major Angular 20 Upgrade
3
+
4
+ 🎉 **Stable Release** - Production Ready!
5
+
6
+ ### Breaking Changes
7
+ * **Angular Version:** Minimum required version is now Angular 20.0.0
8
+ * **RxJS:** Requires RxJS 7.8.0 or higher (upgraded from 6.5.5)
9
+ * **TypeScript:** Requires TypeScript 5.4 or higher
10
+ * **zone.js:** Updated to 0.15.1
11
+
12
+ ### Features
13
+ * **Angular 20 Support:** Full compatibility with Angular 20.3.13 (v20-lts)
14
+ * **Angular 21 Ready:** Forward compatible with Angular 21.x
15
+ * **Modern Build System:** Updated to latest ng-packagr 20.3.2
16
+ * **Enhanced Type Safety:** Improved TypeScript strict mode compliance
17
+ * **Font Awesome Removed:** No external icon dependencies - using pure SVG icons (27 icons)
18
+ * **Zero External Icon Dependencies:** Fully self-contained icon system
19
+
20
+ ### Migration Path
21
+ * Migrated through: Angular 13 → 18 → 19 → 20
22
+ * All Angular CLI migrations applied successfully
23
+ * Updated DOCUMENT import from @angular/core (Angular 20 requirement)
24
+ * Modernized test infrastructure (waitForAsync)
25
+
26
+ ### Developer Experience
27
+ * **ESLint:** Updated to @angular-eslint 20.x
28
+ * **Linting:** All files pass linting (0 errors)
29
+ * **Build:** Both development and production builds verified
30
+ * **Tests:** 13/13 tests passing (100% success rate)
31
+
32
+ ### Bug Fixes
33
+ * **Icons:** Fixed list icons (unordered/ordered) display consistency in toolbar
34
+ * **Tests:** Fixed AeSelectComponent tests for mousedown event handling
35
+ * **Demo:** Updated demo app for Angular 20 compatibility
36
+
37
+ ### Technical Details
38
+ * Removed deprecated `async` test helper (use `waitForAsync`)
39
+ * Fixed TypeScript strict type checking for event handlers
40
+ * Disabled new strict rules for backward compatibility (prefer-standalone, prefer-inject)
41
+ * Updated moduleResolution to 'bundler' (Angular 20 standard)
42
+
43
+ ### Peer Dependencies
44
+ ```json
45
+ {
46
+ "@angular/common": "^20.0.0 || ^21.0.0",
47
+ "@angular/core": "^20.0.0 || ^21.0.0",
48
+ "@angular/forms": "^20.0.0 || ^21.0.0",
49
+ "rxjs": "^7.8.0"
50
+ }
51
+ ```
52
+
53
+ <a name="3.0.0-beta.2"></a>
54
+ ## [3.0.0-beta.2](https://github.com/kolkov/angular-editor/compare/v3.0.0-beta.1...v3.0.0-beta.2) (2025-01-10)
55
+ * Refactor ae-select component (button → span)
56
+
1
57
  <a name="2.0.0"></a>
2
- ## [1.0.2](https://github.com/kolkov/angular-editor/compare/v1.2.0...v2.0.0) (2022-01-06) Majore release
58
+ ## [2.0.0](https://github.com/kolkov/angular-editor/compare/v1.2.0...v2.0.0) (2022-01-06) Major release
3
59
  * Update to Angular v.13 and new Ivy compatible package format
4
60
 
5
61
  <a name="1.0.2"></a>
package/README.md CHANGED
@@ -1,18 +1,18 @@
1
1
  <p align="center">
2
- <img width="150px" src="https://raw.githubusercontent.com/kolkov/angular-editor/master/docs/angular-editor-logo.png?raw=true" alt="AngularEditor logo"/>
2
+ <img width="150px" src="https://raw.githubusercontent.com/kolkov/angular-editor/main/docs/angular-editor-logo.png?raw=true" alt="AngularEditor logo"/>
3
3
  </p>
4
4
 
5
5
  # AngularEditor
6
6
  [![npm version](https://badge.fury.io/js/%40kolkov%2Fangular-editor.svg)](https://badge.fury.io/js/%40kolkov%2Fangular-editor)
7
7
  [![demo](https://img.shields.io/badge/demo-StackBlitz-blueviolet.svg)](https://stackblitz.com/edit/angular-editor-wysiwyg)
8
- [![Build Status](https://travis-ci.com/kolkov/angular-editor.svg?branch=master)](https://travis-ci.com/kolkov/angular-editor)
8
+ [![Build Status](https://travis-ci.com/kolkov/angular-editor.svg?branch=main)](https://travis-ci.com/kolkov/angular-editor)
9
9
  [![npm](https://img.shields.io/npm/dm/@kolkov/angular-editor.svg)](https://www.npmjs.com/package/@kolkov/angular-editor)
10
10
  [![](https://data.jsdelivr.com/v1/package/npm/@kolkov/angular-editor/badge?style=rounded)](https://www.jsdelivr.com/package/npm/@kolkov/angular-editor)
11
- [![Coverage Status](https://coveralls.io/repos/github/kolkov/angular-editor/badge.svg?branch=master)](https://coveralls.io/github/kolkov/angular-editor?branch=master)
12
- [![codecov](https://codecov.io/gh/kolkov/angular-editor/branch/master/graph/badge.svg)](https://codecov.io/gh/kolkov/angular-editor)
11
+ [![Coverage Status](https://coveralls.io/repos/github/kolkov/angular-editor/badge.svg?branch=main)](https://coveralls.io/github/kolkov/angular-editor?branch=main)
12
+ [![codecov](https://codecov.io/gh/kolkov/angular-editor/branch/main/graph/badge.svg)](https://codecov.io/gh/kolkov/angular-editor)
13
13
  [![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://paypal.me/AndreyKolkov)
14
14
 
15
- A simple native WYSIWYG/Rich Text editor for Angular 6-19+
15
+ A simple native WYSIWYG/Rich Text editor for Angular 20+
16
16
 
17
17
  ![Nov-27-2019 17-26-29](https://user-images.githubusercontent.com/216412/69763434-259cd800-113b-11ea-918f-0565ebce0e48.gif)
18
18
 
@@ -30,15 +30,22 @@ Install via [npm][npm] package manager
30
30
  npm install @kolkov/angular-editor --save
31
31
  ```
32
32
  ### Versions
33
- 3.0.0 and above - for Angular v13+ (removed Font Awesome icons deps)
33
+ 3.0.0 and above - for Angular v20+ (CSS variables, modern Angular 20)
34
34
 
35
- 2.0.0 and above - for Angular v13.0.0 and above
35
+ 2.0.0 and above - for Angular v13-19
36
36
 
37
- 1.0.0 and above - for Angular v8.x.x and above
37
+ 1.0.0 and above - for Angular v8-12
38
38
 
39
39
  0.18.4 and above - for Angular v7.x.x
40
40
 
41
- 0.15.x - for Angular v6.x.x
41
+ 0.15.x - for Angular v6.x.x
42
+
43
+ **Note:** Version 3.0.0 requires:
44
+ - Angular 20.0.0 or higher (also compatible with Angular 21)
45
+ - RxJS 7.8.0 or higher
46
+ - TypeScript 5.4 or higher
47
+
48
+ Attention! `alpha` and `beta` versions may contain breaking changes.
42
49
 
43
50
  ### Usage
44
51
 
@@ -127,7 +134,7 @@ editorConfig: AngularEditorConfig = {
127
134
  ```
128
135
  For `ngModel` to work, you must import `FormsModule` from `@angular/forms`, or for `formControlName`, you must import `ReactiveFormsModule` from `@angular/forms`
129
136
 
130
- To serve the icons file, ensure that your angular.json contains the following asset configuration:
137
+ To serve the icons file, ensure that your `angular.json` contains the following asset configuration:
131
138
 
132
139
  ```
133
140
  {
@@ -137,17 +144,69 @@ To serve the icons file, ensure that your angular.json contains the following as
137
144
  }
138
145
  ```
139
146
 
147
+ ### Styling
148
+
149
+ Connect default theme file to your `angular.json` or `nx.json`
150
+ ```
151
+ "styles": [
152
+ "projects/angular-editor-app/src/styles.scss",
153
+ "node_modules/@kolkov/angular-editor/themes/default.scss"
154
+ ],
155
+ ```
156
+ or `@include` or `@use` in your project `styles.scss` file, and then override default theme variables like this:
157
+ ```scss
158
+ :root {
159
+ --ae-gap: 5px;
160
+ --ae-text-area-border: 1px solid #ddd;
161
+ --ae-text-area-border-radius: 0;
162
+ --ae-focus-outline-color: #afaeae auto 1px;
163
+ --ae-toolbar-padding: 1px;
164
+ --ae-toolbar-bg-color: #b3dca0;
165
+ --ae-toolbar-border-radius: 1px solid #ddd;
166
+ --ae-button-bg-color: #dadad7;
167
+ --ae-button-border: 3px solid #3fb74e;
168
+ --ae-button-radius: 5px;
169
+ --ae-button-hover-bg-color: #3fb74e;
170
+ --ae-button-active-bg-color: red;
171
+ --ae-button-active-hover-bg-color: blue;
172
+ --ae-button-disabled-bg-color: gray;
173
+ --ae-picker-label-color: rgb(78, 84, 155);
174
+ --ae-picker-icon-bg-color: rgb(34, 41, 122);
175
+ --ae-picker-option-bg-color: rgba(221, 221, 84, 0.76);
176
+ --ae-picker-option-active-bg-color: rgba(237, 237, 62, 0.9);
177
+ --ae-picker-option-focused-bg-color: rgb(255, 255, 0);
178
+ }
179
+ ```
180
+
140
181
  ### Custom buttons
141
182
 
142
183
  You can define your custom buttons with custom actions using executeCommandFn. It accepts commands from [execCommand](https://developer.mozilla.org/en-US/docs/Web/API/Document/execCommand).
143
184
  The first argument of this method is aCommandName and the second argument is aValueArgument. Example shows a button that adds Angular editor logo into the editor.
144
185
  ```html
145
- <angular-editor id="editor1" formControlName="htmlContent1" [config]="editorConfig">
186
+ <angular-editor id="editor1" [(ngModel)]="htmlContent1" [config]="config1" (ngModelChange)="onChange($event)"
187
+ (blur)="onBlur($event)">
146
188
  <ng-template #customButtons let-executeCommandFn="executeCommandFn">
147
189
  <ae-toolbar-set>
148
- <ae-button iconClass="fa fa-html5" title="Angular editor logo"
149
- (buttonClick)="executeCommandFn('insertHtml', angularEditorLogo)">
150
- </ae-button>
190
+ <button aeButton title="Angular editor logo" (click)="executeCommandFn('insertHtml', angularEditorLogo)">
191
+ <svg viewBox="-8 0 272 272" xmlns="http://www.w3.org/2000/svg"
192
+ preserveAspectRatio="xMidYMid" fill="#000000">
193
+ <g id="SVGRepo_bgCarrier" stroke-width="0"></g>
194
+ <g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g>
195
+ <g id="SVGRepo_iconCarrier">
196
+ <g>
197
+ <path
198
+ d="M0.0996108949,45.522179 L125.908171,0.697276265 L255.103502,44.7252918 L234.185214,211.175097 L125.908171,271.140856 L19.3245136,211.971984 L0.0996108949,45.522179 Z"
199
+ fill="#E23237"></path>
200
+ <path
201
+ d="M255.103502,44.7252918 L125.908171,0.697276265 L125.908171,271.140856 L234.185214,211.274708 L255.103502,44.7252918 L255.103502,44.7252918 Z"
202
+ fill="#B52E31"></path>
203
+ <path
204
+ d="M126.107393,32.27393 L126.107393,32.27393 L47.7136187,206.692607 L76.9992218,206.194553 L92.7377432,166.848249 L126.207004,166.848249 L126.306615,166.848249 L163.063035,166.848249 L180.29572,206.692607 L208.286381,207.190661 L126.107393,32.27393 L126.107393,32.27393 Z M126.306615,88.155642 L152.803113,143.5393 L127.402335,143.5393 L126.107393,143.5393 L102.997665,143.5393 L126.306615,88.155642 L126.306615,88.155642 Z"
205
+ fill="#FFFFFF"></path>
206
+ </g>
207
+ </g>
208
+ </svg>
209
+ </button>
151
210
  </ae-toolbar-set>
152
211
  </ng-template>
153
212
  </angular-editor>
@@ -269,9 +328,9 @@ Icons from Ligature Symbols Icons Collection [icons]
269
328
 
270
329
  ## Contributing
271
330
 
272
- Please read through our [contributing guidelines](https://github.com/kolkov/angular-editor/blob/master/CONTRIBUTING.md). Included are directions for opening issues, coding standards, and notes on development.
331
+ Please read through our [contributing guidelines](https://github.com/kolkov/angular-editor/blob/main/CONTRIBUTING.md). Included are directions for opening issues, coding standards, and notes on development.
273
332
 
274
- Editor preferences are available in the [editor config](https://github.com/kolkov/angular-editor/blob/master/.editorconfig) for easy use in common text editors. Read more and download plugins at <http://editorconfig.org>.
333
+ Editor preferences are available in the [editor config](https://github.com/kolkov/angular-editor/blob/main/.editorconfig) for easy use in common text editors. Read more and download plugins at <http://editorconfig.org>.
275
334
 
276
335
  ## Versioning
277
336
 
@@ -77,13 +77,13 @@
77
77
  <path d="M18.2 14.8L17.5 15.5L14 12L17.5 8.5L18.2 9.2L15.4 12L18.2 14.8Z" fill="#000000"></path>
78
78
  </symbol>
79
79
  <symbol id="unorderedList" viewBox="0 0 16 16">
80
- <g id="SVGRepo_iconCarrier">
80
+ <g id="SVGRepo_iconCarrier" transform="translate(1.6 1.6) scale(0.8)">
81
81
  <rect width="16" height="16" id="icon-bound" fill="none"></rect>
82
82
  <path d="M4,3v2h12V3H4z M0,5h2V3H0V5z M4,9h12V7H4V9z M0,9h2V7H0V9z M4,13h12v-2H4V13z M0,13h2v-2H0V13z"></path>
83
83
  </g>
84
84
  </symbol>
85
85
  <symbol id="orderedList" viewBox="0 0 16 16">
86
- <g id="SVGRepo_iconCarrier">
86
+ <g id="SVGRepo_iconCarrier" transform="translate(1.6 1.6) scale(0.8)">
87
87
  <rect width="16" height="16" id="icon-bound" fill="none"></rect>
88
88
  <path id="list-numbered"
89
89
  d="M0,10l0,-1l2,0c0.552,0 1,0.448 1,1l0,1c-0,0.552 -0.448,1 -1,1l-0.75,0c-0.066,-0 -0.13,0.026 -0.177,0.073c-0.047,0.047 -0.073,0.111 -0.073,0.177c0,0.153 0,0.347 0,0.5c-0,0.066 0.026,0.13 0.073,0.177c0.047,0.047 0.111,0.073 0.177,0.073l1.75,0l0,1l-2,0c-0.552,-0 -1,-0.448 -1,-1l0,-1c0,-0.552 0.448,-1 1,-1l0.75,-0c0.066,0 0.13,-0.026 0.177,-0.073c0.047,-0.047 0.073,-0.111 0.073,-0.177c0,-0.153 0,-0.347 0,-0.5c0,-0.066 -0.026,-0.13 -0.073,-0.177c-0.047,-0.047 -0.111,-0.073 -0.177,-0.073l-1.75,0Zm4,1l12,0l0,2l-12,0l0,-2Zm0,-4l12,0l0,2l-12,0l0,-2Zm-3,-3.75c0,-0.066 -0.026,-0.13 -0.073,-0.177c-0.047,-0.047 -0.111,-0.073 -0.177,-0.073l-0.75,0l0,-1l1,0c0.552,0 1,0.448 1,1c-0,1.185 0,4 0,4l-1,0l0,-3.75Zm3,-0.25l12,0l0,2l-12,0l0,-2Z"></path>