Dotclear


Ignore:
Timestamp:
12/17/14 08:04:25 (11 years ago)
Author:
Nicolas <nikrou77@…>
Branch:
2.7
Message:

Add tags into inject ckeditor for adminPostEditor behavior
Addresses #2011

@TODO : need to find a way to add multiple context: for example comment tab on admin/post.php page

File:
1 edited

Legend:

Unmodified
Added
Removed
  • plugins/dcCKEditor/_post_config.php

    r2835 r2854  
    5858 
    5959          var editor = CKEDITOR.instances[$.getEditorName()]; 
    60           if (!confirmClosePage.formSubmit && editor.checkDirty()) { 
     60          if (editor!==undefined && !confirmClosePage.formSubmit && editor.checkDirty()) { 
    6161               e.returnValue = confirmClosePage.prompt; 
    6262               return confirmClosePage.prompt; 
     
    8888} 
    8989?> 
    90  
    91      $('<?php echo $dcckeditor_textareas;?>').ckeditor({ 
     90    if (dotclear.ckeditor_context===undefined || dotclear.ckeditor_tags_context[dotclear.ckeditor_context]===undefined) { 
     91        return; 
     92    } 
     93     $(dotclear.ckeditor_tags_context[dotclear.ckeditor_context].join(',')).ckeditor({ 
    9294<?php 
    9395$defautExtraPlugins = 'entrylink,dclink,media,justify,colorbutton,format'; 
     
    156158                    items: [ 
    157159                         'EntryLink','dcLink','Media','-', 
    158                          'Source', 'Maximize' 
     160                         'Source' 
    159161<?php if (!empty($dcckeditor_textcolor_button)):?> 
    160162                ,'TextColor' 
     
    162164                    ] 
    163165               }, 
     166            { 
     167                name: 'special', 
     168                items: [ 
     169                    'Maximize' 
     170                ] 
     171            }, 
    164172               <?php // add extra buttons comming from dotclear plugins 
    165173               if (!empty($extraPlugins) && count($extraPlugins)>0) { 
Note: See TracChangeset for help on using the changeset viewer.

Sites map