Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## Unreleased

### Changed
- Set the default channel to `8`. INT-3354

## 2.2.0 - 2025-05-29

### Added
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"esm": "^3.2.25",
"express": "^4.18.2",
"rollup": "^4.24.0",
"tinymce": "^7.4.1",
"tinymce": "^8.0.0",
"ts-loader": "^9.4.2",
"ts-node": "^10.9.1",
"typescript": "~5.6.3",
Expand Down
9 changes: 8 additions & 1 deletion src/demo/html/basic.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,14 @@

<body>
<h1>TinyMCE Web Component Simple Demo Page</h1>
<tinymce-editor promotion="false"></tinymce-editor>

<script>
var editorConfig = {
license_key: 'gpl'
};
</script>

<tinymce-editor config="editorConfig" promotion="false"></tinymce-editor>
<script src="../../../node_modules/tinymce/tinymce.js"></script>
<script src="../../../dist/tinymce-webcomponent.js"></script>
</body>
Expand Down
8 changes: 8 additions & 0 deletions src/demo/html/common-attributes.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,15 @@ <h1>TinyMCE Web Component Common Attributes Demo Page</h1>
<li>icons_url</li>
<li>setup</li>
</ul>

<script>
var editorConfig = {
license_key: 'gpl'
};
</script>

<tinymce-editor
config="editorConfig"
height="500"
menubar="false"
plugins="advlist autolink lists link image charmap print preview anchor
Expand Down
47 changes: 27 additions & 20 deletions src/demo/html/content.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,32 @@
</head>

<body>
<h1>TinyMCE Web Component Content Demo Page</h1>
<tinymce-editor promotion="false">
&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;
&lt;p style=&quot;text-align: center;&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;h2 style=&quot;text-align: center;&quot;&gt;TinyMCE is the world's most customizable, and flexible, rich text editor.&lt;/h2&gt;
&lt;p style=&quot;text-align: center;&quot;&gt;&lt;strong&gt; &lt;span style=&quot;font-size: 14pt;&quot;&gt; &lt;span style=&quot;color: #7e8c8d; font-weight: 600;&quot;&gt; A featherweight download, TinyMCE can handle any challenge you throw at it. &lt;/span&gt; &lt;/span&gt; &lt;/strong&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: center;&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;table style=&quot;border-collapse: collapse; width: 85%; margin-left: auto; margin-right: auto; border: 0;&quot;&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style=&quot;width: 25%; text-align: center; padding: 7px;&quot;&gt;&lt;span style=&quot;color: #95a5a6;&quot;&gt;🛠 50+ Plugins&lt;/span&gt;&lt;/td&gt;
&lt;td style=&quot;width: 25%; text-align: center; padding: 7px;&quot;&gt;&lt;span style=&quot;color: #95a5a6;&quot;&gt;💡 Premium Support&lt;/span&gt;&lt;/td&gt;
&lt;td style=&quot;width: 25%; text-align: center; padding: 7px;&quot;&gt;&lt;span style=&quot;color: #95a5a6;&quot;&gt;🖍 Custom Skins&lt;/span&gt;&lt;/td&gt;
&lt;td style=&quot;width: 25%; text-align: center; padding: 7px;&quot;&gt;&lt;span style=&quot;color: #95a5a6;&quot;&gt;⚙ Full API Access&lt;/span&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
</tinymce-editor>
<script src="../../../node_modules/tinymce/tinymce.js"></script>
<script src="../../../dist/tinymce-webcomponent.js"></script>
<h1>TinyMCE Web Component Content Demo Page</h1>

<script>
var editorConfig = {
license_key: 'gpl'
};
</script>

<tinymce-editor config="editorConfig" promotion="false">
&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;
&lt;p style=&quot;text-align: center;&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;h2 style=&quot;text-align: center;&quot;&gt;TinyMCE is the world's most customizable, and flexible, rich text editor.&lt;/h2&gt;
&lt;p style=&quot;text-align: center;&quot;&gt;&lt;strong&gt; &lt;span style=&quot;font-size: 14pt;&quot;&gt; &lt;span style=&quot;color: #7e8c8d; font-weight: 600;&quot;&gt; A featherweight download, TinyMCE can handle any challenge you throw at it. &lt;/span&gt; &lt;/span&gt; &lt;/strong&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: center;&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;table style=&quot;border-collapse: collapse; width: 85%; margin-left: auto; margin-right: auto; border: 0;&quot;&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style=&quot;width: 25%; text-align: center; padding: 7px;&quot;&gt;&lt;span style=&quot;color: #95a5a6;&quot;&gt;🛠 50+ Plugins&lt;/span&gt;&lt;/td&gt;
&lt;td style=&quot;width: 25%; text-align: center; padding: 7px;&quot;&gt;&lt;span style=&quot;color: #95a5a6;&quot;&gt;💡 Premium Support&lt;/span&gt;&lt;/td&gt;
&lt;td style=&quot;width: 25%; text-align: center; padding: 7px;&quot;&gt;&lt;span style=&quot;color: #95a5a6;&quot;&gt;🖍 Custom Skins&lt;/span&gt;&lt;/td&gt;
&lt;td style=&quot;width: 25%; text-align: center; padding: 7px;&quot;&gt;&lt;span style=&quot;color: #95a5a6;&quot;&gt;⚙ Full API Access&lt;/span&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
</tinymce-editor>
<script src="../../../node_modules/tinymce/tinymce.js"></script>
<script src="../../../dist/tinymce-webcomponent.js"></script>
</body>
</html>
9 changes: 8 additions & 1 deletion src/demo/html/demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,18 @@
</head>

