Skip to content

Commit de5a6c7

Browse files
INT-3354: add license_key to make the component compatible with version 8
1 parent dab61ac commit de5a6c7

File tree

9 files changed

+14
-10
lines changed

9 files changed

+14
-10
lines changed

src/demo/html/basic.html

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

99
<body>
1010
<h1>TinyMCE Web Component Simple Demo Page</h1>
11-
<tinymce-editor promotion="false"></tinymce-editor>
11+
<tinymce-editor license_key="gpl" promotion="false"></tinymce-editor>
1212
<script src="../../../node_modules/tinymce/tinymce.js"></script>
1313
<script src="../../../dist/tinymce-webcomponent.js"></script>
1414
</body>

src/demo/html/cdn.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@
99

1010
<body>
1111
<h1>TinyMCE Web Component Simple CDN Demo Page</h1>
12-
<tinymce-editor api-key="no-api-key"></tinymce-editor>
12+
<tinymce-editor license_key="gpl" api-key="no-api-key"></tinymce-editor>
1313
</body>
1414
</html>

src/demo/html/common-attributes.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ <h1>TinyMCE Web Component Common Attributes Demo Page</h1>
3737
<li>setup</li>
3838
</ul>
3939
<tinymce-editor
40+
license_key="gpl"
4041
height="500"
4142
menubar="false"
4243
plugins="advlist autolink lists link image charmap print preview anchor

src/demo/html/content.html

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

99
<body>
1010
<h1>TinyMCE Web Component Content Demo Page</h1>
11-
<tinymce-editor promotion="false">
11+
<tinymce-editor license_key="gpl" promotion="false">
1212
&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;
1313
&lt;p style=&quot;text-align: center;&quot;&gt;&amp;nbsp;&lt;/p&gt;
1414
&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: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ <h2>TinyMCE Web Component Demo Page</h2>
1212
<h3>Attribute config</h3>
1313
<tinymce-editor autofocus
1414
toolbar="undo redo | bold"
15+
license_key="gpl"
1516
menubar="false"
1617
plugins="lists image"
1718
setup="editors.setupFn"
@@ -20,7 +21,7 @@ <h3>Attribute config</h3>
2021
promotion="false"
2122
></tinymce-editor>
2223
<h3>Default with readonly</h3>
23-
<tinymce-editor promotion="false" readonly>
24+
<tinymce-editor license_key="gpl" promotion="false" readonly>
2425
&lt;p&gt;The quick &lt;b&gt;brown&lt;/b&gt; fox.&lt;/p&gt;
2526
&lt;p&gt;Jumps over the &lt;i&gt;lazy&lt;/i&gt; dog.&lt;/p&gt;
2627
&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: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ <h2>TinyMCE WebComponent Demo: Disabled and Readonly</h2>
3131
<div id="ephox-ui">
3232
<h2>Readonly mode</h2>
3333
<button onclick="toggleReadonly()">Toggle readonly</button>
34-
<tinymce-editor id="readonly_mode" readonly></tinymce-editor>
34+
<tinymce-editor license_key="gpl" id="readonly_mode" readonly></tinymce-editor>
3535
<h2>Disabled state</h2>
3636
<button onclick="toggleDisabled()" plugins="help">Toggle disabled</button>
37-
<tinymce-editor id="disabled_state" disabled></tinymce-editor>
37+
<tinymce-editor license_key="gpl" id="disabled_state" disabled></tinymce-editor>
3838
</div>
3939
<script src="../../../node_modules/tinymce/tinymce.js"></script>
4040
<script src="../../../dist/tinymce-webcomponent.js"></script>

src/demo/html/events.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
<body>
2828
<h1>TinyMCE Web Component Events Demo Page</h1>
2929
<tinymce-editor
30+
license_key="gpl"
3031
setup="editors.setupFn"
3132
on-Init="editors.initFn"
3233
on-Change="editors.changeFn"

src/demo/ts/Server.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,14 @@ const page = (editor1Value: string, editor2Value: string, editor3Value: string,
4545
<body>
4646
<h1>TinyMCE WebComponent in Form</h1>
4747
<h2>Editor 1 (outside form with form attribute)</h2>
48-
<tinymce-editor name="editor1" form="myform">${encodeHtmlEntities(editor1Value)}</tinymce-editor>
48+
<tinymce-editor license_key="gpl" name="editor1" form="myform">${encodeHtmlEntities(editor1Value)}</tinymce-editor>
4949
<h2>Editor 2 (nested in shadow dom, outside form with form attribute)</h2>
50-
<tinymce-editor-nested nested="2" name="editor2" form="myform" value="${encodeHtmlEntities(editor2Value)}"></tinymce-editor-nested>
50+
<tinymce-editor-nested license_key="gpl" nested="2" name="editor2" form="myform" value="${encodeHtmlEntities(editor2Value)}"></tinymce-editor-nested>
5151
<form id="myform" method="POST" action="/">
5252
<h2>Editor 3 (inside form)</h2>
53-
<tinymce-editor name="editor3">${encodeHtmlEntities(editor3Value)}</tinymce-editor>
53+
<tinymce-editor license_key="gpl" name="editor3">${encodeHtmlEntities(editor3Value)}</tinymce-editor>
5454
<h2>Editor 4 (nested in shadow dom, inside form)</h2>
55-
<tinymce-editor-nested nested="2" name="editor4" value="${encodeHtmlEntities(editor4Value)}"></tinymce-editor-nested>
55+
<tinymce-editor-nested license_key="gpl" nested="2" name="editor4" value="${encodeHtmlEntities(editor4Value)}"></tinymce-editor-nested>
5656
<input type="submit" value="Submit">
5757
</form>
5858

src/main/ts/component/Editor.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ const parseNumberOrString = (value: string) => /^\d+$/.test(value) ? Number.pars
4949

5050
const configAttributes: Record<string, (v: string) => unknown> = {
5151
setup: parseGlobal, // function
52+
license_key: parseString, // string
5253
statusbar: parseBooleanOrString, // boolean
5354
toolbar: parseFalseOrString, // string or false
5455
menubar: parseFalseOrString, // string or false

0 commit comments

Comments
 (0)