CKFinder 2.1.1 に問題があります。ロードするはずのボタンをクリックすると、ウィンドウがロードされますが、「Web サーバーから XML 応答をロードできませんでした。サーバーが空の応答を返しました。」という応答が表示されます。CKFinder をロードする JavaScript 関数を以下に掲載します。どんな助けでも大歓迎です、ありがとう!
$('textarea.contentEditor').ckeditor(function(){},
{
//Options~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
resize_enabled : false,
height : 600,
fontSize_defaultLabel : '12',
font_defaultLabel : 'Arial',
//scayt_autoStartup : true,
extraPlugins : 'contentPreview',
contentsCss : [
$('#SITE_ROOT').html() + "/css/base/StandardWellness.css",
$('#SITE_ROOT').html() + "/css/base/CKEditorOverrides.css"
],
toolbar :
[
{ name: 'document', items : [ 'Source','-','DocProps','Print','-','Templates' ] },
{ name: 'clipboard', items : [ 'Cut','Copy','Paste','PasteText','PasteFromWord','-','Undo','Redo' ] },
{ name: 'editing', items : [ 'Find','Replace','-','SelectAll','-','SpellChecker', 'Scayt' ] },
{ name: 'forms', items : [ 'Form', 'Checkbox', 'Radio', 'TextField', 'Textarea', 'Select', 'Button', 'ImageButton',
'HiddenField' ] },
'/',
{ name: 'basicstyles', items : [ 'Bold','Italic','Underline','Strike','Subscript','Superscript','-','RemoveFormat' ] },
{ name: 'paragraph', items : [ 'NumberedList','BulletedList','-','Outdent','Indent','-','Blockquote','CreateDiv','-',
'JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock','-','BidiLtr','BidiRtl' ] },
{ name: 'links', items : [ 'Link','Unlink','Anchor' ] },
{ name: 'insert', items : [ 'Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak','Iframe' ] },
'/',
{ name: 'styles', items : [ 'Styles','Format','Font','FontSize' ] },
{ name: 'colors', items : [ 'TextColor','BGColor' ] },
{ name: 'tools', items : [ 'Maximize', 'ShowBlocks','-','About' ] },
{ name: 'MyHealth', items : ['contentPreview']}
]
}).ckeditor(function(){
//Callback ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
var editor = $('textarea.contentEditor').ckeditorGet();
CKFinder.setupCKEditor( editor, { basePath : '../ckfinder/', rememberLastFolder : true } ) ;
CKEDITOR.on( 'dialogDefinition', function( ev )
{
// Take the dialog name and its definition from the event data.
var dialogName = ev.data.name;
var dialogDefinition = ev.data.definition;
if ( dialogName == 'image' ) {
dialogDefinition.removeContents( 'Upload' );
call_obj = new Object();
}
if ( dialogName == 'flash' ) {
dialogDefinition.removeContents( 'Upload' );
}
if( dialogName == 'link' ) {
dialogDefinition.removeContents( 'upload' );
}
});
});