string wanted editor
* @param context string page context (post,page,comment,event,...)
* @param tags array array of ids to inject editor
* @param syntax string wanted syntax (wiki,markdown,...)
*/
public static function adminPostEditor($editor = '', $context = '', array $tags = [], $syntax = '')
{
if (empty($editor) || $editor != 'dcLegacyEditor') {return;}
return
self::jsToolBar() .
dcPage::jsLoad(dcPage::getPF('dcLegacyEditor/js/_post_editor.js')) .
'\n";
}
public static function adminPopupMedia($editor = '')
{
if (empty($editor) || $editor != 'dcLegacyEditor') {return;}
return dcPage::jsLoad(dcPage::getPF('dcLegacyEditor/js/jsToolBar/popup_media.js'));
}
public static function adminPopupLink($editor = '')
{
if (empty($editor) || $editor != 'dcLegacyEditor') {return;}
return dcPage::jsLoad(dcPage::getPF('dcLegacyEditor/js/jsToolBar/popup_link.js'));
}
public static function adminPopupPosts($editor = '')
{
if (empty($editor) || $editor != 'dcLegacyEditor') {return;}
return dcPage::jsLoad(dcPage::getPF('dcLegacyEditor/js/jsToolBar/popup_posts.js'));
}
protected static function jsToolBar()
{
$res =
dcPage::cssLoad(dcPage::getPF('dcLegacyEditor/css/jsToolBar/jsToolBar.css')) .
dcPage::jsLoad(dcPage::getPF('dcLegacyEditor/js/jsToolBar/jsToolBar.js'));
if (isset($GLOBALS['core']->auth) && $GLOBALS['core']->auth->getOption('enable_wysiwyg')) {
$res .= dcPage::jsLoad(dcPage::getPF('dcLegacyEditor/js/jsToolBar/jsToolBar.wysiwyg.js'));
}
$res .=
dcPage::jsLoad(dcPage::getPF('dcLegacyEditor/js/jsToolBar/jsToolBar.dotclear.js')) .
'\n";
if ($GLOBALS['core']->auth->user_prefs->interface->htmlfontsize) {
$res .=
'\n";
}
return $res;
}
}