-
Notifications
You must be signed in to change notification settings - Fork 220
Expand file tree
/
Copy pathindex.html
More file actions
46 lines (33 loc) · 2.95 KB
/
index.html
File metadata and controls
46 lines (33 loc) · 2.95 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<textarea id="template-insertionpoint">
<h3>Using the Insertion Point Marker with Templates (and Merge Tags)<h3>
<h4>To insert a template</h4>
<ol>
<li>
Select <strong>Template…</strong> from the <strong>Insert</strong> menu or<br />
select the <strong>Insert template</strong> toolbar button.
</li>
<li>
Select the template to add to the TinyMCE document from the <strong>Templates</strong> dialog that presents.
<ol>
<li>
Click the <strong>Without an insertion point marker</strong> category to see and select a template that does not use the <code>{{prefix}}mce-cursor{{suffix}}</code> insertion point marker.
</li>
<li>
Click the <strong>With an insertion point marker</strong> category to see and select a template that does use the <code>{{prefix}}mce-cursor{{suffix}}</code> insertion point marker.
</li>
</ol>
</li>
<li>click <strong>Insert</strong> or press <strong>Return</strong>.</li>
</ol>
<h4>Noting the difference</h4>
<p>The <em>Name entry prompt</em> template without the <code>{{prefix}}mce-cursor{{suffix}}</code> insertion point marker, places the insertion point at the end of the template text.</p>
<p>By contrast, the <em>Name entry prompt</em> template with the <code>{{prefix}}mce-cursor{{suffix}}</code> insertion point marker places the insertion point at the right spot for someone to enter their name, as requested.</p>
<p>Similarly, the <em>Letter outline</em> template without the <code>{{prefix}}mce-cursor{{suffix}}</code> insertion point marker, places the insertion point at the end of the template text.</p>
<p>And, by equivalent contrast, the <em>Letter outline</em> template with the <code>{{prefix}}mce-cursor{{suffix}}</code> insertion point marker places the insertion point at the right spot for someone to start writing a letter.</p>
<h4>Working with Merge Tags</h4>
<p>The second pre-defined template in this demonstration — the <em>Letter outline</em> template — shows the <code>{{prefix}}mce-cursor{{suffix}}</code> string working in conjunction with the <a href="https://tiny.cloud/docs/tinymce/8/mergetags/">Merge Tags</a> Premium plugin.</p>
<p>The fixed string that is the Insertion Point Marker uses the same delimiting characters as are used by default by the Merge Tags plugin.</p>
<p>The <strong>Merge Tags</strong> plugin knows nothing about the <code>{{prefix}}mce-cursor{{suffix}}</code> being a marker string for the <strong>Templates</strong> plugin. And, if this particular string was used in a Merge Tags configuration, the <strong>Merge Tags</strong> plugin would recognise it and substitute it with whatever contents it was set to substitute, as expected.
<p>The <strong>Templates</strong> plugin removes the Insertion Point Marker before inserting a template containing the string in to a TinyMCE instance, however.</p>
<p>Consequently the <strong>Templates</strong> insertion point marker string is never seen by the <strong>Merge Tags</strong> plugin.</p>
</textarea>