【问题标题】:CKEditor Version 4.5.3 integration with ASP.NETCKEditor 版本 4.5.3 与 ASP.NET 集成
【发布时间】:2015-12-22 23:20:24
【问题描述】:

大家早上好,

我正在尝试使用 Web 表单将 CKEditor 4.5.3 版与我的 ASP.NET 应用程序集成。

基本上我知道最新版本(4.5.3 版)没有附带 DLL,因此它是通过脚本运行的(据我推测)。 我一直在尝试以某种方式让它工作,但是我被卡住了。

如果有人能指出使用网络表单的基本 CKEditor 实例的示例代码,我将不胜感激。

CKEDITOR 文档提供以下代码;

<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title>A Simple Page with CKEditor</title>
        <!-- Make sure the path to CKEditor is correct. -->
        <script src="../ckeditor.js"></script>
    </head>
    <body>
        <form>
            <textarea name="editor1" id="editor1" rows="10" cols="80">
                This is my textarea to be replaced with CKEditor.
            </textarea>
            <script>
                // Replace the <textarea id="editor1"> with a CKEditor
                // instance, using default configuration.
                CKEDITOR.replace( 'editor1' );
            </script>
        </form>
    </body>
</html>

但是在我上面的网络表单中,只有文本区域出现了

谢谢

【问题讨论】:

  • 任何有任何东西的人 :D ?
  • ckeditor.js 在您的项目中位于何处?这就是 Chrome 开发者工具派上用场的地方。检查控制台选项卡以查看您是否收到错误并检查脚本是否实际加载。 stackoverflow.com/questions/4145266/…

标签: c# asp.net visual-studio webforms ckeditor


【解决方案1】:
<script src="../ckeditor.js"></script

补丁不能这样……

如果你从 nuget 补丁安装它是/scripts/ckeditor/ckeditor.js

试试&lt;script src="~/scripts/ckeditor/ckeditor.js"&gt;&lt;/script&gt;&lt;script src="~/ckeditor/ckeditor.js"&gt;&lt;/script&gt;

【讨论】:

    猜你喜欢
    • 2015-10-13
    • 2012-10-12
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-06-22
    • 2020-07-06
    • 2020-02-17
    • 1970-01-01
    相关资源
    最近更新 更多