上传图片的时候始终不行,初始化的时候说 LinkBrowserURL 好像是没有
源码:
f.Config.LinkBrowserURL=n;f.Config.ImageBrowserURL=n+o+'type='+(h||'Images');f.Config.FlashBrowserURL=n+o+'type='+(i||'Flash');var p=n.substring(0,1+n.lastIndexOf('/'));
我的配置:<asp:TextBox runat="server" ID="txtContent"></asp:TextBox>
<script type="text/javascript">
var editor = CKEDITOR.replace('txtContent');
CKFinder.setupFCKeditor(editor, '/ckfinder/');
</script>
CKEDITOR.editorConfig = function (config) {
// Define changes to default configuration here. For example:
config.language = 'zh-cn'; //配置语言
// config.uiColor = '#AADC6E';
config.filebrowserBrowseUrl = '../ckfinder/ckfinder.html';
config.filebrowserImageBrowseUrl = '../ckfinder/ckfinder.html?Type=Images';
config.filebrowserFlashBrowseUrl = '../ckfinder/ckfinder.html?Type=Flash';
config.filebrowserUploadUrl = '../ckfinder/core/connector/aspx/connector.aspx?command=QuickUpload&type=Files';
config.filebrowserImageUploadUrl = '../ckfinder/core/connector/aspx/connector.aspx?command=QuickUpload&type=Images';
config.filebrowserFlashUploadUrl = '../ckfinder/core/connector/aspx/connector.aspx?command=QuickUpload&type=Flash';
config.filebrowserWindowWidth = '800';
config.filebrowserWindowHeight = '500';
};
使用:
<asp:TextBox runat="server" ID="txtContent"></asp:TextBox>
<script type="text/javascript">
var editor = CKEDITOR.replace('txtContent');
CKFinder.setupFCKeditor(editor, '/ckfinder/');
</script>
你可以在这里下载了下,都是最新官网上的
全部配置好的.http://download.csdn.net/detail/king_jincheng/4995014
使用方法:
1、在页面<head>中引入ckeditor核心文件ckeditor.js
<script type="text/javascript" src="ckeditor/ckeditor.js"></script>
2、在使用编辑器的地方插入HTML控件<textarea>
<textarea id="TextArea1" cols="20" rows="2" class="ckeditor"></textarea>
如果是ASP.NET环境,也可用服务器端控件<TextBox>
<asp:TextBox ID="tbContent" runat="server" TextMode="MultiLine" class="ckeditor"></asp:TextBox>
注意在控件中加上 class="ckeditor" 。
3、将相应的控件替换成编辑器代码
<script type="text/javascript"> CKEDITOR.replace('TextArea1');//如果是在ASP.NET环境下用的服务器端控件<TextBox> CKEDITOR.replace('tbContent');//如果<TextBox>控件在母版页中,要这样写 CKEDITOR.replace('<%=tbContent.ClientID.Replace("_","$") %>');</script>