【问题标题】:Integrating CKEDITOR into textarea将 CKEDITOR 集成到 textarea 中
【发布时间】:2017-12-20 07:15:59
【问题描述】:

我无法将 CKEDITOR 集成到 textarea 中。以下是代码:

<html>
  <head>
    <script type="text/javascript" src="localhost/ckeditor/ckeditor.js"></script> 
  </head>
  <body bgcolor=Bisque>

    <textarea class="ckeditor" id="body" name="body">
    Hii
    </textarea>

    <script type="text/javascript">
      CKEDITOR.replace('body');
    </script>
  </body>
</html>

【问题讨论】:

  • 检查控制台中的错误。这可能会给你一个提示。
  • @NiranjanNRaju:我检查了控制台错误。这些都很好。
  • 你真的有文件夹localhost 吗?
  • @Wizard:不,我没有

标签: ckeditor


【解决方案1】:

由于您报告您没有文件夹localhost,因此该行

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

错了。浏览器正在尝试从与您的页面位于同一目录级别的文件夹 localhost 加载 ckeditor.js。我假设文件夹 ckeditor 在您的服务器根文件夹中,所以使用这个:

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

【讨论】:

    猜你喜欢
    • 2013-05-19
    • 1970-01-01
    • 2021-11-04
    • 2015-01-14
    • 2012-01-06
    • 1970-01-01
    • 2015-06-28
    • 2017-06-25
    • 1970-01-01
    相关资源
    最近更新 更多