I know I can get a reference to the editor DOM using FCKeditorAPI.GetInstance('body').EditorDocument
But how could I apply HTML formatting to selected text in the editor? Any pointer or tips would be much appreciated.
But how could I apply HTML formatting to selected text in the editor? Any pointer or tips would be much appreciated.

RE: How to apply HTML code to selected text?
I dunno if there's a special function that does all the job. One ugly way to do, is to get the selected text, (look the api there's a method that does it), something like :
text = FCKAPI.getSelection();
then, you can apply a style to the selection by placing it between two html tags like :
formatted_text = "<span style='my_style'>"+text+"</span>"
And then, replace this new text in the editor area with FCK.SetHTML( value );
value must contain text_before_selection + formatted_text + text_after_selection; That means when you select the text, you must have two markers, a start marker and an end marker to save in two buffers the text that is before the selection and the text that is after it.
Y.Chaouche
RE: How to apply HTML code to selected text?
RE: How to apply HTML code to selected text?
I looked into the wiki page of fckeditor and i found a more nice way to do what i described in the earlier post :
ofckeditorInstance.InserHtml(). This way you don't have to save the text before and after the selection to do a append (before + text + after).
Sorry for your issue, i don't know if the fck api have this kind of method (drag'n'drop). Maybe it is supported directly by the borwser ???
Y.Chaouche