Skip to content

Commit 702da08

Browse files
committed
INT-3354: Update to set the default cloud channel to 8 and properly set license key to all demos
1 parent dab61ac commit 702da08

File tree

10 files changed

+43
-12
lines changed

10 files changed

+43
-12
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
"esm": "^3.2.25",
4343
"express": "^4.18.2",
4444
"rollup": "^4.24.0",
45-
"tinymce": "^7.4.1",
45+
"tinymce": "^8.0.0",
4646
"ts-loader": "^9.4.2",
4747
"ts-node": "^10.9.1",
4848
"typescript": "~5.6.3",

src/demo/html/basic.html

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,12 @@
88

99
<body>
1010
<h1>TinyMCE Web Component Simple Demo Page</h1>
11-
<tinymce-editor promotion="false"></tinymce-editor>
11+
<script>
12+
var editorConfig = {
13+
license_key: 'gpl'
14+
};
15+
</script>
16+
<tinymce-editor config="editorConfig" promotion="false"></tinymce-editor>
1217
<script src="../../../node_modules/tinymce/tinymce.js"></script>
1318
<script src="../../../dist/tinymce-webcomponent.js"></script>
1419
</body>

src/demo/html/common-attributes.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,13 @@ <h1>TinyMCE Web Component Common Attributes Demo Page</h1>
3636
<li>icons_url</li>
3737
<li>setup</li>
3838
</ul>
39+
<script>
40+
var editorConfig = {
41+
license_key: 'gpl'
42+
};
43+
</script>
3944
<tinymce-editor
45+
config="editorConfig"
4046
height="500"
4147
menubar="false"
4248
plugins="advlist autolink lists link image charmap print preview anchor

src/demo/html/content.html

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,12 @@
88

99
<body>
1010
<h1>TinyMCE Web Component Content Demo Page</h1>
11-
<tinymce-editor promotion="false">
11+
<script>
12+
var editorConfig = {
13+
license_key: 'gpl'
14+
};
15+
</script>
16+
<tinymce-editor config="editorConfig" promotion="false">
1217
&lt;p style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;color: #bdc3c7;&quot;&gt;&amp;rarr; This is a full-featured editor demo. Please explore! &amp;larr;&lt;/span&gt;&lt;/p&gt;
1318
&lt;p style=&quot;text-align: center;&quot;&gt;&amp;nbsp;&lt;/p&gt;
1419
&lt;h2 style=&quot;text-align: center;&quot;&gt;TinyMCE is the world's most customizable, and flexible, rich text editor.&lt;/h2&gt;

src/demo/html/demo.html

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,17 @@
77
</head>
88

99
<body>
10+
<script>
11+
var editorConfig = {
12+
license_key: 'gpl'
13+
};
14+
</script>
1015
<h2>TinyMCE Web Component Demo Page</h2>
1116
<div id="ephox-ui">
1217
<h3>Attribute config</h3>
1318
<tinymce-editor autofocus
1419
toolbar="undo redo | bold"
20+
config="editorConfig"
1521
menubar="false"
1622
plugins="lists image"
1723
setup="editors.setupFn"
@@ -20,7 +26,7 @@ <h3>Attribute config</h3>
2026
promotion="false"
2127
></tinymce-editor>
2228
<h3>Default with readonly</h3>
23-
<tinymce-editor promotion="false" readonly>
29+
<tinymce-editor config="editorConfig" promotion="false" readonly>
2430
&lt;p&gt;The quick &lt;b&gt;brown&lt;/b&gt; fox.&lt;/p&gt;
2531
&lt;p&gt;Jumps over the &lt;i&gt;lazy&lt;/i&gt; dog.&lt;/p&gt;
2632
&lt;p&gt;&lt;img src=&quot;http://www.google.com/google.jpg&quot; onload=&quot;javascript: alert('hello');&quot;/&gt;&lt;/p&gt;

