Skip to content

Commit ce5ed14

Browse files
committed
TINY-3351: Update for TinyMCE 8
1 parent 07ad655 commit ce5ed14

File tree

11 files changed

+16
-14
lines changed

11 files changed

+16
-14
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@
6868
"tinymce-6": "npm:tinymce@^6",
6969
"tinymce-7": "npm:tinymce@^7",
7070
"tinymce-7.5.0": "npm:[email protected]",
71+
"tinymce-8": "file:./../tinymce/dist/tinymce_8.0.0_component",
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/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/browser/DisabledPropertyTest.ts

Lines changed: 2 additions & 2 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 () => {

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 () => {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ describe('FormControlTest', () => {
2121
}
2222
};
2323

24-
eachVersionContext([ '4', '5', '6', '7' ], () => {
24+
eachVersionContext([ '4', '5', '6', '7', '8' ], () => {
2525
[ ChangeDetectionStrategy.Default, ChangeDetectionStrategy.OnPush ].forEach((changeDetection) => {
2626
context(`[formControl] with change detection: ${changeDetection}`, () => {
2727
@Component({

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ describe('LoadTinyTest', () => {
1616
Assertions.assertEq(`Loaded version of TinyMCE should be ${version}`, version, Global.tinymce.majorVersion);
1717
};
1818

19-
for (const version of [ '4', '5', '6', '7' ] as Version[]) {
19+
for (const version of [ '4', '5', '6', '7', '8' ] as Version[]) {
2020
context(`With local version ${version}`, () => {
2121
const createFixture = editorHook(EditorComponent, {
2222
providers: [

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ describe('NgModelTest', () => {
1515
Assertions.assertEq('assert ngModel ' + prop + ' state', expected, ngModel[prop]);
1616
};
1717

18-
eachVersionContext([ '4', '5', '6', '7' ], () => {
18+
eachVersionContext([ '4', '5', '6', '7', '8' ], () => {
1919
@Component({
2020
standalone: true,
2121
imports: [ EditorComponent, FormsModule ],

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { first } from 'rxjs';
1010
import { throwTimeout } from '../alien/TestHelpers';
1111

1212
describe('NgZoneTest', () => {
13-
eachVersionContext([ '4', '5', '6', '7' ], () => {
13+
eachVersionContext([ '4', '5', '6', '7', '8' ], () => {
1414
const createFixture = fixtureHook(EditorComponent, { imports: [ EditorComponent ] });
1515

1616
it('Subscribers to events should run within NgZone', async () => {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ describe('PropTest', () => {
4242
)
4343
);
4444

45-
eachVersionContext([ '4', '5', '6', '7' ], () => {
45+
eachVersionContext([ '4', '5', '6', '7', '8' ], () => {
4646
context('Single editor with ID', () => {
4747
@Component({
4848
standalone: true,

0 commit comments

Comments
 (0)