Dotclear


Ignore:
Timestamp:
07/12/15 16:42:27 (10 years ago)
Author:
Nicolas <nikrou77@…>
Branch:
default
Message:

Allow user to disable (or not) native spellchecker for CKEditor
Fix #2092

Location:
plugins/dcCKEditor
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • plugins/dcCKEditor/_install.php

    r3050 r3052  
    3030$settings->dcckeditor->put('table_button', false, 'boolean', 'Add table button?', false, true); 
    3131$settings->dcckeditor->put('clipboard_buttons', false, 'boolean', 'Add clipboard buttons?', false, true); 
     32$settings->dcckeditor->put('disable_native_spellchecker', true, 'boolean', 'Disables the built-in spell checker if the browser provides one?', false, true); 
    3233 
    3334$core->setVersion('dcCKEditor', $version); 
  • plugins/dcCKEditor/_post_config.php

    r3040 r3052  
    7979 
    8080     CKEDITOR.timestamp = ''; 
     81<?php if (!empty(!$dcckeditor_disable_native_spellchecker)):?> 
     82     CKEDITOR.disableNativeSpellChecker = false; 
     83<?php endif;?> 
    8184     CKEDITOR.config.skin = 'dotclear,'+dotclear.dcckeditor_plugin_url+'/js/ckeditor-skins/dotclear/'; 
    8285     CKEDITOR.config.baseHref = dotclear.base_url; 
     
    98101} 
    99102?> 
    100     if (dotclear.ckeditor_context===undefined || dotclear.ckeditor_tags_context[dotclear.ckeditor_context]===undefined) { 
    101         return; 
    102     } 
     103     if (dotclear.ckeditor_context===undefined || dotclear.ckeditor_tags_context[dotclear.ckeditor_context]===undefined) { 
     104          return; 
     105     } 
    103106     $(dotclear.ckeditor_tags_context[dotclear.ckeditor_context].join(',')).ckeditor({ 
    104107<?php 
  • plugins/dcCKEditor/inc/_config.php

    r2972 r3052  
    6262               $dcckeditor_clipboard_buttons = (empty($_POST['dcckeditor_clipboard_buttons']))?false:true; 
    6363               $core->blog->settings->dcckeditor->put('clipboard_buttons', $dcckeditor_clipboard_buttons, 'boolean'); 
     64 
     65               $dcckeditor_disable_native_spellchecker = (empty($_POST['dcckeditor_disable_native_spellchecker']))?false:true; 
     66               $core->blog->settings->dcckeditor->put('disable_native_spellchecker', $dcckeditor_disable_native_spellchecker, 'boolean'); 
    6467          } 
    6568 
  • plugins/dcCKEditor/index.php

    r2972 r3052  
    2525$dcckeditor_table_button = $core->blog->settings->dcckeditor->table_button; 
    2626$dcckeditor_clipboard_buttons = $core->blog->settings->dcckeditor->clipboard_buttons; 
     27$dcckeditor_disable_native_spellchecker = $core->blog->settings->dcckeditor->disable_native_spellchecker; 
    2728 
    2829if (!empty($_GET['config'])) { 
  • plugins/dcCKEditor/tpl/index.tpl

    r2972 r3052  
    6060       <?php echo __('Copy, Paste, Paste Text, Paste from Word');?> 
    6161     </p> 
     62     <p> 
     63       <?php echo form::checkbox('dcckeditor_disable_native_spellchecker', 1, $dcckeditor_disable_native_spellchecker);?> 
     64       <label class="classic" for="dcckeditor_disable_native_spellchecker">&nbsp;<?php echo __('Disables the built-in spell checker if the browser provides one');?></label> 
     65     </p> 
    6266      </div> 
    6367      <?php endif;?> 
Note: See TracChangeset for help on using the changeset viewer.

Sites map