Opened 8 years ago

Closed 8 years ago

#14433 closed Bug (invalid)

The CKEditor4.5.6 is changing the HTML source code

Reported by: Pallavi Owned by:
Priority: Normal Milestone:
Component: Server : ASP.Net Version: 4.5.6
Keywords: Cc:

Description (last modified by Jakub Ś)

Currently we have upgraded ckEditor from 3.3.1 to 4.5.6 . The ckEditor4.5.6 is changing the HTML source code .

1.Paste the below HTML in source

<table border="1" cellpadding="1" cellspacing="0" style="width: 50%">
                <tbody>   
                                      <tr>
                                                <th align="left" width="40%"> Name</th>
                                                <th align="left" width="35%"> Dates</th>
                                     </tr>
                                         [[FORALL]]
                                      <tr>
                                                <td>[[NAME]]</td>
                                                <td>[[DATE]]</td>
                                      </tr>
                                         [[LOOP]]
                </tbody>
          </table>

2.Switch to WYSIWYG mode.

3.Come back to source mode, ckEditor4.5.6 changes the HTML source code.

Expected result

Source Mode :

<table border="1" cellpadding="1" cellspacing="0" style="width: 50%">
                <tbody>   
                                      <tr>
                                                <th align="left" width="40%"> Name</th>
                                                <th align="left" width="35%"> Dates</th>
                                     </tr>
                                         [[FORALL]]
                                      <tr>
                                                <td>[[NAME]]</td>
                                                <td>[[DATE]]</td>
                                      </tr>
                                         [[LOOP]]
                </tbody>
</table>

Actual result

Source Mode :

[[FORALL]] [[LOOP]]
<table border="1" cellpadding="1" cellspacing="0" style="width: 50%;">
	<tbody>
		<tr>
			<th align="left" width="40%">Name</th>
			<th align="left" width="35%">Dates</th>
		</tr>
		<tr>
			<td>[[NAME]]</td>
			<td>[[DATE]]</td>
		</tr>
	</tbody>
</table>

Other details

Browser – IE 11 OS – Windows 7 ckEditor – 4.5.6 Application – ASP.Net (Visual Studio 2013)

Issue

The tags FORALL? & LOOP? tags gets automatically move above the table tag in source mode. We don’t want these tags to be moved above the table element in source mode. These tags should stay at the same position inside table element in source mode. We tried with config.protectedSource.push property but then these tags gets invisible on WYSIWYG Mode. We actually want these tags to be visible above the table element in WYSIWYG Mode.

Could you please guide how can we achieve this ?

Attachments (1)

Expected result_CKEditor4.5.6_HTMLSource.docx (16.7 KB) - added by Pallavi 8 years ago.

Download all attachments as: .zip

Change History (3)

Changed 8 years ago by Pallavi

comment:1 Changed 8 years ago by Jakub Ś

Description: modified (diff)

comment:2 Changed 8 years ago by Jakub Ś

Resolution: invalid
Status: newclosed

Please check the spec and permitted content inside table - https://www.w3.org/TR/html-markup/table.html#table.

Editor behaviour is correct in this case. It removed disallowed content from table.

To prevent it from happening, you can either use protectdSource or put your custom tags inside tr td and remove them later.

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy