Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

INT: Update tinymce to version 7 and update dependencies. #54

Merged
merged 13 commits into from
Jun 5, 2024
Merged
Show file tree
Hide file tree
Changes from 4 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
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## Unreleased

### Added

- Update README.md to contain license key info.
- Added storybook dependence's for various `storybook/...` packages.
- Added `react` and `react-dom` to dev-dependencies due to certain packages required it.
- Added events `Input`, `CompositionEnd`, `CompositionStart` & `CompositionUpdate`.
- Added `licenseKey` to config option.

### Changed

- Bumped package version to `3.0.0-rc` from `2.0.3-rc`.
kemister85 marked this conversation as resolved.
Show resolved Hide resolved
- Bumped `tinymce` version to `7.1.1` latest.
kemister85 marked this conversation as resolved.
Show resolved Hide resolved

## 2.0.0 - 2023-12-04

### Changed
Expand Down
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,20 @@ Type: string
<Editor
apiKey="your-api-key"
/>

```
#### License Key

Tiny Cloud license key. Required for deployments using the Tiny Cloud to provide the TinyMCE editor.

Default value: licenseKey
Type: string
kemister85 marked this conversation as resolved.
Show resolved Hide resolved

##### Example using licenseKey
```
<Editor
licenseKey="your-license-key"
/>
```

#### Channel
Expand Down
15 changes: 12 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down Expand Up @@ -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",
Expand Down
11 changes: 10 additions & 1 deletion src/main/component/Editor.svelte
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
<!--
@component

@see {@link https://www.tiny.cloud/docs/tinymce/7/svelte-ref/} for the TinyMCE Svelte Technical Reference.
-->

<script lang="ts" context="module">
declare let global: { tinymce: TinyMCE }
declare let window: Window & { tinymce: TinyMCE }
Expand Down Expand Up @@ -55,13 +61,15 @@
import { createEventDispatcher, onDestroy, onMount } from 'svelte';
import type { TinyMCE, Editor as TinyMCEEditor } from 'tinymce';
type EditorOptions = Parameters<TinyMCE['init']>[0];
type Version = `${'4' | '5' | '6' | '7'}${'' | '-dev' | '-testing' | `.${number}` | `.${number}.${number}`}`;
kemister85 marked this conversation as resolved.
Show resolved Hide resolved

import { bindHandlers } from './Utils';
export let id: string = uuid('tinymce-svelte'); // default values
export let inline: boolean | undefined = undefined;
export let disabled: boolean = false;
export let apiKey: string = 'no-api-key';
export let channel: string = '6';
export let licenseKey: string = '';
kemister85 marked this conversation as resolved.
Show resolved Hide resolved
export let channel: Version = '7';
kemister85 marked this conversation as resolved.
Show resolved Hide resolved
export let scriptSrc: string = undefined;
export let conf: EditorOptions = {};
export let modelEvents: string = 'change input undo redo';
Expand Down Expand Up @@ -110,6 +118,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', () => {
Expand Down
5 changes: 5 additions & 0 deletions src/main/component/Utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ const validEvents = [
'Change',
'ClearUndos',
'Click',
'CommentChange',
'CompositionEnd',
'CompositionStart',
'CompositionUpdate',
'ContextMenu',
'Copy',
'Cut',
Expand All @@ -31,6 +35,7 @@ const validEvents = [
'GetContent',
'Hide',
'Init',
'Input',
'KeyDown',
'KeyPress',
'KeyUp',
Expand Down
47 changes: 36 additions & 11 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1644,7 +1644,7 @@
prop-types "^15.7.2"
regenerator-runtime "^0.13.7"

"@storybook/[email protected]":
"@storybook/[email protected]", "@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==
Expand All @@ -1661,7 +1661,7 @@
global "^4.4.0"
regenerator-runtime "^0.13.7"

"@storybook/[email protected]":
"@storybook/[email protected]", "@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==
Expand Down Expand Up @@ -1814,7 +1814,7 @@
ts-dedent "^2.0.0"
util-deprecate "^1.0.2"

"@storybook/[email protected]":
"@storybook/[email protected]", "@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==
Expand All @@ -1840,15 +1840,15 @@
ts-dedent "^2.0.0"
util-deprecate "^1.0.2"

"@storybook/[email protected]":
"@storybook/[email protected]", "@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==
dependencies:
core-js "^3.8.2"
global "^4.4.0"

"@storybook/[email protected]":
"@storybook/[email protected]", "@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==
Expand Down Expand Up @@ -1944,7 +1944,7 @@
util-deprecate "^1.0.2"
webpack "4"

"@storybook/[email protected]":
"@storybook/[email protected]", "@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==
Expand Down Expand Up @@ -2295,7 +2295,7 @@
read-pkg-up "^7.0.1"
regenerator-runtime "^0.13.7"

"@storybook/[email protected]":
"@storybook/[email protected]", "@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==
Expand Down Expand Up @@ -8952,6 +8952,15 @@ [email protected]:
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"
Expand All @@ -8975,6 +8984,14 @@ [email protected]:
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"
Expand Down Expand Up @@ -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"

[email protected]:
version "2.7.0"
resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-2.7.0.tgz#17151f76d8eae67fbbf77960c33c676ad9f4efc7"
Expand Down Expand Up @@ -10392,10 +10417,10 @@ timers-browserify@^2.0.4:
dependencies:
setimmediate "^1.0.4"

tinymce@^6.7.2:
version "6.7.2"
resolved "https://registry.yarnpkg.com/tinymce/-/tinymce-6.7.2.tgz#39b077d26c171cb41341b2eef126e7811bb78697"
integrity sha512-6h/02jHmXyghekFzmzccZxUUEFtlPEKHxOd+gd49bjno3ybavZInPIaDd/pp2GeEwsFm20oGgJCL7UiebXm9dw==
tinymce@^7.1.1:
version "7.1.1"
resolved "https://registry.yarnpkg.com/tinymce/-/tinymce-7.1.1.tgz#63cd62c0288bdbddb854b3565387c8d7dec14be4"
integrity sha512-QQJKsEiM+jUfrlxNivuVUiv1jsHv4a27rub4oqajtsYQ4mFukN3hkWQrZnzVNtnPOIUsOGU2Ycem0DnEU/JKcA==

tmp@^0.2.1:
version "0.2.1"
Expand Down
Loading