Django ckeditor oembed插件安装:javascript错误

时间:2014-01-27 21:33:44

标签: javascript jquery django django-ckeditor

我安装了django-ckeditor,管理页面显示了编辑器 很好。但是我有问题将oembed插件添加到编辑器中。

这就是我所拥有的:

# virtualenv
Django==1.6.1
South==0.8.4
django-ckeditor-updated==4.2.6
elpy==1.2.1
flake8==2.1.0
ipython==1.1.0
jedi==0.7.0
mccabe==0.2.1
pep8==1.4.6
pyflakes==0.7.3
wsgiref==0.1.2

# settings.py

CKEDITOR_CONFIGS = {
    'default': {
        'extraPlugins': 'dialog,widget,lineutils,oembed',
        'toolbar': [
            ['About', 'oembed', ],
        ]
    }
}

注意oembed需要对话框,小部件,(可能是lineutils)。

现在我的编辑器显示了oembed按钮,但它不会显示一个表单供您输入视频网址。 Firebug显示有两个错误:

TypeError: this.editor.editable(...).find is not a function
http://localhost:8000/static/ckeditor/ckeditor/plugins/widget/plugin.js?t=D8AD
Line 494
TypeError: widget.wrapper.findOne is not a function
http://localhost:8000/static/ckeditor/ckeditor/plugins/widget/plugin.js?t=D8AD
Line 2746

Django控制台显示所有.js,.css文件都已加载。

[27/Jan/2014 21:25:57] "GET /admin/blog/blog/add/ HTTP/1.1" 200 4423
[27/Jan/2014 21:25:57] "GET /static/ckeditor/ckeditor/ckeditor.js HTTP/1.1" 304 0
[27/Jan/2014 21:25:57] "GET /admin/jsi18n/ HTTP/1.1" 200 2372
[27/Jan/2014 21:25:58] "GET /static/ckeditor/ckeditor/config.js?t=D8AD HTTP/1.1" 304 0
[27/Jan/2014 21:25:58] "GET /static/ckeditor/ckeditor/skins/moono/editor_gecko.css?t=D8AD HTTP/1.1" 304 0
[27/Jan/2014 21:25:58] "GET /static/ckeditor/ckeditor/lang/en.js?t=D8AD HTTP/1.1" 304 0
[27/Jan/2014 21:25:58] "GET /static/ckeditor/ckeditor/styles.js?t=D8AD HTTP/1.1" 304 0
[27/Jan/2014 21:25:58] "GET /static/ckeditor/ckeditor/plugins/widget/plugin.js?t=D8AD HTTP/1.1" 304 0
[27/Jan/2014 21:25:58] "GET /static/ckeditor/ckeditor/plugins/lineutils/plugin.js?t=D8AD HTTP/1.1" 304 0
[27/Jan/2014 21:25:58] "GET /static/ckeditor/ckeditor/plugins/oembed/plugin.js?t=D8AD HTTP/1.1" 304 0
[27/Jan/2014 21:25:58] "GET /static/ckeditor/ckeditor/plugins/widget/lang/en.js?t=D8AD HTTP/1.1" 304 0
[27/Jan/2014 21:25:58] "GET /static/ckeditor/ckeditor/plugins/oembed/lang/en.js?t=D8AD HTTP/1.1" 304 0
[27/Jan/2014 21:25:58] "GET /static/ckeditor/ckeditor/skins/moono/icons.png HTTP/1.1" 304 0
[27/Jan/2014 21:25:58] "GET /static/ckeditor/ckeditor/plugins/oembed/icons/oembed.png?t=D8AD HTTP/1.1" 304 0
[27/Jan/2014 21:25:58] "GET /static/ckeditor/ckeditor/contents.css HTTP/1.1" 304 0
[27/Jan/2014 21:25:58] "GET /static/ckeditor/ckeditor/plugins/oembed/libs/jquery.oembed.min.js?t=D8AD HTTP/1.1" 304 0

我在javascript方面的经验有限,我在django-ckeditor插件设置中遗漏了什么?谢谢,

0 个答案:

没有答案