#1858: FF:cannot format entire table column - adds code outside <td></td> tags
of
1st cell
-----------------------------+----------------------------------------------
Reporter: tan | Type: Bug
Status: new | Priority: Normal
Milestone: | Component: General
Version: FCKeditor 2.5.1 | Keywords: HasPatch Confirmed Firefox
-----------------------------+----------------------------------------------
Comment(by jor...@…):
I don't know if that patch works or not, because I do not know how to
apply it. It's still broken in the newest version of FCK though, so this
is the solution that fixed it for me:
{{{
// Check if there are selected cells, if there are then move the selection
// inside the TDs so the following while loop works properly
// Don't create a bookmark in firefox as it won't reselect the table cells
as
// they were before, and firefox doesn't lose the selection in the iframe
anyway.
var tds = FCKTableHandler.GetSelectedCells();
if (tds && FCKBrowserInfo.IsGecko) {
range.SetStart(tds[0], 1);
range.SetEnd(tds.last(), 1);
} else {
// Store a bookmark of the selection since the paragraph iterator might
// change the DOM tree and break selections.
var bookmark = range.CreateBookmark();
}
}}}
And then make sure bookmark exists.
{{{
if (bookmark) {
range.MoveToBookmark( bookmark ) ;
range.Select() ;
}
}}}
--
Ticket URL: <http://dev.fckeditor.net/ticket/1858#comment:4>
FCKeditor <http://www.fckeditor.net/>
The text editor for Internet
------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
FCKeditor-Trac mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fckeditor-trac