#13 Force Clean Word

closed
Editor (144)
5
2004-05-09
2004-04-26
Anonymous
No

Hi all,
This is a fantastic project.

I have a situation where I don't want to give people the
choice of Cleaning Word input, and WANT to always
clean it.

I've added a quick IF clause to the js/fck_editor.js file
on line 186 (edit starts on 192) and created a config
variable: config.ForceCleanPasteFromWord = true ; in
my config file.

The edited code is below.

Don't know if it's of use to anyone else.

Alan Holland

ash at theleys dot net

else if (config.AutoDetectPasteFromWord &&
BrowserInfo.IsIE55OrMore)
{
var sHTML = GetClipboardHTML() ;
var re = /<\w[^>]* class="?MsoNormal"?/gi ;
if ( re.test( sHTML ) )
{
if ( config.ForceCleanPasteFromWord )
{
cleanAndPaste( sHTML ) ;
return false ;
} else {
if ( confirm( lang["PasteWordConfirm"] ) )
{
cleanAndPaste( sHTML ) ;
return false ;
}
} // End if
}
}

Discussion

  • Frederico Caldeira Knabben

    • assigned_to: nobody --> fredck
    • status: open --> closed
     
  • Frederico Caldeira Knabben

    Logged In: YES
    user_id=572424

    Version 1.6 brings this feature.

    Best regards,
    FredCK

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks