Skip to content

Commit 69860c8

Browse files
INT-3351: Update to use TinyMCE 8 (#421)
* TINY-3351: Update for TinyMCE 8 * INT-3351: Temporarily use tinymce 7 to pass the build * INT-3351: Fix failing test * Put support versions list in a table for beter clarity * Add gpl licenceKey to tests * Add a changelog entry * Update peerDependencies
1 parent 07ad655 commit 69860c8

File tree

16 files changed

+44
-50
lines changed

16 files changed

+44
-50
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## Unreleased
88

9+
### Changed
10+
- Defaulted cloudChannel to `8`. #INT-3351
11+
912
## 9.0.0 - 2025-05-29
1013

1114
### Added

README.md

Lines changed: 11 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -4,34 +4,21 @@
44

55
This package is a thin wrapper around [TinyMCE](https://github.com/tinymce/tinymce) to make it easier to use in an Angular application.
66

7-
* If you need detailed documentation on TinyMCE, see: [TinyMCE Documentation](https://www.tiny.cloud/docs/tinymce/7/).
8-
* For the TinyMCE Angular Quick Start, see: [TinyMCE Documentation - Angular Integration](https://www.tiny.cloud/docs/tinymce/7/angular-cloud/).
9-
* For the TinyMCE Angular Technical Reference, see: [TinyMCE Documentation - TinyMCE Angular Technical Reference](https://www.tiny.cloud/docs/tinymce/7/angular-ref/).
7+
* If you need detailed documentation on TinyMCE, see: [TinyMCE Documentation](https://www.tiny.cloud/docs/tinymce/latest/).
8+
* For the TinyMCE Angular Quick Start, see: [TinyMCE Documentation - Angular Integration](https://www.tiny.cloud/docs/tinymce/latest/angular-cloud/).
9+
* For the TinyMCE Angular Technical Reference, see: [TinyMCE Documentation - TinyMCE Angular Technical Reference](https://www.tiny.cloud/docs/tinymce/latest/angular-ref/).
1010
* For our quick demos, check out the TinyMCE Angular [Storybook](https://tinymce.github.io/tinymce-angular/).
1111

1212
### Support
1313

14-
For Angular 16+, use integration version 8.x:
15-
16-
`npm install @tinymce/tinymce-angular@^8`
17-
18-
For Angular 14+, use integration version 7.x:
19-
20-
`npm install @tinymce/tinymce-angular@^7`
21-
22-
For Angular 13+, use integration version 6.x:
23-
24-
`npm install @tinymce/tinymce-angular@^6`
25-
26-
For Angular 9+, use integration version 4.x:
27-
28-
`npm install @tinymce/tinymce-angular@^4`
29-
30-
For Angular 8 and below use integration version 3.x:
31-
32-
`npm install @tinymce/tinymce-angular@^3`
33-
34-
Versions below Angular 5 are not supported.
14+
|Angular version|`tinymce-angular` version|
15+
|--- |--- |
16+
|16+ |8+ |
17+
|14+ |7.x |
18+
|13+ |6.x |
19+
|9+ |4.x |
20+
|<= 8 |3.x |
21+
|< 5 | Not supported |
3522

3623
### Issues
3724

SECURITY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
## Reporting a Vulnerability
44

5-
For details on how to report security issues to Tiny, refer to the [Reporting TinyMCE security issues documentation](https://www.tiny.cloud/docs/tinymce/6/security/#reportingtinymcesecurityissues).
5+
For details on how to report security issues to Tiny, refer to the [Reporting TinyMCE security issues documentation](https://www.tiny.cloud/docs/tinymce/latest/security/#reportingtinymcesecurityissues).

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,13 @@
6262
"rimraf": "^6.0.1",
6363
"rxjs": "^7.8.1",
6464
"storybook": "^8.2.5",
65-
"tinymce": "^7",
65+
"tinymce": "^8.0.0",
6666
"tinymce-4": "npm:tinymce@^4",
6767
"tinymce-5": "npm:tinymce@^5",
6868
"tinymce-6": "npm:tinymce@^6",
6969
"tinymce-7": "npm:tinymce@^7",
7070
"tinymce-7.5.0": "npm:[email protected]",
71+
"tinymce-8": "npm:tinymce@^8",
7172
"to-string-loader": "^1.1.5",
7273
"tslib": "^2.6.2",
7374
"typescript": "~5.5.4",

stories/Editor.stories.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ export const IframeStory: StoryObj<EditorComponent> = {
3232
height: 300,
3333
plugins: 'help',
3434
},
35-
cloudChannel: '6-dev',
3635
}
3736
};
3837

@@ -44,7 +43,7 @@ export const InlineStory: StoryObj<EditorComponent> = {
4443
<editor apiKey="${apiKey}" inline initialValue='${sampleContent}'></editor>
4544
</div>
4645
`
47-
}),
46+
})
4847
};
4948

5049
export const EventBindingStory: StoryObj<EditorComponent> = {
@@ -55,8 +54,7 @@ export const EventBindingStory: StoryObj<EditorComponent> = {
5554
declarations: [ EventBindingComponent ],
5655
},
5756
template: `<event-binding/>`
58-
}),
59-
57+
})
6058
};
6159

6260
export const EventForwardingStory: StoryObj<EditorComponent> = {

tinymce-angular-component/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"@angular/common": ">=16.0.0",
1212
"@angular/forms": ">=16.0.0",
1313
"rxjs": "^7.4.0",
14-
"tinymce": "^7.0.0 || ^6.0.0 || ^5.5.0"
14+
"tinymce": "^8.0.0 || ^7.0.0 || ^6.0.0 || ^5.5.0"
1515
},
1616
"peerDependenciesMeta": {
1717
"tinymce": {

tinymce-angular-component/src/main/ts/editor/editor.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ const EDITOR_COMPONENT_VALUE_ACCESSOR = {
3434
multi: true
3535
};
3636

37-
export type Version = `${'4' | '5' | '6' | '7'}${'' | '-dev' | '-testing' | `.${number}` | `.${number}.${number}`}`;
37+
export type Version = `${'4' | '5' | '6' | '7' | '8'}${'' | '-dev' | '-testing' | `.${number}` | `.${number}.${number}`}`;
3838

3939
@Component({
4040
selector: 'editor',
@@ -51,7 +51,7 @@ export type Version = `${'4' | '5' | '6' | '7'}${'' | '-dev' | '-testing' | `.${
5151
*/
5252
export class EditorComponent extends Events implements AfterViewInit, ControlValueAccessor, OnDestroy {
5353

54-
@Input() public cloudChannel: Version = '7';
54+
@Input() public cloudChannel: Version = '8';
5555
@Input() public apiKey = 'no-api-key';
5656
@Input() public licenseKey?: string;
5757
@Input() public init?: EditorOptions;

tinymce-angular-component/src/test/ts/alien/TestHooks.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ export const editorHook = <T = unknown>(component: Type<T>, moduleDef: TestModul
6262
.map((v): EditorComponent => v.componentInstance)
6363
.getOrDie('EditorComponent instance not found');
6464

65-
for (const [ key, value ] of Object.entries(props)) {
65+
for (const [ key, value ] of Object.entries({ ...props, licenseKey: 'gpl' })) {
6666
(editorComponent as any)[key] = value;
6767
}
6868

tinymce-angular-component/src/test/ts/browser/DisabledPropertyTest.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ describe('DisabledPropertyTest', () => {
2323
const assertDisabledOption = (editor: Editor, expected: boolean) =>
2424
Assertions.assertEq(`TinyMCE should have disabled option set to ${expected}`, expected, editor.options.get('disabled'));
2525

26-
eachVersionContext([ '5', '6', '7.5.0', ], () => {
26+
eachVersionContext([ '5', '6', '7.5.0' ], () => {
2727
const createFixture = editorHook(EditorComponent);
2828

2929
it(`Component 'disabled' property is mapped to editor 'readonly' mode`, async () => {
@@ -77,7 +77,7 @@ describe('DisabledPropertyTest', () => {
7777
});
7878
});
7979

80-
eachVersionContext([ '7' ], () => {
80+
eachVersionContext([ '7', '8' ], () => {
8181
const createFixture = editorHook(EditorComponent);
8282

8383
it(`Component 'disabled' property is mapped to editor 'disabled' property`, async () => {
@@ -88,7 +88,7 @@ describe('DisabledPropertyTest', () => {
8888
});
8989

9090
it(`Toggling component's 'disabled' property is mapped to editor 'disabled' option`, async () => {
91-
const fixture = await createFixture();
91+
const fixture = await createFixture({});
9292
const { editor } = fixture;
9393

9494
assertDesignMode(editor);

tinymce-angular-component/src/test/ts/browser/EventBlacklistingTest.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ describe('EventBlacklistingTest', () => {
1616
tap(() => Assertions.assertEq('Subscribers to events should run within NgZone', true, NgZone.isInAngularZone()))
1717
);
1818

19-
eachVersionContext([ '4', '5', '6', '7' ], () => {
19+
eachVersionContext([ '4', '5', '6', '7', '8' ], () => {
2020
const createFixture = editorHook(EditorComponent);
2121

2222
it('Events should be bound when allowed', async () => {

0 commit comments

Comments
 (0)