Dotclear


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

Load wanted editor for each context
Closes #2011, Closes #2014

File:
1 edited

Legend:

Unmodified
Added
Removed
  • plugins/dcLegacyEditor/inc/dc.legacy.editor.behaviors.php

    r2854 r2856  
    2222     * @param tags     <b>array</b>  array of ids to inject editor 
    2323     */ 
    24     public static function adminPostEditor($editor='',$context='',array $tags=array()) { 
     24     public static function adminPostEditor($editor='',$context='',array $tags=array()) { 
    2525          if (empty($editor) || $editor!='dcLegacyEditor') {return;} 
    26  
    27         // context and tags are not used for dcLegacyEditor 
    2826 
    2927          return 
    3028               self::jsToolBar(). 
    31                dcPage::jsLoad(self::$p_url.'/js/_post_editor.js'); 
     29               dcPage::jsLoad(self::$p_url.'/js/_post_editor.js'). 
     30               '<script type="text/javascript">'."\n". 
     31               "//<![CDATA[\n". 
     32               dcPage::jsVar('dotclear.legacy_editor_context', $context). 
     33               'dotclear.legacy_editor_tags_context = '.sprintf('{%s:["%s"]};'."\n", $context, implode('","', $tags)). 
     34               "\n//]]>\n". 
     35               "</script>\n"; 
    3236     } 
    3337 
     
    5761          if (isset($GLOBALS['core']->auth) && $GLOBALS['core']->auth->getOption('enable_wysiwyg')) { 
    5862               $res .= '<script type="text/javascript" src="'.self::$p_url.'/js/jsToolBar/jsToolBar.wysiwyg.js"></script>'; 
    59           } 
     63        } 
    6064 
    6165          $res .= 
Note: See TracChangeset for help on using the changeset viewer.

Sites map