Closed (fixed)
Project:
FCKeditor - WYSIWYG HTML editor
Version:
6.x-1.3-rc1
Component:
Compatibility with other modules
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
9 Oct 2008 at 23:08 UTC
Updated:
25 Jul 2009 at 08:58 UTC
Comments
Comment #1
wwalc commentedActually I think that the best solution would be to create a simple plugin that integrates Geshi Filter with FCKeditor.
At this moment all you have to do is to switch to source mode, create a
<pre>tag with a "type" attribute (pre should be added to "Generic syntax highlighting tags" in Geshi Filter settings).The plugin I'm thinking of could contain the following things:
- textarea for a code
- select box with all languages supported by Geshi
After user presses the "ok" button, code could be automatically surrounded by
<pre type="php">and pasted into FCKeditor.Additionally, you could use the "Style" button in FCKeditor and add in fckstyles.xml
this way after code is already in FCKeditor you could still easily change it's language using the "Style" button.
Useful links:
http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide/JavaScript_API
http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide/Customization/P...
Remember to share your plugin with others if you create such ;-) I could add it to the FCKeditor module.
Comment #2
WorldFallz commentedJust an FYI-- I just found this, thought it might be worth a look:
Geshi Filter for FCKeditor: GeSHi Pro.
I'll post back after I give a try.
Comment #3
Grayside commentedThis looks pretty good. However, it works by applying the code-highlighting at the time you compose your post. It is stored as HTML.
That really locks you in to GeshiPro, FCKeditor, and the specific styles applied to the code at the time you compose it.
Comment #4
nicorac commentedThis works well, except for special HTML chars like ">".
Suppose you're writing some PHP code like this:
$a = array('key1' => 'value1');
If you swap from WYSIWYG to source view and back, all of your ">" will be replaced by "%gt;"
How to solve this?
Comment #5
JBravo commentedwwalc
Thanks, man. That is just what I need.
Comment #6
Jorrit commentedIt seems to be solved.