Opened 16 years ago
Closed 12 years ago
#2526 closed Bug (worksforme)
InsertHTML Problem
Reported by: | Shaun | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | Core : Output Data | Version: | FCKeditor 2.6.3 Beta |
Keywords: | Cc: | COURTNEYREMES@… |
Description
This occurs when I try to use the InsertHtml method.
- Enter the source view.
- Completely clear all HTML in the editor.
- Go back to WYSIWYG view.
- Click a button which calls the following code:
content.InsertHtml('<table cellspacing="0" cellpadding="0" border="0" width="100%">' + '<tbody>' + '<tr valign="top">' + '<td> </td>' + '<td width="210"> </td>' + '</tr>' + '</tbody>' + '</table>' );
It inserts it as I expect it to, except it wraps the table in <p></p> tags.
If I try to insert the table into an existing paragraph tag, then it works as expected. I assume this is because there is already a paragraph tag wrapped around it.
I'm not familiar with modifying FCKEditor, or I'd attempt to provide a solution.
My only guess as to a fix is that the editor should determine if the html being inserted is a block-level element or not. If it isn't, then wrap in <p></p> tags.
Change History (4)
comment:1 Changed 16 years ago by
Keywords: | Confirmed added |
---|---|
Version: | FCKeditor 2.6.3 → FCKeditor 2.6.3 Beta |
comment:2 Changed 16 years ago by
Cc: | COURTNEYREMES@… added |
---|
comment:3 Changed 16 years ago by
Component: | General → Core : Output Data |
---|
Similar ticket #2781. Probably due to the same reason.
comment:4 Changed 12 years ago by
Resolution: | → worksforme |
---|---|
Status: | confirmed → closed |
This is not any more an issue with CKEditor 4.
In 2.6.2 there is <p> </p> before inserted code.
In 2.6.3 Beta code is wrapped in <p></p> (oFCKeditor.Config[ "EnterMode" ]= "p" ;)