#2526: InsertHTML Problem
----------------------+-----------------------------------------------------
Reporter: simshaun | Owner:
Type: Bug | Status: new
Priority: Normal | Milestone:
Component: General | Version: FCKeditor 2.6.3
Keywords: |
----------------------+-----------------------------------------------------
This occurs when I try to use the InsertHtml method.
1. Enter the source view.
2. Completely clear all HTML in the editor.
3. Go back to WYSIWYG view.
4. 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.
--
Ticket URL: <http://dev.fckeditor.net/ticket/2526>
FCKeditor <http://www.fckeditor.net/>
The text editor for Internet
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
FCKeditor-Trac mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fckeditor-trac