Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 0 additions & 41 deletions .eslintrc.json

This file was deleted.

7 changes: 5 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## Unreleased

## 2.2.0 - 2025-07-31
## 2.2.0 - 2025-10-16

### Fixed
- Editor initialization failure handling. #INT-3365

### Changed
- Set the default cloudChannel to 8
- Set the default cloudChannel to 8. #INT-3357

## 2.1.0 - 2023-03-27

Expand Down
53 changes: 53 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
// eslint.config.js
import { defineConfig } from 'eslint/config';
import tinymceEslintPlugin from '@tinymce/eslint-plugin';
import js from '@eslint/js';

export default defineConfig([
{
files: [
"**/*.ts"
],
plugins: {
"@tinymce": tinymceEslintPlugin
},
extends: [ '@tinymce/standard' ],
languageOptions: {
parserOptions: {
sourceType: "module",
project: [
"./tsconfig.json"
]
},
},
rules: {}
},
{
files: [
"rollup.config.js",
"src/**/*.js"
],
plugins: { js },
env: {
es6: true,
node: true,
browser: true
},
extends: [ "js/recommended" ],
parser: "espree",
languageOptions: {
parserOptions: {
ecmaVersion: 2020,
sourceType: "module"
}
},
rules: {
"indent": [ "error", 2, { "SwitchCase": 1 } ],
"no-shadow": "error",
"no-unused-vars": [ "error", { "argsIgnorePattern": "^_" } ],
"object-curly-spacing": [ "error", "always", { "arraysInObjects": false, "objectsInObjects": false } ],
"quotes": [ "error", "single" ],
"semi": "error"
}
}
]);
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tinymce/tinymce-jquery",
"version": "2.2.0-rc",
"version": "2.2.0",
"description": "Official TinyMCE integration for jQuery",
"main": "dist/tinymce-jquery.js",
"files": [
Expand Down Expand Up @@ -29,8 +29,8 @@
"devDependencies": {
"@babel/core": "^7.21.3",
"@ephox/agar": "^7.4.1",
"@ephox/bedrock-client": "^15.0.0",
"@ephox/bedrock-server": "^15.0.2",
"@ephox/bedrock-client": "^14.0.0",
"@ephox/bedrock-server": "^14.0.0",
"@ephox/katamari": "^9.1.5",
"@ephox/mcagar": "^8.3.2",
"@ephox/sand": "^6.0.9",
Expand All @@ -47,7 +47,7 @@
"@storybook/storybook-deployer": "^2.8.16",
"@storybook/testing-library": "^0.0.13",
"@tinymce/beehive-flow": "^0.19.0",
"@tinymce/eslint-plugin": "^2.2.1",
"@tinymce/eslint-plugin": "^3.0.0",
"@types/jquery": "^3.5.16",
"@types/react": "^17.0.0",
"babel-loader": "^8.3.0",
Expand All @@ -57,7 +57,7 @@
"rollup": "^3.20.2",
"tinymce": "^8.0.1",
"tslib": "^2.5.0",
"typescript": "~4.8.3",
"typescript": "^5.9.3",
"webpack": "^5.9.0"
},
"dependencies": {},
Expand Down
4 changes: 3 additions & 1 deletion src/main/ts/Integration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,10 @@ const tinymceFn = function (this: JQuery<HTMLElement>, settings?: RawEditorExten
selector: undefined,
target: elm,
init_instance_callback: initInstanceCallback
}).catch((err) => {
/* eslint-disable-next-line no-console */
console.error('TinyMCE init failed', err);
});

}); // this.each

