- Timestamp:
- 12/17/14 08:04:25 (11 years ago)
- Branch:
- 2.7
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
plugins/dcCKEditor/inc/dc.ckeditor.behaviors.php
r2852 r2854 16 16 protected static $config_url = 'plugin.php?p=dcCKEditor&config=1'; 17 17 18 public static function adminPostEditor($editor='',$context='') { 18 /** 19 * adminPostEditor add javascript to the DOM to load ckeditor depending on context 20 * 21 * @param editor <b>string</b> wanted editor 22 * @param context <b>string</b> page context (post,page,comment,event,...) 23 * @param tags <b>array</b> array of ids into inject editor 24 */ 25 public static function adminPostEditor($editor='',$context='',array $tags=array()) { 19 26 if (empty($editor) || $editor!='dcCKEditor') { return;} 20 27 … … 27 34 '<script type="text/javascript">'."\n". 28 35 "//<![CDATA[\n". 36 dcPage::jsVar('dotclear.ckeditor_context', $context). 37 'dotclear.ckeditor_tags_context = '.sprintf('{%s:["%s"]};'."\n", $context, implode('","', $tags)). 29 38 'var CKEDITOR_BASEPATH = "'.DC_ADMIN_URL.self::$p_url.'/js/ckeditor/";'."\n". 30 39 dcPage::jsVar('dotclear.base_url', $GLOBALS['core']->blog->host). … … 70 79 } 71 80 } 81 82 public static function getTagsContext() { 83 return self::$tagsContext; 84 } 72 85 }
Note: See TracChangeset
for help on using the changeset viewer.