I need your Help
How can I get text with html formating by Selection (FF2 + FF3)?
I can only select text without html formating ...
I need the functionality for an Button:
- add em.abstract for an selection, but the orginal-format should be retained.
With my Code i loose the orginal html format ...
How can I get text with html formating by Selection (FF2 + FF3)?
I can only select text without html formating ...
var fckeditr = FCKeditorAPI.GetInstance('mycontent');
var selection = fckeditr.EditorDocument.getSelection();
fckeditr.InsertHtml('<em class="abstract">'+ selection + '</em>');
I need the functionality for an Button:
- add em.abstract for an selection, but the orginal-format should be retained.
With my Code i loose the orginal html format ...

Re: get text with html formating by Selection
Re: get text with html formating by Selection
http://developer.mozilla.org/en/docs/DOM:Selection
http://forums.htmlcenter.com/programming-scripting/1020-grabbing-nodes-range-dhtml-dom.html
Re: get text with html formating by Selection
var fckeditr = FCKeditorAPI.GetInstance('mycontent'); var selection = fckeditr.EditorWindow.getSelection(); //fckeditr.InsertHtml('<em class="abstract">'+ selection + '</em>');viewtopic.php?f=6&t=8814&st=0&sk=t&sd=a&start=0#p22974