Before Caret in Firefox

Here we discussing all aspects of integration of FCKeditor with other web applications, like Mambo, Drupal, etc.

Before Caret in Firefox

Postby Casaleggio » Wed Mar 10, 2010 3:53 am

Hi everyone,
I'm developing a plugin for FCKeditor 2.6 version integrated in Mediawiki .
I need the equivalent of above code in firefox (and Googole ChromeChrome) for return me alls html text in textarea before the caret position.
I accomplished it in IE with this code:
Code: Select all
   
   if (FCK.EditorDocument.selection)
      {
      var Sel = FCK.EditorDocument.selection.createRange();
   
      Sel.moveStart ('character', -1);
      Beforecaret = Sel.htmlText;
      }

I need it this to select (if exists ) a particolar template before caret on press backspace key.
Any Idea?

Thanks in advance for help
Casaleggio
 
Posts: 1
Joined: Wed Mar 10, 2010 3:51 am

Return to FCKeditor Integration Troubles

Who is online

Users browsing this forum: No registered users and 1 guest