“代码” CKEditor 中的按钮
我正在使用 CKEditor(当前使用版本 3.4.1 - 如果有必要,我可以升级)并且我缺少使用 标记的可能性,无论是从格式下拉列表还是通过工具栏上的按钮。
我找不到可以实现这一点的插件。我也没有经验或知识如何为此编写自己的插件。
您知道有一个插件可以帮助我启用“代码”按钮/格式(将选定的文本包装到 标签中)吗?如果没有,如果您指导我访问有关 CKEditor 插件开发的在线资源(某种解释基本基础知识的教程),我将不胜感激。
如果它有用,我的网站正在使用 Drupal 6.19,CKEditor 模块,CKEditor 3.4.1。至于插件开发教程,我已经找到了这个,但是大部分都是似乎超出了我的掌握范围。
I'm using CKEditor (currently using ver. 3.4.1 - I can upgrade if it's necessary) and I'm missing a possibility to use the <code>
tag, either from the Format dropdown or via a button on the toolbar.
I couldn't find a plugin that would make this possible. I have also no experience or knowledge of how to write my own plugin for that.
Do you know of a plugin that might help me enable the "code" button/format (wrapping selected text into <code>
tags)? If there is none, I would appreciate if you directed me to online resources about CKEditor plugin development (some sort of tutorial explaining the bare basics).
In case it's useful, my site's using Drupal 6.19, CKEditor module, CKEditor 3.4.1. As for plugin development tutorials, I have already found this, but most of it seems to beyond my grasp.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我用这个 ckeditor 插件解决了:
http://code.google.com/p/ckeditor-syntaxhighlight/
这也是兼容jquery插件SyntaxHighlighter
http://alexgorbatchev.com/SyntaxHighlighter/
I solved with this ckeditor plugin:
http://code.google.com/p/ckeditor-syntaxhighlight/
It's also compatible with the jquery plugin SyntaxHighlighter
http://alexgorbatchev.com/SyntaxHighlighter/
尝试 https://ckeditor.com/cke4/addon/codeTag
没有其他依赖项。
Try https://ckeditor.com/cke4/addon/codeTag
No additional dependencies.
所见即所得
浏览配置>所见即所得
...
启用“来源”按钮。
Get wysiwyg
Browse configuration>wysiwyg
...
Enable the 'source' button.