首頁>Club>
8
回覆列表
  • 1 # 使用者2387430387627

    cheditor與ckfinder的整合使用

    1,將ckeditor解壓開啟,開啟_Samples,將ckeditor資料夾複製專案中的根目錄下,把bin放在根目錄下

    3,在ckeditor檔案下找到config.js 開啟,找到

    在CKEDITOR.editorCongig=function(config)

    {

    //填寫以下內容,圖片,flash路徑

    config.uiColor = "#F7F8F9"

    config.scayt_autoStartup = false

    config.language = "zh-cn"; //中文

    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";

    };

    4,在ckfinder檔案下找到config.ascx檔案,開啟

    1)把public overrider bool ChekcAuthentication(){return false;改為:return true;}

    2)public overrider void SetConfig(){BaseUrl = "~/ckfinder/userfiles/";}

    5,在頁面中head標籤內寫入:

    <script type="text/javascript" src="ckeditor/ckeditor.js" ></script>

    <script type="text/javascript" src="ckfinder/ckfinder.js"></script>

    如果有母版頁,在母版頁中寫

    --注:單純的配置,6,7可以不要,但是一旦要入資料庫中,就要配置6.7步驟

    6,在Default.aspx頁面中,寫入<%@Page ValidateRequest="false"%>

    7,在web.config檔案中,在system.web下寫 <httpRuntime requestValidationMode="2.0"/>

    8,在Default.aspx頁面中新增<asp:TextBox runat="server" TextMode="MultiLine" Height="503px" Width="100%" ></asp:TextBox>

    <script type="text/javascript">

    CKEDITOR.replace("<%= txtcontent.ClientID %>", { skin: "kama" });

    </script>(用ckfinder檔案下skins檔案下kama檔案下的,skin.js,樣式)

  • 中秋節和大豐收的關聯?
  • the ordinary的產品和HFP的產品,哪個好用?