title: Select TinyMCE template: set content instead of append to the current content
body: <p>Context: C# .NET Web application.</p>
  
  <p><strong>TinyMCE text editor.</strong> When selecting a template, the text is appended to the content of the textarea.</p>
  
  <p>For this specific textarea, the productowner requires the content to be set to the text of the selected template, not appended to the already set content. So the current content needs to be cleared first, when the template is selected.</p>
  
  <p>Can anybody please tell me, how this can be achieved?</p>
  
  <p>Not that it is relevant, but here is a snippet of my code and a screenshot:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  var e = tinyMCE.get("MailText");
  if (!e) {
      tinymce.init({
      height: 200,
      selector: "textarea#MailText",
      theme: "modern",
      plugins: ["template","code"],
      templates: [ @Html.Raw(finalizeQueryVm.Templates)],
          statusbar: false,
          resize: false,
          toolbar1: "insertfile undo redo | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist | code",
  });
  }
  </code></pre>
  
  <p></p>
  
  <p><a href="https://i.stack.imgur.com/Lr9DY.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Lr9DY.png" alt="enter image description here"></a></p>