<body>
<script>
var editorConfig = {
license_key: 'gpl'
};
</script>

<h2>TinyMCE Web Component Demo Page</h2>
<div id="ephox-ui">
<h3>Attribute config</h3>
<tinymce-editor autofocus
toolbar="undo redo | bold"
config="editorConfig"
menubar="false"
plugins="lists image"
setup="editors.setupFn"
Expand All @@ -20,7 +27,7 @@ <h3>Attribute config</h3>
promotion="false"
></tinymce-editor>
<h3>Default with readonly</h3>
<tinymce-editor promotion="false" readonly>
<tinymce-editor config="editorConfig" promotion="false" readonly>
&lt;p&gt;The quick &lt;b&gt;brown&lt;/b&gt; fox.&lt;/p&gt;
&lt;p&gt;Jumps over the &lt;i&gt;lazy&lt;/i&gt; dog.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;http://www.google.com/google.jpg&quot; onload=&quot;javascript: alert('hello');&quot;/&gt;&lt;/p&gt;
Expand Down
7 changes: 5 additions & 2 deletions src/demo/html/disabled.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,18 @@
editor.removeAttribute('readonly');
}
}
var editorConfig = {
license_key: 'gpl'
}
</script>
<h2>TinyMCE WebComponent Demo: Disabled and Readonly</h2>
<div id="ephox-ui">
<h2>Readonly mode</h2>
<button onclick="toggleReadonly()">Toggle readonly</button>
<tinymce-editor id="readonly_mode" readonly></tinymce-editor>
<tinymce-editor config="editorConfig" id="readonly_mode" readonly></tinymce-editor>
<h2>Disabled state</h2>
<button onclick="toggleDisabled()" plugins="help">Toggle disabled</button>
<tinymce-editor id="disabled_state" disabled></tinymce-editor>
<tinymce-editor config="editorConfig" id="disabled_state" disabled></tinymce-editor>
</div>
<script src="../../../node_modules/tinymce/tinymce.js"></script>
<script src="../../../dist/tinymce-webcomponent.js"></script>
Expand Down
5 changes: 5 additions & 0 deletions src/demo/html/events.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,17 @@
};
window['editors'] = editors;
})();

var editorConfig = {
license_key: 'gpl'
};
</script>
</head>

<body>
<h1>TinyMCE Web Component Events Demo Page</h1>
<tinymce-editor
config="editorConfig"
setup="editors.setupFn"
on-Init="editors.initFn"
on-Change="editors.changeFn"
Expand Down
2 changes: 1 addition & 1 deletion src/main/ts/component/Editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ class TinyMceEditor extends HTMLElement {
if (src) {
return src;
}
const channel = this.getAttribute('channel') ?? '6';
const channel = this.getAttribute('channel') ?? '8';
const apiKey = this.hasAttribute('api-key') ? this.getAttribute('api-key') : 'no-api-key';
return `https://cdn.tiny.cloud/1/${apiKey}/tinymce/${channel}/tinymce.min.js`;

Expand Down
2 changes: 1 addition & 1 deletion src/test/ts/browser/LoadTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { Arr, Global } from '@ephox/katamari';

const makeTinymceElement = (attrs: Record<string, string>, content: string) => {
const ce = SugarElement.fromTag('tinymce-editor');
Attribute.set(ce, 'channel', '6-testing');
Attribute.set(ce, 'channel', '8');
Attribute.setAll(ce, attrs);
TextContent.set(ce, content);
Insert.append(SugarBody.body(), ce);
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7055,10 +7055,10 @@ thunky@^1.0.2:
resolved "https://registry.yarnpkg.com/thunky/-/thunky-1.1.0.tgz#5abaf714a9405db0504732bbccd2cedd9ef9537d"
integrity sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA==

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

tinyrainbow@^1.2.0:
version "1.2.0"
Expand Down