Skip to content

Commit 6d409aa

Browse files
INT-3350: Update to work with TinyMCE 8 (#596)
1 parent f5a9520 commit 6d409aa

File tree

9 files changed

+26
-17
lines changed

9 files changed

+26
-17
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+
- Set the default `cloudChannel` to `8`. #INT-3350
11+
912
## 6.2.1 - 2025-06-03
1013

1114
### Fixed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44

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

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

1212

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/#reporting-tinymce-security-issues).
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/#reporting-tinymce-security-issues).

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"peerDependencies": {
3232
"react": "^19.0.0 || ^18.0.0 || ^17.0.1 || ^16.7.0",
3333
"react-dom": "^19.0.0 || ^18.0.0 || ^17.0.1 || ^16.7.0",
34-
"tinymce": "^7.0.0 || ^6.0.0 || ^5.5.1"
34+
"tinymce": "^8.0.0 || ^7.0.0 || ^6.0.0 || ^5.5.1"
3535
},
3636
"peerDependenciesMeta": {
3737
"tinymce": {
@@ -68,12 +68,13 @@
6868
"react-dom": "^19.0.0",
6969
"rimraf": "^6.0.1",
7070
"storybook": "^8.6.4",
71-
"tinymce": "^7",
71+
"tinymce": "^8.0.1",
7272
"tinymce-4": "npm:tinymce@^4",
7373
"tinymce-5": "npm:tinymce@^5",
7474
"tinymce-6": "npm:tinymce@^6",
7575
"tinymce-7": "npm:tinymce@^7",
7676
"tinymce-7.5": "npm:[email protected]",
77+
"tinymce-8": "npm:tinymce@^8.0.0",
7778
"typescript": "~5.8.2",
7879
"vite": "^6.2.1"
7980
},

src/main/ts/components/Editor.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export type InitOptions = Omit<OmitStringIndexSignature<EditorOptions>, OmittedI
2929
license_key?: DoNotUse<'license_key prop is overridden by the integration, use the `licenseKey` prop instead'>;
3030
} & { [key: string]: unknown };
3131

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

3434
export interface IProps {
3535
/**
@@ -150,7 +150,7 @@ export class Editor extends React.Component<IAllProps> {
150150
public static propTypes: IEditorPropTypes = EditorPropTypes;
151151

152152
public static defaultProps: Partial<IAllProps> = {
153-
cloudChannel: '7',
153+
cloudChannel: '8',
154154
};
155155

156156
public editor?: TinyMCEEditor;

src/test/ts/alien/Loader.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ export const render = async (props: Partial<IAllProps> = {}, container: HTMLElem
6969
* touch the nodes created by TinyMCE. Since this only seems to be an issue when rendering TinyMCE 4 directly
7070
* into a root and a fix would be a breaking change, let's just wrap the editor in a <div> here for now.
7171
*/
72-
root.render(<div><Editor ref={ref} apiKey='no-api-key' {...props} init={init} /></div>);
72+
root.render(<div><Editor ref={ref} apiKey='no-api-key' {...props} init={init} licenseKey='gpl'/></div>);
7373
});
7474

7575
const remove = () => {
@@ -81,7 +81,7 @@ export const render = async (props: Partial<IAllProps> = {}, container: HTMLElem
8181
...ctx,
8282
/** By rendering the Editor into the same root, React will perform a diff and update. */
8383
reRender: (newProps: IAllProps) => new Promise<void>((resolve) => {
84-
root.render(<div><Editor apiKey='no-api-key' ref={ctx.ref} {...newProps} /></div>);
84+
root.render(<div><Editor apiKey='no-api-key' ref={ctx.ref} {...newProps}/></div>);
8585

8686
if (newProps.disabled) {
8787
setMode(ctx.editor, 'readonly');

src/test/ts/alien/TestHelpers.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ interface EventHandlerArgs<T> {
1010

1111
type HandlerType<A> = (a: A, editor: TinyMCEEditor) => unknown;
1212

13-
const VERSIONS: Version[] = [ '4', '5', '6', '7' ];
14-
const CLOUD_VERSIONS: Version[] = [ '5', '6', '7' ];
13+
const VERSIONS: Version[] = [ '5', '6', '7', '8' ];
14+
const CLOUD_VERSIONS: Version[] = [ '5', '6', '7', '8' ];
1515

1616
const VALID_API_KEY = 'qagffr3pkuv17a8on1afax661irst1hbr4e6tbv888sz91jc';
1717

src/test/ts/browser/EditorBehaviorTest.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ describe('EditorBehaviourTest', () => {
1717
// INT-2278: This test currently times out in IE so we are skipping it
1818
return;
1919
}
20-
const versionRegex = /6|7/;
20+
const versionRegex = /6|7|8/;
2121

2222
const isEditor = (val: unknown): val is TinyMCEEditor => {
2323
const tinymce = getTinymce(window);

yarn.lock

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8715,10 +8715,15 @@ tiny-invariant@^1.3.1, tiny-invariant@^1.3.3:
87158715
resolved "https://registry.yarnpkg.com/tinymce/-/tinymce-7.8.0.tgz#d57a597aecdc2108f2dd68fe74c6099c0a0ef66f"
87168716
integrity sha512-MUER5MWV9mkOB4expgbWknh/C5ZJvOXQlMVSx4tJxTuYtcUCDB6bMZ34fWNOIc8LvrnXmGHGj0eGQuxjQyRgrA==
87178717

8718-
tinymce@^7:
8719-
version "7.8.0"
8720-
resolved "https://registry.yarnpkg.com/tinymce/-/tinymce-7.8.0.tgz#d57a597aecdc2108f2dd68fe74c6099c0a0ef66f"
8721-
integrity sha512-MUER5MWV9mkOB4expgbWknh/C5ZJvOXQlMVSx4tJxTuYtcUCDB6bMZ34fWNOIc8LvrnXmGHGj0eGQuxjQyRgrA==
8718+
"tinymce-8@npm:tinymce@^8.0.0":
8719+
version "8.0.1"
8720+
resolved "https://registry.yarnpkg.com/tinymce/-/tinymce-8.0.1.tgz#268903624c44be574c72daeedcf8ae36bf37f0ba"
8721+
integrity sha512-KQ/+KaWmkIzSkNCYmqhXD2mftt+EEhz1bd1QCVopa2DNkoJ/rYFXhMnYGg1gVcRQa43xkmmv0Jj0ph+05VY0hQ==
8722+
8723+
tinymce@^8.0.1:
8724+
version "8.0.1"
8725+
resolved "https://registry.yarnpkg.com/tinymce/-/tinymce-8.0.1.tgz#268903624c44be574c72daeedcf8ae36bf37f0ba"
8726+
integrity sha512-KQ/+KaWmkIzSkNCYmqhXD2mftt+EEhz1bd1QCVopa2DNkoJ/rYFXhMnYGg1gVcRQa43xkmmv0Jj0ph+05VY0hQ==
87228727

87238728
tinyrainbow@^1.2.0:
87248729
version "1.2.0"

0 commit comments

Comments
 (0)