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

Javascript 如何在网站上使用aloha编辑器,javascript,jquery,Javascript,Jquery,我想在我的网站上使用aloha编辑器,我从[我完全困惑,因为下载的包包含很多文件 我选择了aloha.js和aloha.css并添加了以下脚本 $(document).ready(function () { Aloha.ready(function () { var $ = Aloha.jQuery; $('.editable').aloha(); }) }); 但它不起作用。然后我试了 <script src="http:

我想在我的网站上使用aloha编辑器,我从[我完全困惑,因为下载的包包含很多文件

我选择了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.ready(函数(){
var$=Aloha.jQuery;
$('.editable').aloha();
});

它工作正常。但我想使用我下载的捆绑包,有人能告诉我如何管理所有文件和文件夹(例如,我必须将图像文件夹和其他文件夹放在哪里…),使其开始工作吗?

将所有文件复制到根目录,其中包括插件、lib、img、css,并参考上述指南。

请参阅。
将文件保存在web服务器根目录中的
/javascripts
,例如运行localhost的地方。

IMO,aloha有点凌乱,因此它希望您将/plugin、/lib、/img文件夹放在根目录中。一些目录结构甚至在aloha.js和aloha.css中进行了硬编码,因此最好的办法是深入研究代码另一个可能不那么凌乱但非常基本的插件是Hallo JS,你如何包括Aloha的源代码和你网站上的插件,以及你会遇到什么错误?