[support] Supporting Wysiwyg and geshi filter at the same time
Alan Chandler
alan at chandlerfamily.org.uk
Sat Jan 22 09:12:56 UTC 2011
My personal web site has been built on Drupal 6 for some time now,
although to be honest I haven't done much with it. I am now starting to
consider migrating to drupal 7 and using it a bit more to write a blog.
I am beginning to realise that I have some issues with using a Wysiwyg
editor in combination with the geshi filter (gives pretty syntax
highlighting to code segments).
When I originally set the site up, I installed both the CKEditor module
and the Wysiwyg module side by side as I thought the former needed the
latter. Yesterday, after updating all the modules to the latest
versions (in the 6.x series) I discovered for the first time that they
don't seem to be playing nice together. In particular the CKEditor
module required the CKEditor plugin in one place, and the Wysiwyg module
required CKEditor plugin in sites/all/libraries. Anyway, I resolved
that by removing the CKEditor module, and now just have the wysiwyg
module loaded.
However, I wanted to write an article with embedded code (bash script as
it turns out), and wanted to insert a preformatted section with <code>
surrounding the script.
The idea being that a geshi filter is configured as an input filter and
the <code> tag triggers it to add syntax highlighting to the code segment.
However:-
a) You set up wysiwyg to use the CKeditor on the appropriate input
format (in my case filtered HTML) and then try and assign buttons for it
to use. There doesn't appear to be a button to insert a <code> tag.
So my first question, is there a way of configuring the editor/wysiwyg
module so that this functionality can be provided?
b) The editor seems to reformat code which I want to remain
preformatted. In particular it seems to always remove the new lines.
Is there any way to tell the editor not to reformat a certain section of
the code?
--
Alan Chandler
http://www.chandlerfamily.org.uk
More information about the support
mailing list