Opened 13 years ago
Closed 13 years ago
#8396 closed Bug (invalid)
<p> inside <strong> inside <p> erases all the text beneath
Reported by: | Daniel | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | General | Version: | FCKeditor 2.6.6 |
Keywords: | Cc: | vedmack@… |
Description
Hi
First of all i'm using FCKeditor 2.6.2 version (2.6.6 gives a bit different error - which i will describe beneath)
In order to recreate the bug in the text editor I entered the source mode of the editor (clicked the source button in the toolbar) and typed :
<p>one</p> <p><strong><p>two</p></strong></p> <p>three</p>
notice the "<p>two</p>" between the strong tags
not if u switch back to normal mode and i see the one two three
in the editor , and i select the entire "two" word and click on the "bold" button on the toolbar i get the line being deleted and the line beneath it too...
if I type the same text but without the extra <p> tags inside the <strong> tag all works well, this is looks like this
<p>one</p> <p><strong>two</strong></p> <p>three</p>
NOW, i did some debugging and found out that in the fckstyles.js file in the RemoveFromRange function , when i got the extra <p> tags the FCKEDITOR recognize the word "two" as DispHTMLDocument node with NodeType= 3 and NodeName= #text
While without the extra <p> node the FCKEDITOR recognize the word "two" as DispHTMLPhraseElement node with NodeType= 1 and NodeName= #STRONG,
How can it be fixed? cause I only gave a simple example, but this happens in larger text in which for some reasons the extra <p> appears allot!
Same input in 2.6.6 version gives the following results after selecting the "two " word (with a little space after it) and click on the bold button i get js error object required in fckdomtools.js cause existingNode and after I click yes/no in the alert message the source of the text looks like this
<p>one</p> <p> <p> </p> <p>three</p> </p> <p><span id="1316587844776S" style="display: none"> </span>two</p> <p><span id="1316587844745E" style="display: none"> </span></p>
if i select only the "two" without any spaces before or after the source of the text looks like this
<p>one</p> <p> <p> </p> <p>three</p> </p> <p>two</p>
notice that in both cases the "two" being shifted to the bottom of the page
Thanks ahead,
Regards,
Daniel.R
Change History (1)
comment:1 Changed 13 years ago by
Keywords: | 2.6.2 2.6.6 removed |
---|---|
Resolution: | → invalid |
Status: | new → closed |
FCKeditor was retired and is no longer supported. All active development was moved to its predecessor, CKEditor 3.x, that is a fully mature and far superior product. We recommend you upgrade as soon as possible.
Second - what you have shown me is invalid HTML. You are closing block elements inside inline elements.
NOTE: After you upgrade to CKEditor and you will test the same code you will get
This is becuse browser sees your code as:
Empty inline elements will be removed and blocks will be filled with
You can test this using the code below:
There are two solutions either start using valid HTML or use the CKEditor protect source feature to leave his specific code alone.