Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"Code" button in CKEditor

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.

like image 953
mingos Avatar asked Jan 13 '11 22:01

mingos


1 Answers

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/

like image 92
Marco Panichi Avatar answered Oct 01 '22 11:10

Marco Panichi