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>
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
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: