On my freshly installed Drupal 7.10 I cannot get Syntax Highlighting to work with CKEditor because I cannot get the 'Code' button to appear. I have tried all the possible guides and hacks I could Google my way into, but nothing has worked so far. Perhaps it is the new "drag and drop" way you add buttons to CKEditor that is unaccounted for?

I have done the following:

1) Installed CKEditor module in 'sites/all/modules' and placed the CKEditor library in 'sites/all/modules/ckeditor/ckeditor' (rather than in sites/all/libraries)
2) Placed the Syntax Highlighter library in 'sites/all/libraries' and installed the Syntax Highlight module in 'sites/all/modules'.
3) Installed the ckeditor-syntaxhighlight plugin following this guide: http://code.google.com/p/ckeditor-syntaxhighlight/wiki/Installation

(For more details, I have followed this guide: http://betuts.com/guide-install-syntax-highlighter-ckeditorckeditor-synt...)

My problem is (and perhaps I am not alone?)

Although everything should be working, I do not get a 'Code' button in my CKEditor and I can not find a way to add it. I have spent many hours trying to add a code button, but nothing seems to work. This is how my CKeditor settings page looks like: http://public.larsbo.org/Screenshot.png

Comments

mattyoung’s picture

larsbo,

TinyMCE SH button integration was done by http://drupal.org/project/wysiwyg_syntaxhl

You may want to talk to him to see how to make things works and please contribute back here your solution.

Note, TinyMCE integrate is fonly for D6....

Important to note:

D7 filter markup has change to simply use the

 tag. Behind the scene I automatically change that to allow any input filter to not muck around with the syntax highlighter 
 tag block. This is because in case you use any strict filter e.g. http://drupal.org/project/wysiwyg_filter or the built-in filtered HTML filter, they allow will not allow the weird syntax used the the javascript library's weird syntax and will strip them out. By enabling my module's filter, I lying to those filtered during the filtering processing and switch back to the weird SH 
 tags and everything looks like regular 
 tag on the browser end and therefore will not be changed by the WYSIWYG editor. The SH code block is just 
 plus some style code of the SH.

Please see if you can get your stuff works by understanding this.  Please ask http://drupal.org/user/117364 for help... he understand everything and can also modify his work to D7...or you can do ...

Thanks....


I am not very active in Drupal anymore these days....really busy on other stuffs....

But I'm here to provide any guidance you need.  Also  meekest knows more about WYSIWYG integration ...

fizk’s picture

Status: Active » Closed (fixed)
fizk’s picture

Issue summary: View changes

clarification