Dotclear


Ignore:
Timestamp:
10/26/14 10:10:53 (11 years ago)
Author:
Nicolas <nikrou77@…>
Branch:
default
Message:

CKEditor can now load external plugins such as tags, series,...
Closes #1992

Location:
plugins/dcCKEditor
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • plugins/dcCKEditor/_post_config.php

    r2751 r2761  
    1313if (!defined('DC_CONTEXT_ADMIN')) { return; } 
    1414header('Content-type: text/javascript'); 
     15if (!empty($_GET['context'])) { 
     16     $context = $_GET['context']; 
     17} else { 
     18     $context = ''; 
     19} 
    1520$__extraPlugins = new ArrayObject(); 
    16 $core->callBehavior('ckeditorExtraPlugins',$__extraPlugins); 
     21$core->callBehavior('ckeditorExtraPlugins',$__extraPlugins,$context); 
    1722$extraPlugins = $__extraPlugins->getArrayCopy(); 
    1823?> 
  • plugins/dcCKEditor/inc/dc.ckeditor.behaviors.php

    r2749 r2761  
    1616    protected static $config_url = 'plugin.php?p=dcCKEditor&config=1'; 
    1717 
    18     public static function adminPostEditor($editor='') { 
     18    public static function adminPostEditor($editor='',$context='') { 
    1919        if (empty($editor) || $editor!='dcCKEditor') { return;} 
     20 
     21        $config_js = self::$config_url; 
     22        if (!empty($context)) { 
     23            $config_js .= '&context='.$context; 
     24        } 
    2025 
    2126        return 
     
    3944            dcPage::jsLoad(self::$p_url.'/js/ckeditor/ckeditor.js'). 
    4045            dcPage::jsLoad(self::$p_url.'/js/ckeditor/adapters/jquery.js'). 
    41             dcPage::jsLoad(self::$config_url); 
     46            dcPage::jsLoad($config_js); 
    4247     } 
    4348 
  • plugins/dcCKEditor/index.php

    r2738 r2761  
    2727if (!empty($_GET['config'])) { 
    2828    // text/javascript response stop stream just after including file 
    29     include_once(dirname(__FILE__).'/_post_config.php');     
     29    include_once(dirname(__FILE__).'/_post_config.php'); 
    3030    exit(); 
    31 } else {     
     31} else { 
    3232    include_once(dirname(__FILE__).'/inc/_config.php'); 
    3333} 
    34  
Note: See TracChangeset for help on using the changeset viewer.

Sites map