嘿,我正在尝试将Aloha-Editor整合到我的Yii-Framework中,但我有一点问题。 Yii给了我一个jQuery实例(v 1.8.3),Aloha包含jQuery(v 1.7.2)。现在我想给Alo一个来自Yii的jQuery。我还在尝试this Guide,但它不起作用。我希望你能帮助我。
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="language" content="de" />
<link rel="stylesheet" type="text/css" href="/CMS/assets/e5e98a0c/css/aloha.css" />
<link rel="stylesheet" type="text/css" href="/CMS/css/bootstrap/css/bootstrap.css" />
<link rel="stylesheet" type="text/css" href="/CMS/themes/wood/css/bootstrap-theme.css" />
<script type="text/javascript" src="/CMS/assets/bd973420/jquery.js"></script>
<script type="text/javascript" src="/CMS/assets/bd973420/jui/js/jquery-ui.min.js"></script>
<script type="text/javascript" src="/CMS/assets/e5e98a0c/js/require.js"></script>
<script type="text/javascript" src="/CMS/assets/e5e98a0c/js/aloha.js" data-aloha-plugins="custom/save,common/ui,common/format,common/highlighteditables"></script>
...
</head>
<body>
...
<script type="text/javascript">
/*<![CDATA[*/
Aloha.settings = {"saveUrl":"http:\/\/localhost\/CMS\/index.php\/site\/updateContent","locale":"de","plugins":{"format":{"config":["b","i","sub","sup","p","h2","h3","h4","h5","h6"]}},"baseUrl":"\/CMS\/assets\/e5e98a0c\/","sidebar":{"disabled":true}}
Aloha.ready( function() {
Aloha.jQuery('.edit').aloha();
});
Aloha.ready( function() {setTimeout('Aloha.Sidebar.right.hide();', 10);});
/*]]>*/
</script>
我希望你能帮我解决这个问题。
答案 0 :(得分:0)
尝试使用它:
//Yii-Framework jQuery
<script src="<path to Yii-Framework jQuery>/jquery-1.8.3.js"></script>
//Aloha jQuery
<script src="/CMS/assets/e5e98a0c/js/lib/vendor/jquery-1.7.2.js"></script>
<script>
Aloha = window.Aloha || {};
Aloha.settings = Aloha.settings || {};
// Restore the global $ and jQuery variables of your project's jQuery
Aloha.settings.jQuery = window.jQuery.noConflict(true);
</script>
<link rel="stylesheet" href="/CMS/assets/e5e98a0c/css/aloha.css" type="text/css">
<script src="/CMS/assets/e5e98a0c/js/require.js"></script>
<script type="text/javascript" src="/CMS/assets/e5e98a0c/js/aloha.js" data-aloha-plugins="custom/save,common/ui,common/format,common/highlighteditables"></script>