1
0

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:
onli
2014-03-23 23:03:09 +01:00
parent 31eba101f6
commit 0d54063c5e
7 changed files with 44 additions and 306 deletions

View File

@ -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);
}