Currently if an object node like img or table is used
with FCKSelection.SelectNode in IE the node becomes
selected as text, not showing the same resizing widgets
or updating the style dropdown.
It doesn't seems to be a way to tell before hand if a
node is an object or not so it must be done with a try
catch statement:
FCKSelection.SelectNode = function( node )
{
FCK.Focus() ;
FCK.EditorDocument.selection.empty() ;
try {
var oRange =
FCK.EditorDocument.body.createControlRange() ;
oRange.addElement( node ) ;
} catch(e) {
var oRange = FCK.EditorDocument.selection.createRange() ;
oRange.moveToElementText( node ) ;
}
oRange.select() ;
}
(a div with style="10%" is an object, but not without
that style, so tag names can't be used)
Logged In: YES
user_id=572424
Hello Alfonso, could you please give us a sample on how
this behaviour would change the editor usage?
Logged In: YES
user_id=1356422
I think that currently the SelectNode function isn't used
very much, so the problem isn't easily found and it might
not be a neccesary patch right now for everybody.
But if for example you try to provide a way to select a
table from a td you will find that the selection is TEXT
instead of CONTROL, and the styles combo don't work for the
"selected" table. The problem will appear whenever someone
tries to develop code to select "objects".
Logged In: YES
user_id=572424
Hi,
This patch, or a similar implementation, has been included in
FCKeditor and has been committed in the SVN. It will be
available in the next release.
For more information about the FCKeditor SVN system, please use
the following URL:
https://sourceforge.net/svn/?group_id=75348
Best regards,
FredCK
http://www.fckeditor.net
"Support Open Source Software... What about a donation today?"
PS.: This is a canned response.