Archived
1
0

include ckeditor.js in case of entryform, staticpages, html nuggets only

References #72
This commit is contained in:
Ian
2014-03-16 16:26:21 +01:00
parent 795410a6c9
commit 5fddf72bed
2 changed files with 9 additions and 2 deletions
+8 -1
View File
@@ -173,10 +173,16 @@ function serendipity_emit_htmlarea_code($item, $jsname, $spawnMulti = false) {
); );
serendipity_plugin_api::hook_event('backend_wysiwyg', $eventData); serendipity_plugin_api::hook_event('backend_wysiwyg', $eventData);
if ($eventData['skip'] || $init) { if ($eventData['skip']) {
return; 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... //actually we don't even need this any more...
if (is_array($eventData['buttons'])) { if (is_array($eventData['buttons'])) {
foreach($eventData['buttons'] as $button) { foreach($eventData['buttons'] as $button) {
@@ -192,6 +198,7 @@ function serendipity_emit_htmlarea_code($item, $jsname, $spawnMulti = false) {
$data['eventData'] = $eventData; $data['eventData'] = $eventData;
$data['item'] = $item; $data['item'] = $item;
$data['toolbar'] = $toolbar; $data['toolbar'] = $toolbar;
$data['backend_wysiwyg'] = $backend_wysiwyg ? $backend_wysiwyg : false;
$data['jsEventData'] = 'jsEventData = '.json_encode($eventData['buttons']); $data['jsEventData'] = 'jsEventData = '.json_encode($eventData['buttons']);
echo serendipity_smarty_show('admin/wysiwyg_init.tpl', $data); echo serendipity_smarty_show('admin/wysiwyg_init.tpl', $data);
+1 -1
View File
@@ -167,7 +167,7 @@
{/if} {/if}
{if $admin_vars.admin_installed}{serendipity_hookPlugin hook="backend_footer" hookAll="true"}{/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 *} {* CKEDITOR_CCPATHFILE could also be a custom path to a templates ckekeditor_custom_config.js file *}
<script type="text/javascript"> <script type="text/javascript">
CKEDITOR_CCPATHFILE = '{$serendipityHTTPPath}htmlarea/'; CKEDITOR_CCPATHFILE = '{$serendipityHTTPPath}htmlarea/';