syntax highlighting - Drupal: Trying to use GeSHi with CKeditor -


i hoping use ckeditor geshi, i'm having major difficulties. happens is, if create new piece of content, then, disable ckeditor i'm writing plain html, can enclose code snipptet in <pre> </pre> tags. if save, geshi thing nicely , snippet looks good.

however, if try edit piece of content, ckeditor messes around formatting of code, replacing lot of characters special escape sequences, , trying close thinks html tags c++ include files, e.g. #include <iostream> make ckeditor place </iostream> @ end of text. then, in best scenario code looks bad.

in other cases, behaviour's weird: page won't load , gives me server error instead. assume that's because, server side, change ckeditor has made code snippet making geshi crash or vice versa.

here's example piece of code looked correct after entered verbatim in plaintext editor , enclosed in <pre> tags:

// rights reserved // email: firstname.lastname@url.com //////////////////////////////////////////////////////////////////////  #include "stdafx.h" #include <iostream> #include <fstream>  ////////////////////////////////////////////////////////////////////// // construction/destruction //////////////////////////////////////////////////////////////////////  myclass::myclass() {     m_lthing = null;     m_athing = null;     m_bthing = null;      m_lthingthing = null;     m_athingthing = null;     m_bthingthing = null; } 

however, clicking edit save again without making changes makes ckeditor mess around code, looks this:

// rights reserved // email: firstname.lastname@url.com //////////////////////////////////////////////////////////////////////  #include &quot;stdafx.h&quot; #include <iostream> #include <fstream>  ////////////////////////////////////////////////////////////////////// // construction/destruction //////////////////////////////////////////////////////////////////////  myclass::myclass() {     m_lthing = null;     m_athing = null;     m_bthing = null;      m_lthingthing = null;     m_athingthing = null;     m_bthingthing = null; }</fstream></iostream> 

does have thoughts on this, or can recommend alternative system i'm trying use now? i'm not super attached ckeditor or geshi, although i've been pleased ckeditor far, , fact geshi matlab formatting. also, per answer/ comment below, have tried peter petrik's approach outlined here, , crashing behaviour still occurred.

thanks.

look @ - may ckeditor-and-geshi-filter


Comments

Popular posts from this blog

linux - Mailx and Gmail nss config dir -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -