fixed plain editor instance, lastely

This commit is contained in:
Ian 2013-09-14 10:14:25 +02:00
parent 86c78f5122
commit c1215bb57e
3 changed files with 7 additions and 3 deletions

View file

@ -1,3 +1,7 @@
2.8:
----
fixed 2.7, since staticpages and entryforms set the [id] different
2.7:
----
fixed wrong instance name for plain editor drop

View file

@ -50,7 +50,7 @@ function emoticonchooser(instance_name = '', this_instance = '', cke_txtarea = '
tinyMCE.execInstanceCommand(this_instance, 'mceInsertContent', false, img);
} else {
// default case: no wysiwyg editor
txtarea = document.getElementById(instance_name);
txtarea = document.getElementById(cke_txtarea); // must be this, since staticpages and entryforms set the [id] different
if (txtarea.createTextRange && txtarea.caretPos) {
caretPos = txtarea.caretPos;
caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? caretPos.text + ' ' + img + ' ' : caretPos.text + ' ' + img + ' ';

View file

@ -30,7 +30,7 @@ class serendipity_event_emoticonchooser extends serendipity_event
'smarty' => '2.6.7',
'php' => '4.1.0'
));
$propbag->add('version', '2.7');
$propbag->add('version', '2.8');
$propbag->add('event_hooks', array(
'backend_entry_toolbar_extended' => true,
'backend_entry_toolbar_body' => true,
@ -128,7 +128,7 @@ class serendipity_event_emoticonchooser extends serendipity_event
}
}
// CKEDITOR needs this little switch
// CKEDITOR and plain editor need this little switch
if (preg_match('@^nugget@i', $func)) {
$cke_txtarea = $func;
} else {