This is a migrated thread and some comments may be shown as answers.

Editor generates content

3 Answers 48 Views
WebParts for SharePoint
This is a migrated thread and some comments may be shown as answers.
Andreas Kleine
Top achievements
Rank 1
Andreas Kleine asked on 12 Feb 2008, 02:33 PM
Hello there,

today we've found out a new Bug:

If I insert a table without a tablebody in my Wiki-Content (HTML-View), the Rad-Editor inserts the tbody, when I switch to Designer-View or I finish the editing.
Example:

Start-HTMLCode:
"<table>
<tr><td>Data...</td></tr>
</table>"
-----------------------------
1st switch / Edit!
Insert of <tbody>

"<table>
<tbody>
<tr>
<td>Data...</td></tr></tbody></table>"
---------------------------------------
---------------------------------------

But if I insert this HTML-Code:
"<table>wrong
<tr><td>Data...</td></tr>
</table>"
-------------------------------
1st switch / Edit! 
Insert of <tbody> + <> Container surrounding "wrong"

"<table><>wrong </>
<tbody>
<tr>
<td>Data...</td></tr></tbody></table>"

--------------------------------
2nd switch / Edit
1rst adding "&lt;&gt;"

"<table><>&lt;&gt;wrong </>
<tbody>
<tr>
<td>Data...</td></tr></tbody></table>"
--------------------------------
3rd switch / Edit
2nd adding "&lt;&gt;"

"<table><>&lt;&gt;&lt;&gt;wrong </>
<tbody>
<tr>
<td>Data...</td></tr></tbody></table>"

and so on!!!

The same happens with this Code, after every switch/edit, the following String is added "&lt;&gt;"
"<table>
<tbody>
<tr><>&lt;&gt;wrong </>
<td>Data...</td></tr></tbody></table>"

3 Answers, 1 is accepted

Sort by
0
Tervel
Telerik team
answered on 14 Feb 2008, 05:14 PM
Hi Andreas,

Please excuse us, but we are not sure what the bug is.

The <tbody> tag is mandatory for valid HTML and XHTML and is inserted automatically by the underlying browser engine. While it is possible to remove it using some client script, in general it is good practice to have it. In case you really need to remove the <tbody> tag from the HTML we will do our best to help you out, but please provide us with more information about your scenario.

As for the content that you insert - as you note yourself - this is plain wrong. HTML and XHTML rules do not allow for any tags or any content to be inserted between <table> and <tr> tag. Doing so greatly confuses both the browser editing engine and the editor. The editor is designed and aimed at handling HTML that abides to some basic rules.
We can log the problem and attempt to improve on it, yet we would appreciate more information on your scenario - why adding content at places where it is disallowed by rules is necessary?

Looking forward to hearing from you.
Kind regards,
Tervel
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Andreas Kleine
Top achievements
Rank 1
answered on 21 Feb 2008, 10:47 AM
Hi Tervel,

Well thats exactly the problem, but we havn't inserted content at these places. The Editor inserts content at these places everytime  we edit the content.

Please don't think that we have really inserted the word "wrong" at this place, it was just to show you that the editor has inserted at this place "<>" and some other tags.
0
Lini
Telerik team
answered on 26 Feb 2008, 12:25 PM
Hi,

I am currently testing this problem with the latest RadEditor for MOSS (v4.50). I am able to reproduce the first issue (<tbody> is added in the table markup). When I paste the following content:

<table><tr><td>Test</td></tr></table>

it is changed to the following:

<table>
    <tbody>
        <tr>
            <td>Test</td>
        </tr>
    </tbody>
</table>

As my colleague already said, this is expected behavior and it is caused by the underlying browser rich text engine.

I am not able to reproduce the second problem without intentionally inserting text between the <table> or <tr> tags. The problem exists, but it is only happening if you insert text on purpose (which would break the HTML markup anyway). If you are able to reproduce this problem without manually entering any text (e.g. from the table wizard or some sequence of steps), then please tell us about it so we can investigate further.


Kind regards,
Lini
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
WebParts for SharePoint
Asked by
Andreas Kleine
Top achievements
Rank 1
Answers by
Tervel
Telerik team
Andreas Kleine
Top achievements
Rank 1
Lini
Telerik team
Share this question
or