slight changes to enable wysiwyg editor textareas
This commit is contained in:
templates/2k11/admin
@ -235,6 +235,7 @@
|
||||
return;
|
||||
} else if (typeof(CKEDITOR) != 'undefined') {
|
||||
oEditor = (typeof(isinstance) == 'undefined') ? CKEDITOR.instances[textarea] : isinstance;
|
||||
if (typeof(oEditor) == 'undefined') oEditor = popupEditorInstance;
|
||||
if (oEditor.mode == "wysiwyg") {
|
||||
oEditor.insertHtml(str);
|
||||
return;
|
||||
|
@ -23,7 +23,8 @@
|
||||
CKEDITOR.plugins.add('{$button.id}', {
|
||||
init: function( editor ) {
|
||||
editor.addCommand( '{$button.name}', {
|
||||
exec : {$button.javascript}
|
||||
popupEditorInstance = editor;
|
||||
( {$button.javascript} () )
|
||||
});
|
||||
editor.ui.addButton('{$button.id}', {
|
||||
label: '{$button.name}',
|
||||
@ -36,16 +37,17 @@
|
||||
{/foreach}
|
||||
|
||||
|
||||
CKEDITOR.replace($('#'+serendipity.escapeBrackets('{$item}')).get(0), {
|
||||
customConfig : '{$serendipityHTTPPath}htmlarea/ckeditor/ckeditor_custom_config.js',
|
||||
extraPlugins : 's9y_medialibrary{$item}{foreach $buttons as $button},{$button.id}{/foreach}',
|
||||
ckeitem = '{$item}';
|
||||
CKEDITOR.replace($('#'+serendipity.escapeBrackets(ckeitem)).get(0), {
|
||||
customConfig : '{$serendipityHTTPPath}htmlarea/ckeditor_custom_config.js',
|
||||
extraPlugins : 'mediaembed,procurator,cheatsheet,s9y_medialibrary{$item}{foreach $buttons as $button},{$button.id}{/foreach}',
|
||||
|
||||
on: {
|
||||
on: {
|
||||
instanceReady: function( evt ) {
|
||||
CKEDITOR.instances["{$item}"].document.once('keyup', function() {
|
||||
CKEDITOR.instances[ckeitem].document.once('keyup', function() {
|
||||
setInterval(function() {
|
||||
console.log("save");
|
||||
serendipity.cache("{$item}", CKEDITOR.instances["{$item}"].getData());
|
||||
serendipity.cache(ckeitem, CKEDITOR.instances[ckeitem].getData());
|
||||
}, 5000)
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user