Following is the problem: I have managed to setup TinyMCE-templates in order to give my customer the possibility to insert more complex HTML-structures without having to deal with HTML-code. Here is a template-example:
<div class="demo">
<img class="floatLeft" src="assets/images/demo.jpg" alt="" />
<p>some text here</p>
</div>
Everything works fine - but: When i try to insert another template it is being inserted
inside the previous block resulting in something like this:
<div class="demo">
<img class="floatLeft" src="assets/images/demo.jpg" alt="" />
<p>some text here</p>
<div class="demo">
<img class="floatLeft" src="assets/images/demo.jpg" alt="" />
<p>some text here</p>
</div>
</div>
But it should be:
<div class="demo">
<img class="floatLeft" src="assets/images/demo.jpg" alt="" />
<p>some text here</p>
</div>
<div class="demo">
<img class="floatLeft" src="assets/images/demo.jpg" alt="" />
<p>some text here</p>
</div>
Of course i can correct the code in HTML-editing-mode but that’s no option for my customer. Is there any solution for the problem or at least a workaround?
I am using MODx 0.9.6.3 with the TinyMCE-editor that is being shipped with that release.
Thank you for any help!