Skip to content

Commit 94248c9

Browse files
DOC-2215: add new feature to 6.8 release project for AdvTemplate. (#2985)
* DOC-2215: add new feature to 6.8 release project for AdvTemplate. * DOC-2215: add mce-clipboard demo to advanced tempaltes new feature sub-section. * Update modules/ROOT/examples/live-demos/advtemplate-mce-clipboard/index.html Co-authored-by: vpyshnenko <[email protected]> * DOC-2215: updated demo files to remove template categories. * Update modules/ROOT/examples/live-demos/advtemplate-mce-clipboard/index.html * Update modules/ROOT/examples/live-demos/advtemplate-mce-clipboard/index.html Co-authored-by: vpyshnenko <[email protected]> * Update modules/ROOT/pages/advanced-templates.adoc * DOC-2215: update demo and js. * Update index.html Co-authored-by: vpyshnenko <[email protected]> * DOC-2215: correcting index.js backslash for antora syntax. * DOC-2215: updating with new {{prefix}}mce-clipboard{{suffix}} tags for antora to render correctly in live-demos. * Update index.html Co-authored-by: vpyshnenko <[email protected]> * Update index.html Co-authored-by: vpyshnenko <[email protected]> * Update index.html Co-authored-by: vpyshnenko <[email protected]> --------- Co-authored-by: vpyshnenko <[email protected]>
1 parent 596ca3c commit 94248c9

File tree

4 files changed

+56
-0
lines changed

4 files changed

+56
-0
lines changed

changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ The format is loosely based on [Keep a Changelog](https://keepachangelog.com/en/
66

77
### Unreleased
88

9+
- DOC-2215: add new feature `mce-clipboard` to 6.8.1 release project for AdvTemplate.
910
- DOC-2216: add new single `js` bundling feature example for `Bundling an npm version of TinyMCE with ES6 and Vite`.
1011
- DOC-2202: add new `bespoke` button text updates to `events.adoc` file.
1112
- DOC-2209: add new default_font_stack `user-formatting-option.adoc` file.
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<textarea id="advanced-template-mce-clipboard">
2+
<h3>Using the {{prefix}}mce-clipboard{{suffix}} Marker with Advanced Templates</h3>
3+
<h4>Before inserting the example template, <strong>type in your name</strong> to the editor, select and copy it to your clipboard by using <strong>Ctrl+C</strong> for Windows users, or <strong>⌘+C</strong> for Mac users</h4>
4+
<div>
5+
<ol>
6+
<li>
7+
Select <strong>Template…</strong> from the <strong>Insert</strong> menu or by selecting the <strong>Insert template</strong> toolbar button.
8+
</li>
9+
<li>
10+
Select a template to add to the TinyMCE document from the <strong>Templates</strong> dialog that presents.
11+
<ol>
12+
<li>
13+
<p>Click the <strong>Without an <code>{{prefix}}mce-clipboard{{suffix}}</code> marker</strong> template.</p>
14+
<p>The template should be inserted into the editor content regardless of any clipboard content./p>
15+
</li>
16+
<li>
17+
<p>Click the <strong>With a <code>{{prefix}}mce-clipboard{{suffix}}</code> marker</strong> template.</p>
18+
<p><em>When a template <strong>does</strong> contain a valid {{prefix}}mce-clipboard{{suffix}} marker, the current content saved in the users clipboard will <strong>replace</strong> the marker when the user inserts the template.</em></p>
19+
</li>
20+
</ol>
21+
</li>
22+
<li>
23+
Click <strong>Insert</strong> or press <strong>Return</strong>.
24+
</li>
25+
</ol>
26+
</div>
27+
</textarea>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
tinymce.init({
2+
selector: "textarea#advanced-template-mce-clipboard",
3+
plugins: [ "advtemplate", "code", "help"],
4+
toolbar: "undo redo | inserttemplate",
5+
advtemplate_templates: [
6+
{
7+
title: 'Without an mce-clipboard marker',
8+
content: '<p>Hi , Thank you for visiting this page. We truly appreciate and value your feedback and any feature requests you may have While you are here, take a moment to explore mce-cursor, its another powerful tool designed for Advanced Templates</p>'
9+
},
10+
{
11+
title: 'With an mce-clipboard marker',
12+
content: '<p>Hi {{prefix}}mce-clipboard{{suffix}}, Thank you for visiting this page. We truly appreciate and value your feedback and any feature requests you may have While you are here, take a moment to explore mce-cursor {{prefix}}mce-clipboard{{suffix}}, its another powerful tool designed for Advanced Templates</p>'
13+
}
14+
],
15+
});

modules/ROOT/pages/advanced-templates.adoc

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,19 @@ Also, and as shown in the interactive demonstration below, the xref:mergetags.ad
151151
liveDemo::{plugincode}-insertionpoint[]
152152

153153

154+
[[the-mce-clipboard-marker]]
155+
=== The mce-clipboard marker
156+
157+
include::partial$misc/admon-requires-6.8v.adoc[]
158+
159+
The `+{{mce-clipboard}}+` marker is a fixed string for adding to any template.
160+
161+
The string to add is as follows: `+{{mce-clipboard}}+`.
162+
163+
Whenever a user inserts a template containing the `+{{mce-clipboard}}+` marker, the editor will replace those markers with the actual content from the clipboard.
164+
165+
liveDemo::{plugincode}-mce-clipboard[]
166+
154167
[[options]]
155168
== Options
156169

0 commit comments

Comments
 (0)