Reputation: 1938
I have been looking for a good editor with syntax highlighting for php code to be used in the drupal 6 node body.
I would like to clear one thing first, I DO NOT need a syntax highligter for a code "posted" or "displayed" in the node. But I need to write php codes for some pages and writing them like a text without any highlighting, is pretty annoying.
As you can see below, I would like the php syntax <?php echo "Hello world"; ?>
to be highlighted.
I tried many combinations and not found anything that I really desire. below are some things that I tried...
I tried TinyMCE with codemagic, codemirror, editarea. But nothing really works as they should. adding to the above, trying to write and preserve code in any wysiwyg editor is a real pain in the a**.
Then I tried colorer module but am facing many problems and not even a single bug report and issue of this module is fixed.
So isn't there a way to write php code as code and not as text inside the drupal nodes..?? Or is it that nobody bothered about it because anyone hardly writes php code inside nodes..? I hope am not the only one and some solution to it does exist.
Upvotes: 3
Views: 528
Reputation: 38629
The ACE editor works really well as a code editor for <textarea>
s, and it has a Drupal module. ACE is well maintained, so I'd check them out as an alternative to colorer, TinyMCE, et al.
Edit: However, it's only for Drupal 7, which won't help...
Upvotes: 1