Use old method to init ckeditor
Instead of using global JS-variables and ignoring serendipity[textarea]={$view}, this approach actually uses the variable and therefore reinstates wysiwyg_init.tpl. ckeditor_custom_config.js (Thx Ian!) is still respected, but the toolbar got restored to the old version. We need an easy way to remove _underline_, for example. It could be extended though. This fixes #{107} somewhat, as serendipity_image_selector.php is useable now, but still with display errors (and without an upload widget). Probably still a good idea to copy the ML-eapproach of the normal textareas This also works with htmlnuggets, without using spawnnugget from the core, instead wysiwyg_init.tpl gets reused in the plugin-config. ckeditor_custom_plugin.js got emptied, the relevant code (which should only be the part that adds the plugins into the toolbar) should be integrated into wysiwyg_init.tpl).
This commit is contained in:
@ -183,23 +183,13 @@ function serendipity_emit_htmlarea_code($item, $jsname, $spawnMulti = false) {
|
||||
$backend_wysiwyg = true;
|
||||
}
|
||||
|
||||
//actually we don't even need this any more...
|
||||
if (is_array($eventData['buttons'])) {
|
||||
foreach($eventData['buttons'] as $button) {
|
||||
$toolbar['other'][] = $button;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
$data = array();
|
||||
$data['init'] = $init;
|
||||
$data['spawnMulti'] = $spawnMulti;
|
||||
$data['jsname'] = $jsname;
|
||||
$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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user