日期:2014-05-17 浏览次数:20662 次
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="CKEditor.aspx.cs" Inherits="CKEditor_CKEditor"
ValidateRequest="false" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>无标题页</title>
<script type="text/javascript" language="javascript" src="ckeditor/ckeditor.js"></script>
<script type="text/javascript" language="javascript" src="ckfinder/ckfinder.js"></script>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:TextBox ID="txt1" runat="server" TextMode="MultiLine"></asp:TextBox>
<script type="text/javascript">
var editor = CKEDITOR.replace('txt1');
CKFinder.setupCKEditor(editor,"/ckfinder/");
</script>
</div>
</form>
</body>
</html>
CKEDITOR.editorConfig = function( config )
{
// Define changes to default configuration here. For example:
// config.language = 'fr';
// config.uiColor = '#AADC6E';
config.filebrowserBrowseUrl= 'ckfinder/ckfinder.html'; //上传文件时浏览服务文件夹
//上传图片时浏览服务文件夹
config.filebrowserImageBrowseUrl= 'ckfinder/ckfinder.html?Type=Images';
//上传Flash时浏览服务文件夹
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';
//上传Flash按钮(标签)
config.filebrowserFlashUploadUrl= 'ckfinder/core/connector/aspx/connector.aspx?command=QuickUpload&type=Flash';
config.toolbar =
[
['Source', '-', 'Preview'], ['Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord'], ['Undo', 'Redo', '-', 'Find', 'Replace', '-', 'SelectAll', 'RemoveFormat'], ['NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', 'Blockquote', 'ShowBlocks'], '/',
['Bold', 'Italic', 'Underline', 'Strike', '-', 'Subscript', 'Superscript'], ['JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'], ['Link', 'Unlink', 'Anc