@tinymce/tinymce-svelte 2.0.2 → 3.0.0-feature.20240530235949626.shab9dfb24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/README.md +14 -0
- package/dist/component/Editor.svelte +9 -2
- package/dist/component/Utils.js +5 -0
- package/dist/component/Utils.js.map +1 -1
- package/dist/index.mjs +21 -17
- package/dist/index.mjs.map +1 -1
- package/dist/index.umd.js +21 -17
- package/dist/index.umd.js.map +1 -1
- package/dist/index.umd.min.js +1 -1
- package/dist/ts/component/Editor.svelte +10 -1
- package/package.json +12 -3
- package/src/main/component/Editor.svelte +10 -1
- package/src/main/component/Utils.ts +5 -0
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## Unreleased
|
|
9
9
|
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- Update README.md to contain license key info.
|
|
13
|
+
- Added storybook dependence's for various `storybook/...` packages.
|
|
14
|
+
- Added `react` and `react-dom` to dev-dependencies due to certain packages required it.
|
|
15
|
+
- Added events `Input`, `CompositionEnd`, `CompositionStart` & `CompositionUpdate`.
|
|
16
|
+
- Added `licenseKey` to config option.
|
|
17
|
+
|
|
18
|
+
### Changed
|
|
19
|
+
|
|
20
|
+
- Bumped package version to `3.0.0-rc` from `2.0.3-rc`.
|
|
21
|
+
- Bumped `tinymce` version to `7.1.1` latest.
|
|
22
|
+
|
|
10
23
|
## 2.0.0 - 2023-12-04
|
|
11
24
|
|
|
12
25
|
### Changed
|
package/README.md
CHANGED
|
@@ -70,6 +70,20 @@ Type: string
|
|
|
70
70
|
<Editor
|
|
71
71
|
apiKey="your-api-key"
|
|
72
72
|
/>
|
|
73
|
+
|
|
74
|
+
```
|
|
75
|
+
#### License Key
|
|
76
|
+
|
|
77
|
+
Tiny Cloud license key. Required for deployments using the Tiny Cloud to provide the TinyMCE editor.
|
|
78
|
+
|
|
79
|
+
Default value: licenseKey
|
|
80
|
+
Type: string
|
|
81
|
+
|
|
82
|
+
##### Example using licenseKey
|
|
83
|
+
```
|
|
84
|
+
<Editor
|
|
85
|
+
licenseKey="your-license-key"
|
|
86
|
+
/>
|
|
73
87
|
```
|
|
74
88
|
|
|
75
89
|
#### Channel
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
@component
|
|
3
|
+
|
|
4
|
+
@see {@link https://www.tiny.cloud/docs/tinymce/7/svelte-ref/} for the TinyMCE Svelte Technical Reference.
|
|
5
|
+
-->
|
|
6
|
+
|
|
1
7
|
<script context="module">var _a;
|
|
2
8
|
const uuid = (prefix) => {
|
|
3
9
|
return prefix + '_' + Math.floor(Math.random() * 1000000000) + String(Date.now());
|
|
@@ -48,7 +54,8 @@ export let id = uuid('tinymce-svelte'); // default values
|
|
|
48
54
|
export let inline = undefined;
|
|
49
55
|
export let disabled = false;
|
|
50
56
|
export let apiKey = 'no-api-key';
|
|
51
|
-
export let
|
|
57
|
+
export let licenseKey = '';
|
|
58
|
+
export let channel = '7';
|
|
52
59
|
export let scriptSrc = undefined;
|
|
53
60
|
export let conf = {};
|
|
54
61
|
export let modelEvents = 'change input undo redo';
|
|
@@ -85,7 +92,7 @@ const getTinymce = () => {
|
|
|
85
92
|
};
|
|
86
93
|
const init = () => {
|
|
87
94
|
//
|
|
88
|
-
const finalInit = Object.assign(Object.assign({}, conf), { target: element, inline: inline !== undefined ? inline : conf.inline !== undefined ? conf.inline : false, readonly: disabled, setup: (editor) => {
|
|
95
|
+
const finalInit = Object.assign(Object.assign({}, conf), { target: element, inline: inline !== undefined ? inline : conf.inline !== undefined ? conf.inline : false, readonly: disabled, license_key: licenseKey, setup: (editor) => {
|
|
89
96
|
editorRef = editor;
|
|
90
97
|
editor.on('init', () => {
|
|
91
98
|
editor.setContent(value);
|
package/dist/component/Utils.js
CHANGED
|
@@ -11,6 +11,10 @@ const validEvents = [
|
|
|
11
11
|
'Change',
|
|
12
12
|
'ClearUndos',
|
|
13
13
|
'Click',
|
|
14
|
+
'CommentChange',
|
|
15
|
+
'CompositionEnd',
|
|
16
|
+
'CompositionStart',
|
|
17
|
+
'CompositionUpdate',
|
|
14
18
|
'ContextMenu',
|
|
15
19
|
'Copy',
|
|
16
20
|
'Cut',
|
|
@@ -30,6 +34,7 @@ const validEvents = [
|
|
|
30
34
|
'GetContent',
|
|
31
35
|
'Hide',
|
|
32
36
|
'Init',
|
|
37
|
+
'Input',
|
|
33
38
|
'KeyDown',
|
|
34
39
|
'KeyPress',
|
|
35
40
|
'KeyUp',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Utils.js","sourceRoot":"","sources":["../../src/main/component/Utils.ts"],"names":[],"mappings":"AACA,MAAM,WAAW,GAAG;IAClB,UAAU;IACV,SAAS;IACT,eAAe;IACf,mBAAmB;IACnB,kBAAkB;IAClB,gBAAgB;IAChB,kBAAkB;IAClB,aAAa;IACb,MAAM;IACN,QAAQ;IACR,YAAY;IACZ,OAAO;IACP,aAAa;IACb,MAAM;IACN,KAAK;IACL,UAAU;IACV,YAAY;IACZ,OAAO;IACP,MAAM;IACN,UAAU;IACV,SAAS;IACT,aAAa;IACb,UAAU;IACV,MAAM;IACN,aAAa;IACb,OAAO;IACP,SAAS;IACT,UAAU;IACV,YAAY;IACZ,MAAM;IACN,MAAM;IACN,SAAS;IACT,UAAU;IACV,OAAO;IACP,aAAa;IACb,WAAW;IACX,YAAY;IACZ,YAAY;IACZ,WAAW;IACX,UAAU;IACV,WAAW;IACX,SAAS;IACT,YAAY;IACZ,mBAAmB;IACnB,eAAe;IACf,gBAAgB;IAChB,OAAO;IACP,aAAa;IACb,YAAY;IACZ,YAAY;IACZ,eAAe;IACf,MAAM;IACN,QAAQ;IACR,OAAO;IACP,cAAc;IACd,aAAa;IACb,iBAAiB;IACjB,WAAW;IACX,YAAY;IACZ,MAAM;IACN,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,IAAI,GAAG,CAAC,IAAI,EAAE;QACZ,GAAG,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;KAC9B;AACH,CAAC,CAAC;AAEF,OAAO,EACL,YAAY,EACZ,UAAU,EACX,CAAC"}
|
package/dist/index.mjs
CHANGED
|
@@ -571,7 +571,7 @@ function create_else_block(ctx) {
|
|
|
571
571
|
},
|
|
572
572
|
m(target, anchor) {
|
|
573
573
|
insert(target, textarea, anchor);
|
|
574
|
-
/*textarea_binding*/ ctx[
|
|
574
|
+
/*textarea_binding*/ ctx[19](textarea);
|
|
575
575
|
},
|
|
576
576
|
p(ctx, dirty) {
|
|
577
577
|
if (dirty & /*id*/ 1) {
|
|
@@ -583,12 +583,12 @@ function create_else_block(ctx) {
|
|
|
583
583
|
detach(textarea);
|
|
584
584
|
}
|
|
585
585
|
|
|
586
|
-
/*textarea_binding*/ ctx[
|
|
586
|
+
/*textarea_binding*/ ctx[19](null);
|
|
587
587
|
}
|
|
588
588
|
};
|
|
589
589
|
}
|
|
590
590
|
|
|
591
|
-
// (
|
|
591
|
+
// (135:0) {#if inline}
|
|
592
592
|
function create_if_block(ctx) {
|
|
593
593
|
let div;
|
|
594
594
|
|
|
@@ -599,7 +599,7 @@ function create_if_block(ctx) {
|
|
|
599
599
|
},
|
|
600
600
|
m(target, anchor) {
|
|
601
601
|
insert(target, div, anchor);
|
|
602
|
-
/*div_binding*/ ctx[
|
|
602
|
+
/*div_binding*/ ctx[18](div);
|
|
603
603
|
},
|
|
604
604
|
p(ctx, dirty) {
|
|
605
605
|
if (dirty & /*id*/ 1) {
|
|
@@ -611,7 +611,7 @@ function create_if_block(ctx) {
|
|
|
611
611
|
detach(div);
|
|
612
612
|
}
|
|
613
613
|
|
|
614
|
-
/*div_binding*/ ctx[
|
|
614
|
+
/*div_binding*/ ctx[18](null);
|
|
615
615
|
}
|
|
616
616
|
};
|
|
617
617
|
}
|
|
@@ -636,7 +636,7 @@ function create_fragment(ctx) {
|
|
|
636
636
|
m(target, anchor) {
|
|
637
637
|
insert(target, div, anchor);
|
|
638
638
|
if_block.m(div, null);
|
|
639
|
-
/*div_binding_1*/ ctx[
|
|
639
|
+
/*div_binding_1*/ ctx[20](div);
|
|
640
640
|
},
|
|
641
641
|
p(ctx, [dirty]) {
|
|
642
642
|
if (current_block_type === (current_block_type = select_block_type(ctx)) && if_block) {
|
|
@@ -663,7 +663,7 @@ function create_fragment(ctx) {
|
|
|
663
663
|
}
|
|
664
664
|
|
|
665
665
|
if_block.d();
|
|
666
|
-
/*div_binding_1*/ ctx[
|
|
666
|
+
/*div_binding_1*/ ctx[20](null);
|
|
667
667
|
}
|
|
668
668
|
};
|
|
669
669
|
}
|
|
@@ -678,7 +678,8 @@ function instance($$self, $$props, $$invalidate) {
|
|
|
678
678
|
let { inline = undefined } = $$props;
|
|
679
679
|
let { disabled = false } = $$props;
|
|
680
680
|
let { apiKey = 'no-api-key' } = $$props;
|
|
681
|
-
let {
|
|
681
|
+
let { licenseKey = '' } = $$props;
|
|
682
|
+
let { channel = '7' } = $$props;
|
|
682
683
|
let { scriptSrc = undefined } = $$props;
|
|
683
684
|
let { conf = {} } = $$props;
|
|
684
685
|
let { modelEvents = 'change input undo redo' } = $$props;
|
|
@@ -721,17 +722,18 @@ function instance($$self, $$props, $$invalidate) {
|
|
|
721
722
|
if ('inline' in $$props) $$invalidate(1, inline = $$props.inline);
|
|
722
723
|
if ('disabled' in $$props) $$invalidate(7, disabled = $$props.disabled);
|
|
723
724
|
if ('apiKey' in $$props) $$invalidate(8, apiKey = $$props.apiKey);
|
|
724
|
-
if ('
|
|
725
|
-
if ('
|
|
726
|
-
if ('
|
|
727
|
-
if ('
|
|
725
|
+
if ('licenseKey' in $$props) $$invalidate(9, licenseKey = $$props.licenseKey);
|
|
726
|
+
if ('channel' in $$props) $$invalidate(10, channel = $$props.channel);
|
|
727
|
+
if ('scriptSrc' in $$props) $$invalidate(11, scriptSrc = $$props.scriptSrc);
|
|
728
|
+
if ('conf' in $$props) $$invalidate(12, conf = $$props.conf);
|
|
729
|
+
if ('modelEvents' in $$props) $$invalidate(13, modelEvents = $$props.modelEvents);
|
|
728
730
|
if ('value' in $$props) $$invalidate(5, value = $$props.value);
|
|
729
731
|
if ('text' in $$props) $$invalidate(6, text = $$props.text);
|
|
730
732
|
if ('cssClass' in $$props) $$invalidate(2, cssClass = $$props.cssClass);
|
|
731
733
|
};
|
|
732
734
|
|
|
733
735
|
$$self.$$.update = () => {
|
|
734
|
-
if ($$self.$$.dirty & /*editorRef, lastVal, value, disabled, disablindCache, _a*/
|
|
736
|
+
if ($$self.$$.dirty & /*editorRef, lastVal, value, disabled, disablindCache, _a*/ 245920) ;
|
|
735
737
|
};
|
|
736
738
|
|
|
737
739
|
return [
|
|
@@ -744,6 +746,7 @@ function instance($$self, $$props, $$invalidate) {
|
|
|
744
746
|
text,
|
|
745
747
|
disabled,
|
|
746
748
|
apiKey,
|
|
749
|
+
licenseKey,
|
|
747
750
|
channel,
|
|
748
751
|
scriptSrc,
|
|
749
752
|
conf,
|
|
@@ -767,10 +770,11 @@ class Editor extends SvelteComponent {
|
|
|
767
770
|
inline: 1,
|
|
768
771
|
disabled: 7,
|
|
769
772
|
apiKey: 8,
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
773
|
+
licenseKey: 9,
|
|
774
|
+
channel: 10,
|
|
775
|
+
scriptSrc: 11,
|
|
776
|
+
conf: 12,
|
|
777
|
+
modelEvents: 13,
|
|
774
778
|
value: 5,
|
|
775
779
|
text: 6,
|
|
776
780
|
cssClass: 2
|