Skip to content

Commit 9119551

Browse files
committed
INT-3115: Added promotion setting to allow hiding the button
1 parent c29baa2 commit 9119551

File tree

6 files changed

+9
-5
lines changed

6 files changed

+9
-5
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></tinymce-editor>
11+
<tinymce-editor 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/common-attributes.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ <h1>TinyMCE Web Component Common Attributes Demo Page</h1>
4545
toolbar="undo redo | formatselect | bold italic backcolor |
4646
alignleft aligncenter alignright alignjustify |
4747
bullist numlist outdent indent | removeformat | help"
48-
content_css="//www.tiny.cloud/css/codepen.min.css" >
48+
content_css="//www.tiny.cloud/css/codepen.min.css"
49+
promotion="false" >
4950
&lt;p&gt;This recreates the same settings as the &lt;a href=&quot;https://www.tiny.cloud/docs/demo/basic-example/&quot;&gt;basic example&lt;/a&gt;&lt;p&gt;
5051
</tinymce-editor>
5152
<script src="../../../node_modules/tinymce/tinymce.js"></script>

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>
11+
<tinymce-editor 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
@@ -17,9 +17,10 @@ <h3>Attribute config</h3>
1717
setup="editors.setupFn"
1818
on-change="editors.changeFn"
1919
on-init="editors.initFn"
20+
promotion="false"
2021
></tinymce-editor>
2122
<h3>Default with readonly</h3>
22-
<tinymce-editor readonly>
23+
<tinymce-editor promotion="false" readonly>
2324
&lt;p&gt;The quick &lt;b&gt;brown&lt;/b&gt; fox.&lt;/p&gt;
2425
&lt;p&gt;Jumps over the &lt;i&gt;lazy&lt;/i&gt; dog.&lt;/p&gt;
2526
&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/events.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ <h1>TinyMCE Web Component Events Demo Page</h1>
3131
on-Init="editors.initFn"
3232
on-Change="editors.changeFn"
3333
on-Click="editors.clickFn"
34+
promotion="false"
3435
></tinymce-editor>
3536
<script src="../../../node_modules/tinymce/tinymce.js"></script>
3637
<script src="../../../dist/tinymce-webcomponent.js"></script>

src/main/ts/component/Editor.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,8 @@ const configAttributes: Record<string, (v: string) => unknown> = {
7171
images_upload_credentials: parseBooleanOrString, // boolean
7272
images_reuse_filename: parseBooleanOrString, // boolean
7373
icons: parseString, // name of icon pack eg. 'material'
74-
icons_url: parseString // url to icon pack js
74+
icons_url: parseString, // url to icon pack js
75+
promotion: parseBooleanOrString, // boolean
7576
};
7677

7778
const configRenames: Record<string, string> = {

0 commit comments

Comments
 (0)