if (initCount === this.length) {
Expand Down
5 changes: 4 additions & 1 deletion src/stories/Editor.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ const Template: Story<RawEditorExtendedSettings> = (args) => {

const addTinyMCE = () => {
$(mountNode).after(`<div id="tiny${mount}"><p>The quick brown fox jumps over the lazy dog.</p></div>`);
$(`div#tiny${mount}`).tinymce(args);
$(`div#tiny${mount}`).tinymce(args).catch((err) => {
/* eslint-disable-next-line no-console */
console.error('TinyMCE init failed', err);
});
};

const removeTinyMCE = () => {
Expand Down
3 changes: 1 addition & 2 deletions src/test/ts/browser/JqAppendTest.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/* eslint-disable @typescript-eslint/no-empty-function */
/* eslint-disable @tinymce/prefer-fun */

import { Assertions } from '@ephox/agar';
import { context, describe, it } from '@ephox/bedrock-client';
import { setupIntegration } from '../../../main/ts/Integration';
Expand Down
3 changes: 1 addition & 2 deletions src/test/ts/browser/JqAttrTest.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/* eslint-disable @typescript-eslint/no-empty-function */
/* eslint-disable @tinymce/prefer-fun */

import { Assertions } from '@ephox/agar';
import { context, describe, it } from '@ephox/bedrock-client';
import { setupIntegration } from '../../../main/ts/Integration';
Expand Down
3 changes: 1 addition & 2 deletions src/test/ts/browser/JqEmptyTest.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/* eslint-disable @typescript-eslint/no-empty-function */
/* eslint-disable @tinymce/prefer-fun */

import { ApproxStructure, Assertions } from '@ephox/agar';
import { context, describe, it } from '@ephox/bedrock-client';
import { SugarElement } from '@ephox/sugar';
Expand Down
3 changes: 1 addition & 2 deletions src/test/ts/browser/JqHtmlTest.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/* eslint-disable @typescript-eslint/no-empty-function */
/* eslint-disable @tinymce/prefer-fun */

import { Assertions } from '@ephox/agar';
import { context, describe, it } from '@ephox/bedrock-client';
import { setupIntegration } from '../../../main/ts/Integration';
Expand Down
3 changes: 1 addition & 2 deletions src/test/ts/browser/JqPrependTest.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/* eslint-disable @typescript-eslint/no-empty-function */
/* eslint-disable @tinymce/prefer-fun */

import { Assertions } from '@ephox/agar';
import { context, describe, it } from '@ephox/bedrock-client';
import { setupIntegration } from '../../../main/ts/Integration';
Expand Down
3 changes: 1 addition & 2 deletions src/test/ts/browser/JqRemoveTest.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/* eslint-disable @typescript-eslint/no-empty-function */
/* eslint-disable @tinymce/prefer-fun */

import { ApproxStructure, Assertions } from '@ephox/agar';
import { context, describe, it } from '@ephox/bedrock-client';
import { SugarElement } from '@ephox/sugar';
Expand Down
3 changes: 1 addition & 2 deletions src/test/ts/browser/JqTextTest.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/* eslint-disable @typescript-eslint/no-empty-function */
/* eslint-disable @tinymce/prefer-fun */

import { Assertions } from '@ephox/agar';
import { context, describe, it } from '@ephox/bedrock-client';
import { setupIntegration } from '../../../main/ts/Integration';
Expand Down
3 changes: 1 addition & 2 deletions src/test/ts/browser/JqValTest.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/* eslint-disable @typescript-eslint/no-empty-function */
/* eslint-disable @tinymce/prefer-fun */

import { Assertions } from '@ephox/agar';
import { context, describe, it } from '@ephox/bedrock-client';
import { setupIntegration } from '../../../main/ts/Integration';
Expand Down
3 changes: 3 additions & 0 deletions src/test/ts/browser/LoadTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ UnitTest.asynctest('LoadTest', (success, failure) => {
editorInstance = editor;
seenInit.set(true);
}
}).catch((err) => {
/* eslint-disable-next-line no-console */
console.error('TinyMCE init failed', err);
});
}),
Waiter.sTryUntilPredicate('Waiting for editor setup', () => seenSetup.get()),
Expand Down
13 changes: 11 additions & 2 deletions src/test/ts/browser/OriginalTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ UnitTest.asynctest('browser.tinymce.core.JqueryIntegrationTest', (success, failu
done();
}
}
}).catch((err) => {
/* eslint-disable-next-line no-console */
console.error('TinyMCE init failed', err);
});
});
});
Expand Down Expand Up @@ -95,12 +98,18 @@ UnitTest.asynctest('browser.tinymce.core.JqueryIntegrationTest', (success, failu
suite.test('applyPatch is only called once', () => {
const options = {};

$('#elm1').tinymce(options);
$('#elm1').tinymce(options).catch((err) => {
/* eslint-disable-next-line no-console */
console.error('TinyMCE init failed', err);
});

// eslint-disable-next-line @typescript-eslint/unbound-method
const oldValFn = $.fn.val;

$('#elm2').tinymce(options);
$('#elm2').tinymce(options).catch((err) => {
/* eslint-disable-next-line no-console */
console.error('TinyMCE init failed', err);
});

// eslint-disable-next-line @typescript-eslint/unbound-method
LegacyUnit.equal($.fn.val, oldValFn);
Expand Down
Loading
Loading