我对 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' );
}
});
});