From fb4c737966813b61fa850154c954a6a56ba59d62 Mon Sep 17 00:00:00 2001 From: Karl Kemister-Sheppard Date: Thu, 30 May 2024 17:21:30 +1000 Subject: [PATCH] INT: Update tinymce to version 7 and update dependencies. --- README.md | 14 ++++++++++++ package.json | 15 +++++++++--- src/main/component/Editor.svelte | 2 ++ src/main/component/Utils.ts | 5 ++++ yarn.lock | 39 ++++++++++++++++++++++++++------ 5 files changed, 65 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 814bf6b..57ef163 100644 --- a/README.md +++ b/README.md @@ -70,6 +70,20 @@ Type: string + +``` +#### License Key + +Tiny Cloud license key. Required for deployments using the Tiny Cloud to provide the TinyMCE editor. + +Default value: licenseKey +Type: string + +##### Example using licenseKey +``` + ``` #### Channel diff --git a/package.json b/package.json index eb5cc9f..b1f381c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@tinymce/tinymce-svelte", - "version": "2.0.3-rc", + "version": "3.0.0-rc", "description": "TinyMCE Svelte Component", "private": false, "publishConfig": { @@ -75,10 +75,19 @@ "svelte-check": "^3.4.3", "svelte-loader": "^3.1.8", "svelte-preprocess": "^5.0.3", - "tinymce": "^6.7.2", + "tinymce": "^7.1.1", "tslib": "^2.3.1", "typescript": "^5.0.0", - "webpack": "^5.76.2" + "webpack": "^5.76.2", + "@storybook/addons": "^6.2.9", + "@storybook/api": "^6.2.9", + "@storybook/client-api": "^6.2.9", + "@storybook/client-logger": "^6.2.9", + "@storybook/components": "^6.2.9", + "@storybook/core-events": "^6.2.9", + "@storybook/theming": "^6.2.9", + "react": "^17.0.0", + "react-dom": "^17.0.0" }, "resolutions": { "browserslist": "^4.16.5", diff --git a/src/main/component/Editor.svelte b/src/main/component/Editor.svelte index 7a3e18d..9674dd3 100644 --- a/src/main/component/Editor.svelte +++ b/src/main/component/Editor.svelte @@ -61,6 +61,7 @@ export let inline: boolean | undefined = undefined; export let disabled: boolean = false; export let apiKey: string = 'no-api-key'; + export let licenseKey: string = ''; export let channel: string = '6'; export let scriptSrc: string = undefined; export let conf: EditorOptions = {}; @@ -110,6 +111,7 @@ target: element, inline: inline !== undefined ? inline : conf.inline !== undefined ? conf.inline : false, readonly: disabled, + license_key: licenseKey, setup: (editor: TinyMCEEditor) => { editorRef = editor; editor.on('init', () => { diff --git a/src/main/component/Utils.ts b/src/main/component/Utils.ts index 1ea05a5..83fb903 100644 --- a/src/main/component/Utils.ts +++ b/src/main/component/Utils.ts @@ -13,6 +13,10 @@ const validEvents = [ 'ClearUndos', 'Click', 'ContextMenu', + 'CommentChange', + 'CompositionEnd', + 'CompositionStart', + 'CompositionUpdate', 'Copy', 'Cut', 'Dblclick', @@ -31,6 +35,7 @@ const validEvents = [ 'GetContent', 'Hide', 'Init', + 'Input', 'KeyDown', 'KeyPress', 'KeyUp', diff --git a/yarn.lock b/yarn.lock index e135d2e..c6abe58 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1644,7 +1644,7 @@ prop-types "^15.7.2" regenerator-runtime "^0.13.7" -"@storybook/addons@6.5.16": +"@storybook/addons@6.5.16", "@storybook/addons@^6.2.9": version "6.5.16" resolved "https://registry.yarnpkg.com/@storybook/addons/-/addons-6.5.16.tgz#07e8f2205f86fa4c9dada719e3e096cb468e3cdd" integrity sha512-p3DqQi+8QRL5k7jXhXmJZLsE/GqHqyY6PcoA1oNTJr0try48uhTGUOYkgzmqtDaa/qPFO5LP+xCPzZXckGtquQ== @@ -1661,7 +1661,7 @@ global "^4.4.0" regenerator-runtime "^0.13.7" -"@storybook/api@6.5.16": +"@storybook/api@6.5.16", "@storybook/api@^6.2.9": version "6.5.16" resolved "https://registry.yarnpkg.com/@storybook/api/-/api-6.5.16.tgz#897915b76de05587fd702951d5d836f708043662" integrity sha512-HOsuT8iomqeTMQJrRx5U8nsC7lJTwRr1DhdD0SzlqL4c80S/7uuCy4IZvOt4sYQjOzW5fOo/kamcoBXyLproTA== @@ -1814,7 +1814,7 @@ ts-dedent "^2.0.0" util-deprecate "^1.0.2" -"@storybook/client-api@6.5.16": +"@storybook/client-api@6.5.16", "@storybook/client-api@^6.2.9": version "6.5.16" resolved "https://registry.yarnpkg.com/@storybook/client-api/-/client-api-6.5.16.tgz#13e5a7c3d1f0f951ec4ef51cfcf2c5aafb560e12" integrity sha512-i3UwkzzUFw8I+E6fOcgB5sc4oU2fhvaKnqC1mpd9IYGJ9JN9MnGIaVl3Ko28DtFItu/QabC9JsLIJVripFLktQ== @@ -1840,7 +1840,7 @@ ts-dedent "^2.0.0" util-deprecate "^1.0.2" -"@storybook/client-logger@6.5.16": +"@storybook/client-logger@6.5.16", "@storybook/client-logger@^6.2.9": version "6.5.16" resolved "https://registry.yarnpkg.com/@storybook/client-logger/-/client-logger-6.5.16.tgz#955cc46b389e7151c9eb1585a75e6a0605af61a1" integrity sha512-pxcNaCj3ItDdicPTXTtmYJE3YC1SjxFrBmHcyrN+nffeNyiMuViJdOOZzzzucTUG0wcOOX8jaSyak+nnHg5H1Q== @@ -1848,7 +1848,7 @@ core-js "^3.8.2" global "^4.4.0" -"@storybook/components@6.5.16": +"@storybook/components@6.5.16", "@storybook/components@^6.2.9": version "6.5.16" resolved "https://registry.yarnpkg.com/@storybook/components/-/components-6.5.16.tgz#f8dc51213bc08fe32154be964e1e8b0e2f670ed6" integrity sha512-LzBOFJKITLtDcbW9jXl0/PaG+4xAz25PK8JxPZpIALbmOpYWOAPcO6V9C2heX6e6NgWFMUxjplkULEk9RCQMNA== @@ -1944,7 +1944,7 @@ util-deprecate "^1.0.2" webpack "4" -"@storybook/core-events@6.5.16": +"@storybook/core-events@6.5.16", "@storybook/core-events@^6.2.9": version "6.5.16" resolved "https://registry.yarnpkg.com/@storybook/core-events/-/core-events-6.5.16.tgz#b1c265dac755007dae172d9d4b72656c9e5d7bb3" integrity sha512-qMZQwmvzpH5F2uwNUllTPg6eZXr2OaYZQRRN8VZJiuorZzDNdAFmiVWMWdkThwmyLEJuQKXxqCL8lMj/7PPM+g== @@ -2295,7 +2295,7 @@ read-pkg-up "^7.0.1" regenerator-runtime "^0.13.7" -"@storybook/theming@6.5.16": +"@storybook/theming@6.5.16", "@storybook/theming@^6.2.9": version "6.5.16" resolved "https://registry.yarnpkg.com/@storybook/theming/-/theming-6.5.16.tgz#b999bdb98945b605b93b9dfdf7408535b701e2aa" integrity sha512-hNLctkjaYLRdk1+xYTkC1mg4dYz2wSv6SqbLpcKMbkPHTE0ElhddGPHQqB362md/w9emYXNkt1LSMD8Xk9JzVQ== @@ -8952,6 +8952,15 @@ react-dom@16.14.0: prop-types "^15.6.2" scheduler "^0.19.1" +react-dom@^17.0.0: + version "17.0.2" + resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-17.0.2.tgz#ecffb6845e3ad8dbfcdc498f0d0a939736502c23" + integrity sha512-s4h96KtLDUQlsENhMn1ar8t2bEa+q/YAtj8pPPdIjPDGBDIVNsrD9aXNWqspUe6AzKCIG0C1HZZLqLV7qpOBGA== + dependencies: + loose-envify "^1.1.0" + object-assign "^4.1.1" + scheduler "^0.20.2" + react-inspector@^5.1.0: version "5.1.1" resolved "https://registry.yarnpkg.com/react-inspector/-/react-inspector-5.1.1.tgz#58476c78fde05d5055646ed8ec02030af42953c8" @@ -8975,6 +8984,14 @@ react@16.14.0: object-assign "^4.1.1" prop-types "^15.6.2" +react@^17.0.0: + version "17.0.2" + resolved "https://registry.yarnpkg.com/react/-/react-17.0.2.tgz#d0b5cc516d29eb3eee383f75b62864cfb6800037" + integrity sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA== + dependencies: + loose-envify "^1.1.0" + object-assign "^4.1.1" + read-pkg-up@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-1.0.1.tgz#9d63c13276c065918d57f002a57f40a1b643fb02" @@ -9468,6 +9485,14 @@ scheduler@^0.19.1: loose-envify "^1.1.0" object-assign "^4.1.1" +scheduler@^0.20.2: + version "0.20.2" + resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.20.2.tgz#4baee39436e34aa93b4874bddcbf0fe8b8b50e91" + integrity sha512-2eWfGgAqqWFGqtdMmcL5zCMK1U8KlXv8SQFGglL3CEtd0aDVDWgeF/YoCmvln55m5zSk3J/20hTaSBeSObsQDQ== + dependencies: + loose-envify "^1.1.0" + object-assign "^4.1.1" + schema-utils@2.7.0: version "2.7.0" resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-2.7.0.tgz#17151f76d8eae67fbbf77960c33c676ad9f4efc7"