【发布时间】:2015-09-15 12:05:57
【问题描述】:
我正在使用 CKEditor
我正在像这样加载 .js 文件
<script type="text/javascript" src="public/lib/ckeditor/ckeditor.js"></script>
Ckeditor 仅在第一次出现,如果我导航到其他页面,然后返回原始页面,则 ckeditor 无法正常工作..
我试图在index.html 中加载ckeditor.js -> 我的主文件加载所有.js 文件,甚至在我使用ckeditor 的add.html 中单独加载
<textarea class="ckeditor" name="receipeBody" ></textarea>
即,
public/app/js/angular.min.js
public/app/app/app.js
public/app/app/data.js
public/app/app/directives.js
public/app/app/authCtrl.js
我尝试在主页甚至add.html 页面中加载。
它只在第一次工作,如果我导航到其他页面并返回到add.html 页面,ckeditor 没有加载..它只是显示常规文本区域..
我什至尝试在add.html 完全加载后加载.js 文件..
这样
$(document).ready(function(){
$.getScript("public/lib/ckeditor/ckeditor.js");
});
不过,我无法在第二个视图中看到 ckeditor..
我做错了什么以及如何使 ckeditor 即使在第一次访问页面后也可见...
【问题讨论】:
标签: javascript php jquery angularjs ckeditor