CKEditor TypeError:c [a]在CodeIgniter中未定义 [英] CKEditor TypeError: c[a] is undefined in CodeIgniter

查看:69
本文介绍了CKEditor TypeError:c [a]在CodeIgniter中未定义的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在基于codeigniter的网站上安装CKEditor,并且已经按照本教程进行操作: Codeigniter教程中的CKEditor



但是我收到此错误: TypeError:c [a]未定义

  CKEDITOR.lang.load / d()ckeditor ___ ckeditor:230 
CKEDITOR.scriptLoader< /<.load/f()ckeditor ___ ckeditor:231
CKEDITOR.scriptLoader< /<..load / x()ckeditor ___ ckeditor:231
CKEDITOR.scriptLoader< /< .load / A()ckeditor___ckeditor :231
CKEDITOR.scriptLoader< /< .load / u / g。$。onerror()

ckeditor文件夹所在的文件夹:assets / js /(将为:assets / js / ckeditor /)



CKEDITOR_BASEPATH为 CKEDITOR_BASEPATH ='http:// localhost:5678 / assets / js / ckeditor /';



我不知道w

预先感谢。

解决方案

我遇到了同样的问题。 CKEditor无法正确识别其自己的文件夹。
因此,您应该在加载CKEditor之前设置一个CKEDITOR_BASEPATH变量。



在这里简短地说:(但是可能在其他地方有更好的解释。)
http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR .html#.basePath



因此实现方式如下:

 < script> 
window.CKEDITOR_BASEPATH =’http://example.com/path/to/libs/ckeditor/;
< / script>

在我的情况下,我使用 window.CKEDITOR_BASEPATH ='/ app / storereport / ckeditor /';



然后加载主ckeditor.js脚本。

 < script type = application / javascript /> 
$(document).ready(function(){
CKEDITOR.replace('product_content'); //元素ID
});
< / script>


Im trying to install CKEditor in my codeigniter based website and I have followed this tutorial: CKEditor in Codeigniter Tutorial

But Im receiving this error: TypeError: c[a] is undefined

CKEDITOR.lang.load/d()                   ckeditor___ckeditor:230
CKEDITOR.scriptLoader</<.load/f()        ckeditor___ckeditor:231
CKEDITOR.scriptLoader</<.load/x()        ckeditor___ckeditor:231
CKEDITOR.scriptLoader</<.load/A()        ckeditor___ckeditor:231
CKEDITOR.scriptLoader</<.load/u/g.$.onerror()

The folder which ckeditor folder is in: assets/js/ ( which will be: assets/js/ckeditor/ )

The CKEDITOR_BASEPATH is CKEDITOR_BASEPATH = 'http://localhost:5678/assets/js/ckeditor/';

I have no idea what this error is and I can't find properly answers or fix to it.

Thanks in advance.

解决方案

I had same issue. CKEditor isn't identifying properly its own folder. So you should set a CKEDITOR_BASEPATH variable before loading CKEditor.

It's briefly said here: (but there might be other places where it's explained better.) http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.html#.basePath

Therefore implementation will be like this:

<script>
  window.CKEDITOR_BASEPATH = 'http://example.com/path/to/libs/ckeditor/';
</script>

In my case i used window.CKEDITOR_BASEPATH = '/app/storereport/ckeditor/';

Then load the main ckeditor.js script.

<script type="application/javascript"/>
$(document).ready(function (){
    CKEDITOR.replace( 'product_content' );  // ID of element
});
</script>

这篇关于CKEditor TypeError:c [a]在CodeIgniter中未定义的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