如何在网站上使用aloha编辑器

4
我希望在我的网站上使用aloha编辑器,我已从[http://aloha-editor.org/]下载了它。但是现在我感到非常困惑,因为下载的包含有大量文件。
我选择了aloha.js和aloha.css,并添加了以下脚本。
$(document).ready(function () {
      Aloha.ready(function () {
          var $ = Aloha.jQuery;
          $('.editable').aloha();
      })
});

但它没有起作用。然后我尝试了

<script src="http://cdn.aloha-editor.org/current/lib/aloha.js"
      data-aloha-plugins="common/format,
      common/list,
      common/link,
      common/highlighteditables">
</script>

<!-- load the Aloha Editor CSS styles -->
<link href="http://cdn.aloha-editor.org/current/css/aloha.css" type="text/css" />

<!-- make all elements with class="editable" editable with Aloha Editor -->
<script type="text/javascript">
     Aloha.ready( function() {
            var $ = Aloha.jQuery;
            $('.editable').aloha();
     });
</script>

它运行良好。但我想使用我的下载的包,有人能告诉我如何管理所有文件和文件夹(例如-我必须把图像文件夹和其他文件夹放在哪里..),以便它开始工作吗?


在我看来,aloha 有点凌乱,因此它希望您将 /plugin、/lib、/img 文件夹放在根目录下。甚至有些目录结构已经硬编码在 aloha.js 和 aloha.css 中,所以最好的方法是深入代码并进行修改,直到您满意为止。另一个可能不那么混乱但相当基本的插件是 Hallo JS。 - Antony
你是如何从你的网站中引入Aloha的源代码和插件的?你遇到了什么错误? - James van Dyke
2个回答

0

0

将所有文件复制到根目录,其中包括插件,库,图像和CSS,并参考上述指南。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接