Ticket #3562: 3562_3.patch
File 3562_3.patch, 1.7 KB (added by , 15 years ago) |
---|
-
_source/plugins/scayt/plugin.js
68 68 { 69 69 if ( ev.data.name == 'source' && editor.mode == 'wysiwyg' ) 70 70 { 71 var scayt = plugin.getScayt( editor );72 if ( scayt)71 var instance = plugin.getScayt( editor ) 72 if ( instance ) 73 73 { 74 scayt.paused = !scayt.disabled;75 scayt.setDisabled( true );74 instance.paused = !instance.disabled; 75 instance.setDisabled( true ); 76 76 } 77 77 } 78 78 }); … … 84 84 plugin.getScayt( editor ).refresh(); 85 85 }); 86 86 87 // Reload spell-checking for current word after insertion completed. 88 editor.on( 'insertElement', function() 89 { 90 var instance = plugin.getScayt( editor ); 91 if ( plugin.isScaytEnabled( editor ) ) 92 { 93 // Unlock the selection before reload, SCAYT will take 94 // care selection update. 95 if ( CKEDITOR.env.ie ) 96 editor.getSelection().unlock( true ); 97 98 // Swallow any SCAYT engine errors. 99 try{ 100 instance.reset(); 101 instance.setDisabled( false ); 102 }catch( er ) 103 {} 104 } 105 }, this, null, 50 ); 106 87 107 editor.on( 'scaytDialog', function( ev ) // Communication with dialog. 88 108 { 89 109 ev.data.djConfig = djConfig; … … 133 153 }, 134 154 isScaytEnabled : function( editor ) 135 155 { 136 var scayt= this.getScayt( editor );137 return ( scayt ) ? scayt.disabled === false : false;156 var instance = this.getScayt( editor ); 157 return ( instance ) ? instance.disabled === false : false; 138 158 }, 139 159 loadEngine : function( editor ) 140 160 {