在CKEditor中加载blockquote插件 [英] Load blockquote plugin in CKEditor

查看:302
本文介绍了在CKEditor中加载blockquote插件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想通过 django-ckeditor 使用CKEditor。

I want to use CKEditor via django-ckeditor.

CKEditor被加载,但是我无法加载 blockquote 插件。

CKEditor gets loaded, but I fail to load the blockquote plugin.


  • 我下载了 blockquote.zip ,解压缩它

  • 将其复制到我的应用程序,如下 myapp / static / ckeditor / ckeditor / plugins / blockquote

  • 我运行 collectstatic 。我可以通过浏览器访问blockquote / plugin.js文件,如果我手动链接了URL。

  • 我更新了配置:

  • I downloaded blockquote.zip, unpacked it
  • Copied it to my app like this myapp/static/ckeditor/ckeditor/plugins/blockquote
  • I run collectstatic. I can access the blockquote/plugin.js file via browser if I inter the URL by hand.
  • I updated the config:

CKEDITOR_CONFIGS = {
'default':{
'extraPlugins':'blockquote',
}
}

CKEDITOR_CONFIGS = { 'default': { 'extraPlugins': 'blockquote', } }

HTML包含 blockquote < textarea cols =40id =id_bodyname =bodyrows =10data-processed =0data-config ='...extraPlugins:blockquote,...'data-external-plugin-resources ='[]'

但插件没有加载。我用firefox网络调试器检查了它。这些文件被加载 ckeditor-init.js ckeditor.js config.js' ,但不是单个文件 blockquote`。

But the plugin does not get loaded. I looked checked it with the firefox network debugger. These file gets loaded ckeditor-init.js, ckeditor.js, config.js', but not a single file ofblockquote`.

相关问题: https://github.com/django-ckeditor/django-ckeditor/issues/261

如何在CKEditor中加载blockquote插件?

How to load the blockquote plugin in CKEditor?

更新
在另一个问题中,作者将请求看作 codesnippet / plugin.js。在我的情况下,我没有看到任何访问blockquote的plugin.js文件。

Update In the other question the author sees requests to "codesnippet/plugin.js". In my case I don't see any access to the plugin.js file of blockquote.

推荐答案

我使用django_ckeditor和blockquote,但不需要将其添加为额外的插件。你确定你真的需要这样做吗?我想的一件事是问题是你定义了额外的插件,但是你没有把它放在你的任何工具栏中。如果没有在工具栏中定义,也可以加载它。你试过更新你的工具栏吗?

I use django_ckeditor and blockquote, but did not need to add it as an extra plugin. Are you sure you really need to do it that way? One thing that I'm thinking is the problem is that you define the extra plugin, but you don't put it in any of your toolbars. Perhaps it doesn't load if it's not defined in a toolbar. Have you tried updating your toolbars?

这是我的示例配置:

CKEDITOR_CONFIGS = {
    'default': {
        'toolbar_Basic': [
            ['Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord'],
            ['Undo', 'Redo'],
            ['Scayt'],
            ['Link', 'Unlink', 'Anchor'],
            ['Source'],
            ['Maximize'],
            ['Bold', 'Italic', 'Underline', 'RemoveFormat'],
            ['NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', '-', 'Blockquote'],
        ],
        'toolbar': 'Basic',
    },
}

这篇关于在CKEditor中加载blockquote插件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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