【发布时间】:2019-06-29 11:48:11
【问题描述】:
我正在使用 CKEditor wysiwyg 来创建 django 模板。因此,我遇到了使用 CKEditor 的 codemirror 插件为here。按照安装说明,以下选项可用于配置参考here:
config.codemirror = {
// Set this to the theme you wish to use (codemirror themes)
theme: 'default',
[.......................]
// Define the language specific mode 'htmlmixed' for html including (css, xml, javascript), 'application/x-httpd-php' for php mode including html, or 'text/javascript' for using java script only
mode: 'htmlmixed',
[.......................]
// Whether or not to show the showAutoCompleteButton button on the toolbar
showAutoCompleteButton: true
};
但是,与上述模式选项一样,语言仅限于 html、javascript 和 php,我无法使用其他语言,就我而言 Django。
我尝试在<path to CKEditor>/Plugins/codemirror/plugin.js 修改CKEditor 的默认代码镜像插件以添加django 语言可能的地方,但它只导致代码错误。
那么,我该如何在CKEditor的codemirror插件中添加Django语言呢?谢谢。
【问题讨论】:
标签: django ckeditor codemirror