diff --git a/CHANGELOG.md b/CHANGELOG.md index d3a8869..886f263 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased +### Fixed +- tinymce "^v7.0.0 || ^v6.0.0 || ^v5.0.0" is now an optional peer dependency. #INT-3324 + ## 3.0.0 - 2024-06-05 ### Added diff --git a/package.json b/package.json index 9ec816b..30e4c79 100644 --- a/package.json +++ b/package.json @@ -45,6 +45,14 @@ "CHANGELOG.md", "LICENSE.txt" ], + "peerDependencies": { + "tinymce": "^7.0.0 || ^6.0.0 || ^5.0.0" + }, + "peerDependenciesMeta": { + "tinymce": { + "optional": true + } + }, "devDependencies": { "@babel/core": "^7.14.8", "@rollup/plugin-commonjs": "^17.0.0", @@ -76,7 +84,7 @@ "svelte-check": "^3.8.0", "svelte-loader": "^3.2.0", "svelte-preprocess": "^5.1.4", - "tinymce": "^7.1.1", + "tinymce": "^7.2.1", "tslib": "^2.6.2", "typescript": "^5.4.5", "vite": "^5.2.13", diff --git a/src/main/component/Editor.svelte b/src/main/component/Editor.svelte index b0f4b2c..9e5bb4b 100644 --- a/src/main/component/Editor.svelte +++ b/src/main/component/Editor.svelte @@ -70,7 +70,7 @@ export let apiKey: string = 'no-api-key'; export let licenseKey: string | undefined = undefined; export let channel: Channel = '7'; - export let scriptSrc: string = undefined; + export let scriptSrc: string | undefined = undefined; export let conf: EditorOptions = {}; export let modelEvents: string = 'change input undo redo'; export let value: string = ''; @@ -139,7 +139,7 @@ }, }; element.style.visibility = ''; - void getTinymce().init(finalInit); + void getTinymce()?.init(finalInit); }; onMount(() => { diff --git a/yarn.lock b/yarn.lock index faaf511..45f6660 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7488,10 +7488,10 @@ tiny-invariant@^1.3.1, tiny-invariant@^1.3.3: resolved "https://registry.yarnpkg.com/tiny-invariant/-/tiny-invariant-1.3.3.tgz#46680b7a873a0d5d10005995eb90a70d74d60127" integrity sha512-+FbBPE1o9QAYvviau/qC5SE3caw21q3xkvWKBtja5vgqOWIHHJ3ioaq1VPfn/Szqctz2bU/oYeKd9/z5BL+PVg== -tinymce@^7.1.1: - version "7.1.2" - resolved "https://registry.yarnpkg.com/tinymce/-/tinymce-7.1.2.tgz#cb40e527dc03d6a0547a23c91231a946e50dae03" - integrity sha512-I/M5WRyEJjwIhyIv6FhkvZS1mWNbb0sIEvDkP8akBnuV1X78mkNhi6Kz9FBBbHzy61U3pmXgzyCSaDZfdQbCSg== +tinymce@^7.2.1: + version "7.2.1" + resolved "https://registry.yarnpkg.com/tinymce/-/tinymce-7.2.1.tgz#9b4f6b5a0fa647e2953c174ac69aa47483683332" + integrity sha512-ADd1cvdIuq6NWyii0ZOZRuu+9sHIdQfcRNWBcBps2K8vy7OjlRkX6iw7zz1WlL9kY4z4L1DvIP+xOrVX/46aHA== tmp@^0.2.1: version "0.2.3"