Ticket #2685: 2685.patch
File 2685.patch, 12.4 KB (added by , 15 years ago) |
---|
-
_whatsnew.html
37 37 <p> 38 38 New Features and Improvements:</p> 39 39 <ul> 40 <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2685">#2685</a>] Integration 41 with "Web Spell Checker", a <strong>zero installation and free spell checker</strong> 42 provided by SpellChecker.net. This is now the default spell checker in the editor 43 (requires internet connection). All previous spell checking solutions are still 44 available.</li> 40 45 <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2430">#2430</a>] In the table 41 46 dialog it's possible to create header cells in the first row (included in a thead element) 42 47 or the first column of the table. </li> -
editor/_source/commandclasses/fckspellcheckcommand_gecko.js
25 25 var FCKSpellCheckCommand = function() 26 26 { 27 27 this.Name = 'SpellCheck' ; 28 this.IsEnabled = ( FCKConfig.SpellChecker == 'SpellerPages' ) ;28 this.IsEnabled = ( FCKConfig.SpellChecker != 'ieSpell' ) ; 29 29 } 30 30 31 31 FCKSpellCheckCommand.prototype.Execute = function() 32 32 { 33 FCKDialog.OpenDialog( 'FCKDialog_SpellCheck', 'Spell Check', 'dialog/fck_spellerpages.html', 440, 480 ) ; 33 switch ( FCKConfig.SpellChecker ) 34 { 35 case 'SpellerPages' : 36 FCKDialog.OpenDialog( 'FCKDialog_SpellCheck', 'Spell Check', 'dialog/fck_spellerpages.html', 440, 480 ) ; 37 break; 38 39 default : 40 FCKDialog.OpenDialog( 'FCKDialog_SpellCheck', 'Spell Check', 'wsc/w.html', 530, 480 ) ; 41 } 34 42 } 35 43 36 44 FCKSpellCheckCommand.prototype.GetState = function() -
editor/_source/commandclasses/fckspellcheckcommand_ie.js
25 25 var FCKSpellCheckCommand = function() 26 26 { 27 27 this.Name = 'SpellCheck' ; 28 this.IsEnabled = ( FCKConfig.SpellChecker == 'ieSpell' || FCKConfig.SpellChecker == 'SpellerPages' );28 this.IsEnabled = true ; 29 29 } 30 30 31 31 FCKSpellCheckCommand.prototype.Execute = function() … … 39 39 case 'SpellerPages' : 40 40 FCKDialog.OpenDialog( 'FCKDialog_SpellCheck', 'Spell Check', 'dialog/fck_spellerpages.html', 440, 480 ) ; 41 41 break ; 42 43 default : 44 FCKDialog.OpenDialog( 'FCKDialog_SpellCheck', 'Spell Check', 'wsc/w.html', 530, 480 ) ; 42 45 } 43 46 } 44 47 -
editor/wsc/ciframe.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> 2 <!-- 3 * FCKeditor - The text editor for Internet - http://www.fckeditor.net 4 * Copyright (C) 2003-2008 Frederico Caldeira Knabben 5 * 6 * == BEGIN LICENSE == 7 * 8 * Licensed under the terms of any of the following licenses at your 9 * choice: 10 * 11 * - GNU General Public License Version 2 or later (the "GPL") 12 * http://www.gnu.org/licenses/gpl.html 13 * 14 * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") 15 * http://www.gnu.org/licenses/lgpl.html 16 * 17 * - Mozilla Public License Version 1.1 or later (the "MPL") 18 * http://www.mozilla.org/MPL/MPL-1.1.html 19 * 20 * == END LICENSE == 21 --> 22 <html> 23 <head> 24 <title></title> 25 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 26 <script type="text/javascript"> 27 function gup( name ) 28 { 29 name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]"); 30 var regexS = "[\\?&]"+name+"=([^&#]*)"; 31 var regex = new RegExp( regexS ); 32 var results = regex.exec( window.location.href ); 33 if( results == null ) 34 return ""; 35 else 36 return results[1]; 37 } 38 39 // intermediate document with the same domain as destinatioin frame 40 // destinatioin is a topnav frame in frameset.html (top.html - template) 41 function sendData2Master(){ 42 43 var destination = parent.parent; 44 45 try { 46 if (destination.XDTMaster) { //&& window.confirm(gup('cmd') 47 var t = destination.XDTMaster.read([gup('cmd'), gup('data')]); 48 //console.info("%s client iframe to XDTMaster %o" ,t,[gup('cmd'), gup('data')]); 49 50 window.clearInterval(interval); 51 } else { 52 //console.info("XDTMaster are not exist"); 53 /*jsl:pass*/ 54 } 55 56 } catch (err) { 57 //alert("oooooooooo"); 58 } 59 } 60 61 function onLoad (){ 62 interval = window.setInterval(sendData2Master,100); 63 } 64 </script> 65 </head> 66 <body onload="onLoad()"> 67 <p></p> 68 </body> 69 </html> -
editor/wsc/tmpFrameset.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd"> 2 <!-- 3 * FCKeditor - The text editor for Internet - http://www.fckeditor.net 4 * Copyright (C) 2003-2008 Frederico Caldeira Knabben 5 * 6 * == BEGIN LICENSE == 7 * 8 * Licensed under the terms of any of the following licenses at your 9 * choice: 10 * 11 * - GNU General Public License Version 2 or later (the "GPL") 12 * http://www.gnu.org/licenses/gpl.html 13 * 14 * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") 15 * http://www.gnu.org/licenses/lgpl.html 16 * 17 * - Mozilla Public License Version 1.1 or later (the "MPL") 18 * http://www.mozilla.org/MPL/MPL-1.1.html 19 * 20 * == END LICENSE == 21 --> 22 <html> 23 <head> 24 <title></title> 25 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 26 <script type="text/javascript"> 27 function doLoadScript (url) { if (!url) return false; var h = document.getElementsByTagName("head")[0]; var s = document.createElement("script"); s.type = "text/javascript" ; s.src = url ; h.appendChild(s); return true;} 28 function tryLoad (){ 29 if (typeof(opener) == 'undefined' || !opener){ 30 opener = parent; 31 } 32 // get access to global parameters 33 oParams = opener.oldFramesetPageParams; 34 // make frameset rows string prepare 35 sFramesetRows = ( parseInt(oParams.firstframeh,10) || '30') + ",*,"+( parseInt(oParams.thirdframeh,10) || '150')+",0"; 36 document.getElementById('itFrameset').rows = sFramesetRows; 37 // dynamic including init frames and crossdomain transport code 38 // from config sproxy_js_frameset url 39 var addScriptUrl = oParams.sproxy_js_frameset; 40 doLoadScript(addScriptUrl); 41 } 42 </script> 43 </head> 44 <frameset id="itFrameset" onload="tryLoad();" border="0" rows="30,*,*,0"> 45 <frame scrolling="no" framespacing="0" frameborder="0" noresize="noresize" marginheight="0" marginwidth="2" src="" name="navbar"></frame> 46 <frame scrolling="auto" framespacing="0" frameborder="0" noresize="noresize" marginheight="0" marginwidth="0" src="" name="mid"></frame> 47 <frame scrolling="no" framespacing="0" frameborder="0" noresize="noresize" marginheight="1" marginwidth="1" src="" name="bot"></frame> 48 <frame scrolling="no" framespacing="0" frameborder="0" noresize="noresize" marginheight="1" marginwidth="1" src="" name="spellsuggestall"></frame> 49 </frameset> 50 </html> -
editor/wsc/w.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> 2 <!-- 3 * FCKeditor - The text editor for Internet - http://www.fckeditor.net 4 * Copyright (C) 2003-2008 Frederico Caldeira Knabben 5 * 6 * == BEGIN LICENSE == 7 * 8 * Licensed under the terms of any of the following licenses at your 9 * choice: 10 * 11 * - GNU General Public License Version 2 or later (the "GPL") 12 * http://www.gnu.org/licenses/gpl.html 13 * 14 * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") 15 * http://www.gnu.org/licenses/lgpl.html 16 * 17 * - Mozilla Public License Version 1.1 or later (the "MPL") 18 * http://www.mozilla.org/MPL/MPL-1.1.html 19 * 20 * == END LICENSE == 21 --> 22 <html> 23 <head> 24 <title>Untitled Document</title> 25 <script src="http://loader.spellchecker.net/sproxy_fck/sproxy.php?plugin=fck2&customerid=1:ua3xw1-2XyGJ3-GWruD3-6OFNT1-oXcuB1-nR6Bp4-hgQHc-EcYng3-sdRXG3-NOfFk&cmd=script&doc=wsc&schema=22" type="text/javascript"></script> 26 <script type="text/javascript"> 27 28 var oEditor = window.parent.InnerDialogLoaded() ; 29 var FCKConfig = oEditor.FCKConfig; 30 31 function Ok(){ 32 33 return window.parent.Cancel(); 34 } 35 36 var ctrlId = 'myEditor' ; 37 38 function onCancel (dT){ 39 // dT is texarea 40 41 window.parent.Cancel() 42 } 43 44 function onFinish (dT){ 45 // dT is texarea 46 //console.info(dT.value); 47 oEditor.FCK.EditorDocument.body.innerHTML = dT.value; 48 //alert ([t.length,dT.value.length]) 49 Ok(); 50 } 51 52 53 function _cancelOnError (m){ 54 var message = m || 'Sorry, but service is unavailable now.'; 55 if (typeof(WSC_Error) == 'undefined') 56 alert(message); 57 return Ok(); 58 } 59 60 function URL_abs2full (uri){ 61 return uri.match('http') 62 ? uri 63 : document.location.protocol + '//' + document.location.host + uri; 64 } 65 66 function onLoad() 67 { 68 // HTML data 69 var sData = oEditor.FCK.GetHTML(); 70 71 if (/^\s*$/.test(sData)) 72 return _cancelOnError('Nothing to check.'); 73 74 if (typeof(doSpell) == 'undefined' || !doSpell) 75 return _cancelOnError('Sorry, but service is unavailable now.'); 76 77 // global var 78 gFCKPluginName = 'wsc'; 79 // place data into texarea 80 var dCurT = document.getElementById(ctrlId); 81 dCurT.value = sData; 82 83 //dCurT.value = t; 84 // get WSC work as it likes ))) 85 //window.setTimeout(function(){ 86 87 88 // skin path corecting 89 var sPath2Scin = URL_abs2full(FCKConfig.SkinDialogCSS); 90 var sPathCiframe = FCKConfig.BasePath + 'wsc/ciframe.html'; 91 var sPathFrameset = FCKConfig.BasePath + 'wsc/tmpFrameset.html'; 92 93 var LangComparer = new _SP_FCK_LangCompare(); 94 LangComparer.setDefaulLangCode(oEditor.FCK.Language.DefaultLanguage); 95 96 97 doSpell({ 98 ctrl: ctrlId, 99 lang: LangComparer.getSPLangCode(oEditor.FCK.Language.GetActiveLanguage()), 100 winType:'wsc_frames',// if not defined window popup will run 101 // callback binding section 102 onCancel:onCancel, 103 onFinish:onFinish, 104 // @TODO: basePath assingning 105 // some manipulations with client static pages 106 framesetPath: sPathFrameset, 107 iframePath : sPathCiframe, 108 // styles defining 109 schemaURI: sPath2Scin 110 }); 111 112 113 return true; 114 } 115 116 </script> 117 </head> 118 <body onload="onLoad()" style="padding: 0px; overflow: hidden;"> 119 <textarea style="display: none;" id="myEditor" rows="10" cols="40"></textarea> 120 <iframe src="" name="wsc_frames" id="wsc_frames" style="position: absolute; top: 0px; 121 left: 0px; width: 500px; height: 395px; width: 500px; margin: 0px; padding: 0px; 122 border: 0px; display: block;"></iframe> 123 </body> 124 </html> -
fckconfig.js
160 160 FCKConfig.StylesXmlPath = FCKConfig.EditorPath + 'fckstyles.xml' ; 161 161 FCKConfig.TemplatesXmlPath = FCKConfig.EditorPath + 'fcktemplates.xml' ; 162 162 163 FCKConfig.SpellChecker = ' ieSpell' ; // 'ieSpell' | 'SpellerPages'163 FCKConfig.SpellChecker = 'WSC' ; // 'WSC' | 'SpellerPages' | 'ieSpell' 164 164 FCKConfig.IeSpellDownloadUrl = 'http://www.iespell.com/download.php' ; 165 165 FCKConfig.SpellerPagesServerScript = 'server-scripts/spellchecker.php' ; // Available extension: .php .cfm .pl 166 166 FCKConfig.FirefoxSpellChecker = false ;