2020年9月17日 星期四

[研究][ASP.NET][WebForm] CKFinder 3.5.1.1 + CKFinder.Connector.Sample 3.3.0-rc5 + ckeditor 4.15.0 試用

[研究][ASP.NET][WebForm] CKFinder 3.5.1.1 + CKFinder.Connector.Sample 3.3.0-rc5 + ckeditor 4.15.0 試用

2020-09-17

續這篇

[研究] CKSource.CKFinder 3.5.1.1試用 (NuGet 安裝)

http://shaurong.blogspot.com/2020/09/cksourceckfinder-3511-nuget.html

NuGet 安裝 ckeditor full 4.15.0


專案添加 Default.aspx

Default.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="WebApplication1.Default" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
    <script src="Scripts/ckeditor/ckeditor.js"></script>
    <script src="CKFinderScripts/ckfinder.js"></script>
</head>
<body>
    <form id="form1" runat="server">
        <div>
            <asp:TextBox ID="TextBox1" runat="server" TextMode="MultiLine" Height="200px" Width="200px"></asp:TextBox><br />
            <asp:Button ID="Button1" runat="server" Text="Button" OnClick="Button1_Click" Style="height: 21px" /><br />
            <br />
            <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
            <%--操作 TextBox1 的 JavaScript 必須寫在該 Id 物件之下,不能寫 <head></head>區域--%>
            <script type="text/javascript">
                // https://ckeditor.com/docs/ckfinder/ckfinder3-net/integration.html#integration_embedding
                //var editor = CKEDITOR.replace('TextBox1');
                // 參考 https://ckeditor.com/docs/ckfinder/ckfinder3/#!/guide/dev_ckeditor
                var editor = CKEDITOR.replace('TextBox1',
                    {
                        // 參考  https://ckeditor.com/docs/ckfinder/ckfinder3-net/integration.html
                        filebrowserBrowseUrl: '/CKFinderScripts/ckfinder.html',
                        filebrowserImageBrowseUrl: '/CKFinderScripts/ckfinder.html?type=Images',
                        // 下面失敗,待研究
                        //filebrowserUploadUrl: '/CKFinderScripts/connector?command=QuickUpload&type=Files',
                        //filebrowserImageUploadUrl: '/CKFinderScripts/connector?command=QuickUpload&type=Images'
                        // 下面失敗,待研究
                        filebrowserUploadUrl: '/CKFinderScripts/connector?command=QuickUpload&type=Files&currentFolder=/userfiles/',
                        filebrowserImageUploadUrl: '/CKFinderScripts/connector?command=QuickUpload&type=Images&currentFolder=/userfiles/'
                    });
                CKFinder.setupCKEditor(editor);
            </script>
        </div>
    </form>
</body>
</html>


Default.aspx.cs
using System;

namespace WebApplication1
{
    public partial class Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }
        protected void Button1_Click(object sender, EventArgs e)

        {

        }
    }
}

執行 Default.aspx








部分功能正常可用了,部分待研究。

(完)

相關

[研究][ASP.NET][WebForm] CKFinder 3.5.1.1 + CKFinder.Connector.Sample 3.3.0-rc5 + ckeditor 4.15.0 試用
https://shaurong.blogspot.com/2020/09/aspnetwebform-ckfinder-3511.html

[研究] CKSource.CKFinder 3.5.1.1試用 (NuGet 安裝)
https://shaurong.blogspot.com/2020/09/cksourceckfinder-3511-nuget.html

[研究] CKSource.CKFinder.Connector.Sample 3.3.0-rc5 試用 (NuGet)
https://shaurong.blogspot.com/2020/09/cksourceckfinderconnectorsample-330-rc5.html

[研究][ASP.NET][WebForm]CKFinder 3.5.11 試用(Zip安裝)(二)
https://shaurong.blogspot.com/2020/09/aspnetwebformckfinder-3511-zip_3.html

[研究][ASP.NET][WebForm]CKFinder 3.5.11 試用(Zip安裝)
https://shaurong.blogspot.com/2020/09/aspnetwebformckfinder-3511-zip.html

[研究][ASP.NET][WebForm] CKSource.CKFinder.Connector.Config 3.5.11 安裝 (NuGet安裝)
https://shaurong.blogspot.com/2020/09/aspnetwebform-cksourceckfinderconnector.html

沒有留言:

張貼留言