Menu

#1 IE problem when spell checker exits

open
nobody
5
2006-06-12
2006-06-12
Anonymous
No

IE would destroy my formatting whenever it exited the
spell checker (it would remove all end of lines
characters, and would add a space at the end of every
line).

I did the following to fix it (although this is
probably just hackish):

function unescapeForSpellCheck(str)
{
var checkSpelling = str;

// Get rid of all the DHTML
that we added.
+ if (window.ActiveXObject) {
+ var regex = /<br>/gi;
+ checkSpelling =
checkSpelling.replace(regex,"\n");
+ var regex = /\r\n/;
+ checkSpelling =
checkSpelling.replace(regex,"");
+ var regex = / \n/gi;
+ checkSpelling =
checkSpelling.replace(regex,"\n");
+ }

var regex = /<.*?>/gi;
checkSpelling =
checkSpelling.replace(regex,"");

Discussion

  • Nobody/Anonymous

    Logged In: NO

    Now this is making sence...

     
  • Mark Gillespie

    Mark Gillespie - 2006-08-23

    Logged In: YES
    user_id=246574

    Thanks, seems to have fixed it here.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.