Hello coders,
I'm in need of ASAP help with the editor. Can anyone tell me in which file is the following acomplished: determine where the cursor is in the editor (meaning whether the cursor is in a text marked as link, or in a text that is bold).
And if the cursor is in a link select the link, so it can be passed over to other functions like the "edit link" button does.
How can you acomplish this using IFRAME?
I'm in need of ASAP help with the editor. Can anyone tell me in which file is the following acomplished: determine where the cursor is in the editor (meaning whether the cursor is in a text marked as link, or in a text that is bold).
And if the cursor is in a link select the link, so it can be passed over to other functions like the "edit link" button does.
How can you acomplish this using IFRAME?
RE: determining whether cursor is inside <a href.
RE: determining whether cursor is inside <a href.
I searched the whole code for the definition of OnSelectionChange, but could not find it.
I'm new to JavaScript so any help would be greatly appreciated.
The event is fired like this:
FCK.Events.FireEvent( "OnSelectionChange" ) ;
Where is the definition of the event, or how does it trigger?
RE: determining whether cursor is inside <a href.
function OnSelectionChange()
{
if (FCKSelection.GetSelectedElement().tagName == ... )
// do your stuff...
}
FCK.Events.AttachEvent( "OnSelectionChange", OnSelectionChange ) ;
This means that my function is called whenever the selection changes, and can check to see what is currently selected, and perform some action on it.