include ckeditor.js in case of entryform, staticpages, html nuggets only
References #72
This commit is contained in:
@ -173,10 +173,16 @@ function serendipity_emit_htmlarea_code($item, $jsname, $spawnMulti = false) {
|
||||
);
|
||||
serendipity_plugin_api::hook_event('backend_wysiwyg', $eventData);
|
||||
|
||||
if ($eventData['skip'] || $init) {
|
||||
if ($eventData['skip']) {
|
||||
return;
|
||||
}
|
||||
|
||||
// entryform, staticpages, html nuggets
|
||||
if (isset($serendipity['GET']['adminModule']) && ($serendipity['GET']['adminModule'] == 'entries' || $serendipity['GET']['adminModule'] == 'event_display' || $serendipity['GET']['adminModule'] == 'plugins') )
|
||||
{
|
||||
$backend_wysiwyg = true;
|
||||
}
|
||||
|
||||
//actually we don't even need this any more...
|
||||
if (is_array($eventData['buttons'])) {
|
||||
foreach($eventData['buttons'] as $button) {
|
||||
@ -192,6 +198,7 @@ function serendipity_emit_htmlarea_code($item, $jsname, $spawnMulti = false) {
|
||||
$data['eventData'] = $eventData;
|
||||
$data['item'] = $item;
|
||||
$data['toolbar'] = $toolbar;
|
||||
$data['backend_wysiwyg'] = $backend_wysiwyg ? $backend_wysiwyg : false;
|
||||
$data['jsEventData'] = 'jsEventData = '.json_encode($eventData['buttons']);
|
||||
|
||||
echo serendipity_smarty_show('admin/wysiwyg_init.tpl', $data);
|
||||
|
@ -167,7 +167,7 @@
|
||||
{/if}
|
||||
|
||||
{if $admin_vars.admin_installed}{serendipity_hookPlugin hook="backend_footer" hookAll="true"}{/if}
|
||||
{if $init === false}
|
||||
{if $backend_wysiwyg}
|
||||
{* CKEDITOR_CCPATHFILE could also be a custom path to a templates ckekeditor_custom_config.js file *}
|
||||
<script type="text/javascript">
|
||||
CKEDITOR_CCPATHFILE = '{$serendipityHTTPPath}htmlarea/';
|
||||
|
Reference in New Issue
Block a user