1

Topic: Label tag doubling.

Hello, i am encountering a very odd problem, and google doesn't really help me.
I have a label that contains a number of other elements inside. When the code passes through tinymce the label is doubled, after the first element, and all the other elements are put outside of the label.
below is a small example that can be pasted (by editing source code) in any tinymce window, and the effect will happen.

<label class="tab-label">
    <input class="tab-radio" type="radio" name="page" value="page1" />
    <h2 class="tab">Header2</h2>
    <div class="tab-page" id="page1" contenteditable="false">
        <h1>Header1</h1>
            <p>Line1.</p>
            <p>Line2.</p>
            <p>Line3.</p>
            <p>Line4</p>
             <p>Line5 </p>
    </div>
</label>

and here is what usually is created

<p><label class="tab-label"><label class="tab-label"> <input class="tab-radio" name="page" type="radio" value="page1" /></label></label></p>
<h2 class="tab">Header2</h2>
<div id="page1" class="tab-page" contenteditable="false">
<h1>Header1</h1>
<p>Line1.</p>
<p>Line2.</p>
<p>Line3.</p>
<p>Line4</p>
<p>Line5</p>
</div>

If anyone has any idea how this can be circumvented, i would much appreciate(or at least a hint of something i should read - i didn't find anything about labels in the documentation)

2

Re: Label tag doubling.

According to the specs the <label> element must not contain any block-level elements. You are violating them! TinyMCE tries to produce compliant code - there is your conflict.

Greetings from Germany,

Felix Riesterer.
-- I am neither Moxiecode nor Ephox! --