CKEditor配置

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="article_add.aspx.cs" Inherits="admin_article_article_add" %>
<%@ Register Assembly="CKEditor.NET" Namespace="CKEditor.NET" TagPrefix="CKEditor" %>

<!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" src='<%=ResolveUrl("~/admin/ckeditor/ckeditor.js") %>'></script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <CKEditor:CKEditorControl ID="CKEditor1" runat="server">
        </CKEditor:CKEditorControl>
        <asp:Button ID="btnSubmit" runat="server" Text="提交" onclick="btnSubmit_Click" />
    </div>
    <asp:TextBox ID="mckeditor" TextMode="MultiLine" runat="server"></asp:TextBox>

    </form>
    
    <script type="text/javascript">
        CKEDITOR.replace( '<%=mckeditor.ClientID %>',// mckeditor.ClientID为TextBox mckeditor生成的对应客户端看到的id
        {
            skin:'office2003',//设置皮肤
            enterMode:Number( 2),//设置enter键的输入1.<p>2为<br/>3为<div>
            shiftEnterMode:Number( 1), //  设置shiftenter的输入
            filebrowserBrowseUrl:'<%= ResolveUrl("~/ckfinder/ckfinder.html") %>>',
            filebrowserImageBrowseUrl: '<%=ResolveUrl("~/ckfinder/ckfinder.html?Type=Images")%>',
            filebrowserFlashBrowseUrl: '<%=ResolveUrl("~/ckfinder/ckfinder.html?Type=Flash")%>',
            filebrowserUploadUrl: '<%=ResolveUrl("~/ckfinder/core/connector/aspx/connector.aspx?command=QuickUpload&type=Files")%>',
            filebrowserImageUploadUrl: '<%=ResolveUrl("~/ckfinder/core/connector/aspx/connector.aspx?command=QuickUpload&type=Images")%>',
            filebrowserFlashUploadUrl: '<%=ResolveUrl("~/ckfinder/core/connector/aspx/connector.aspx?command=QuickUpload&type=Flash")%>'
        });


    </script>
</body>
</html>

知识共享许可协议
《CKEditor配置》常伟华 创作。
采用 知识共享 署名-相同方式共享 3.0 中国大陆 许可协议进行许可。
相邻依据:发表时间
  • 多说评论
  • 签名
  • 新浪微博
  • 默认评论
  • Tab Header 5

0 条评论 / 点击此处发表评论

Tab Content 5

开发技术


开发平台和工具

sitemap     153.60ms