This is the second part of our series on how to create a question and answer website in Drupal. In this screencast we would be looking at how we can allow users to insert code snippets in the answers they are providing. Say for example it is a question and answer website for a programming language, we would like codes provided in the answers to be well formatted. In other to achieve this, we will be making use of three modules
We would be using the ckeditor alongside WYSIWYG for client side editing. The syntax highlighter module allows for source code syntax highlighting while the syntax highlighter insert allows syntaxhighlighter tags to be used within textareas.
When you have downloaded the syntax highlighter insert module into your sites/all/modules folder and you try installing it, you will notice the modules list page does not load or it gives an error. All you need to do is open the syntaxhighlighter_insert.INFO file and remove the quotes around name, description, etc.
The syntax highlighter might not work with filtered HTML, so use the FULL HTML text format.