How do I get the checked state of a checkbox in the sourcecode in tinyMCE?
<p>I'm using tinyMCE as a html-editor and I want to use checkboxes in my code where their toggled state is saved in the source-code.</p>

<p>Now I only get the state as how I defined in the beginnning, not after I toggled them in the editor.</p>

<h3>code</h3>

<p>This the code that I enter into tinyMCE, but the new state does not get reflected after I toggle the checkbox.</p>

<pre><code>&lt;textarea&gt;
  &lt;input type="checkbox" name="checkbox" id="checkbox2" checked="checked" /&gt; &lt;label for="checkbox"&gt;check&lt;/label&gt;
  &lt;br /&gt;
  &lt;input type="checkbox" name="checkbox" id="checkbox2"/&gt; &lt;label for="checkbox"&gt;no-check&lt;/label&gt;&lt;/div&gt;
&lt;/textarea&gt;
</code></pre>

<h3>Codepen</h3>

<p>I made <a href="http://codepen.io/anon/pen/OXEGvo" rel="nofollow">an example</a> where you can check it out at codepen.</p>