Hi,
first of all. Great work getting the FCKeditor to output wikitext. There's only one problem that people also reported on the discussion page over at mediawiki. Using other wiki extensions that do use certainn xml tags to add special functionality is partially not possible because the FCKeditor destroys them. Especially "code highlighting" extensions are a problem.
I use the categorytree and GeSHi source highlighting extensions, so I need the editor NOT to parse the tags or at least the content of the tags <categorytree> and <source>.
How can I apply changes to the fckplugin.js so tags will be ignored? When I try to debug and set a breakpoint at the FCK.DataProcessor.convertToHtml the tags from, for example <categorytree> are already changed to:
<span class=\"fck_mw_categorytree\" _fck_mw_customtag=\"true\" _fck_mw_tagname=\"categorytree\" onlyroot=\"on\" mode=\"pages\">CONTENT</span>
So the processing already happened!! Since the fckeditor_gecko.js is so obfuscated that I can't really follow and looking into "editor/_source" shows a lot of files. Is the FCKDocumentProcessor the right one? And can I overwrite functions of it, so I don't change original FCKeditor files???? I really wan't this to work since code highlighting is really nice and the FCKeditor is a must for people not familiar with wikitext (or no time to learn it). A place to start from would be great. I'm a bit lost here. So if anyone knows a place where I can start debugging and understanding I would appreciate it.
Greetz
Spanky
Re: mediawiki+FCKeditor: make editor work with wiki extensions
After a little of debugging with the original code of the editor using the "editor/fckeditor.original.html" and reading the bug tickets sorted by components in trac I found a solution so that the editor doesn't touch at least my <source> tag. http://dev.fckeditor.net/ticket/1010 This ticket helped me understand the plugin a little bit better.
This is a dirty hack, but as I think helpful for everyone who loves syntax highlighting. I'm using the "SyntaxHighlight GeSHi" extension so I suppose it only works with this one.
Go to the file /Wiki_Install_Dir/extensions/FCKeditor/plugins/fckplugin.js and edit it.
After this code from line 385
replace the simple closing switch with these lines:
The next line should be
Until then......help for a real implementation would be needed.
Greetz
Spanky
Re: mediawiki+FCKeditor: make editor work with wiki extensions
David
Re: mediawiki+FCKeditor: make editor work with wiki extensions
<source lang="php">
<?php
$x = hi;
?>
</source>
becomes
<source lang="php"> <?php $x = hi; ?> </source>
Anyone know if this still works for the latest FckEditor+Mediawiki?
Re: mediawiki+FCKeditor: make editor work with wiki extensions
Any suggestions?
Regards
Christian
Re: mediawiki+FCKeditor: make editor work with wiki extensio
I'd love to see a solution to this!
I tried playing with the likes of FCKConfig.ProtectedSource.Add with no success.
GeShi has a solution for Drupal as follows:
Unfortunately I believe it is not as simple as appending tags to a list to be ignored like nowiki. Does FCKEditor parse the resulting html rather than the wikitext?
Any other suggestions?
EDIT: Apparently this was fixed a while ago although I am still having problems. See http://dev.ckeditor.com/ticket/2432