Opened 17 years ago
Closed 12 years ago
#1605 closed Bug (fixed)
[Firefox] Unnecessary <p> tags are inserted in InsertHtml function of FCKEditor Object
Reported by: | Dr. Sharad Kelkar | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | General | Version: | FCKeditor 2.5 |
Keywords: | Firefox | Cc: |
Description
Unnecessary <p> tags are inserted in InsertHtml function of FCKEditor Object. Suppose we insert HTML text programmatically as follows
var html_text = " This is <b>some <span style=\" color: maroon; \" >HTML</span></b> text " ; var ed = FCKeditorAPI.GetInstance('TEXT') ed.InsertHtml(html_text);
Than some extra <p> tags appear in the inserted text. ( confirmed by viewing HTML source )
This problem is seen only in Firefox 2/3 Beta ( Or any GECKO browser )
It is not seen with IE7 / Safari 3.04 or Opera 9.5 Tested on Windows XP SP2 Thanks
Attachments (1)
Change History (7)
comment:1 Changed 17 years ago by
Keywords: | Pending WorksForMe added; Insert HTML extra P tag removed |
---|
comment:2 Changed 17 years ago by
On your request I am providing link for test case: Just Click here: http://vrunda.dyndns.org/fcktest/index.html
Unnecessary <p> tags get inserted in Firefox only, not in other browsers. First click Insert HTML button. Click on "view source", and come back to normal view.
Then you will find one line inserted between words "some HTML " and "text with colors formatted."
comment:3 Changed 17 years ago by
Hi!
I was able to reproduce your problem on you page however my local testing doesn't didn't show any problem. My script:
<script type="text/javascript"> var oFCKeditor = new FCKeditor('FCKeditor1'); oFCKeditor.BasePath = "fckeditor/"; oFCKeditor.Height = 300 ; oFCKeditor.Config["CustomConfigurationsPath"] = "/new/myconfig.js" oFCKeditor.Value = '<p>Hello, I am Mister X ...<\/p>' ; oFCKeditor.Create(); // This is a sample code for reproduction of bug #1605 function test1() { var text = 'This is <b>some <span style="color: maroon;">HTML</span></b> text with colors formatted.' ; FCKeditorAPI.GetInstance('FCKeditor1').InsertHtml(text); return false;} </script> </div> <br /> <a href="javascript:void(0);" onclick="test1();">Test 1</a>
It works perfectly fine using versions 2.5.1, 2.6 beta ane the latest SVN.
comment:4 Changed 17 years ago by
Keywords: | Confirmed Firefox added; Pending WorksForMe removed |
---|---|
Summary: | Unnecessary <p> tags are inserted in InsertHtml function of FCKEditor Object ( Only in FIREFOX ) → [Firefox] Unnecessary <p> tags are inserted in InsertHtml function of FCKEditor Object |
Ok I reviewed your bug again. And I can defiantly confirm it. It seems it is related to oFCKeditor.ReplaceTextarea();
function because in other cases (as in the script above) it works OK.
I've attached a sample page for reproduction of this bug based on your sample page.
Thanks for investigating.
comment:5 Changed 17 years ago by
Persistent problem noticed even in IE7 and Safari, and other browsers that extra unwanted <p> get inserted around editor text when you switch back and forth between source view and WYSIWYG mode.
comment:6 Changed 12 years ago by
Resolution: | → fixed |
---|---|
Status: | confirmed → closed |
This issue expired.
Hi!
Could you please provide us the final output you are having in the reported test case? Please also indicate what you would expect to have.
Thanks