src/demo/html/disabled.html

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,18 @@
2626
editor.removeAttribute('readonly');
2727
}
2828
}
29+
var editorConfig = {
30+
license_key: 'gpl'
31+
}
2932
</script>
3033
<h2>TinyMCE WebComponent Demo: Disabled and Readonly</h2>
3134
<div id="ephox-ui">
3235
<h2>Readonly mode</h2>
3336
<button onclick="toggleReadonly()">Toggle readonly</button>
34-
<tinymce-editor id="readonly_mode" readonly></tinymce-editor>
37+
<tinymce-editor config="editorConfig" id="readonly_mode" readonly></tinymce-editor>
3538
<h2>Disabled state</h2>
3639
<button onclick="toggleDisabled()" plugins="help">Toggle disabled</button>
37-
<tinymce-editor id="disabled_state" disabled></tinymce-editor>
40+
<tinymce-editor config="editorConfig" id="disabled_state" disabled></tinymce-editor>
3841
</div>
3942
<script src="../../../node_modules/tinymce/tinymce.js"></script>
4043
<script src="../../../dist/tinymce-webcomponent.js"></script>

src/demo/html/events.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,13 @@
2626

2727
<body>
2828
<h1>TinyMCE Web Component Events Demo Page</h1>
29+
<script>
30+
var editorConfig = {
31+
license_key: 'gpl'
32+
}
33+
</script>
2934
<tinymce-editor
35+
config="editorConfig"
3036
setup="editors.setupFn"
3137
on-Init="editors.initFn"
3238
on-Change="editors.changeFn"

src/main/ts/component/Editor.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ class TinyMceEditor extends HTMLElement {
287287
if (src) {
288288
return src;
289289
}
290-
const channel = this.getAttribute('channel') ?? '6';
290+
const channel = this.getAttribute('channel') ?? '8';
291291
const apiKey = this.hasAttribute('api-key') ? this.getAttribute('api-key') : 'no-api-key';
292292
return `https://cdn.tiny.cloud/1/${apiKey}/tinymce/${channel}/tinymce.min.js`;
293293

src/test/ts/browser/LoadTest.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { Arr, Global } from '@ephox/katamari';
66

77
const makeTinymceElement = (attrs: Record<string, string>, content: string) => {
88
const ce = SugarElement.fromTag('tinymce-editor');
9-
Attribute.set(ce, 'channel', '6-testing');
9+
Attribute.set(ce, 'channel', '8');
1010
Attribute.setAll(ce, attrs);
1111
TextContent.set(ce, content);
1212
Insert.append(SugarBody.body(), ce);

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7055,10 +7055,10 @@ thunky@^1.0.2:
70557055
resolved "https://registry.yarnpkg.com/thunky/-/thunky-1.1.0.tgz#5abaf714a9405db0504732bbccd2cedd9ef9537d"
70567056
integrity sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA==
70577057

7058-
tinymce@^7.4.1:
7059-
version "7.9.0"
7060-
resolved "https://registry.yarnpkg.com/tinymce/-/tinymce-7.9.0.tgz#92e2260629de77e864e0a66e61c4a6193cf9cc32"
7061-
integrity sha512-tTrUmUGWqy1BY1WwDYh4WiuHm23LiRTcE1Xq3WLO8HKFzde/d0bTF/hXWOa97zqGh0ndJHx/nysQaNC9Gcd16g==
7058+
tinymce@^8.0.0:
7059+
version "8.0.0"
7060+
resolved "https://registry.yarnpkg.com/tinymce/-/tinymce-8.0.0.tgz#e6abd6bd31a2972f0a514462c281d4f7b2dae50e"
7061+
integrity sha512-E1OwCXXCzmZLx6sQVeMHdb61Hsp+7AxWtYstXp7Yw59Et4AdHQ0N36n7InVaYDmq2aBlCM8qkTQYKEqKgecP3A==
70627062

70637063
tinyrainbow@^1.2.0:
70647064
version "1.2.0"

0 commit comments

Comments
 (0)