Opened 14 years ago

Closed 12 years ago

#5543 closed Bug (invalid)

Support for syntaxhighlight tag (SyntaxHighlight GeSHi extension)

Reported by: Sean Turley Owned by:
Priority: Normal Milestone:
Component: Project : MediaWiki+FCKeditor Version:
Keywords: Cc:


The "source" tag is supported very well in FCKeditor, but the equivalent and preferred "syntaxhighlight" tag isn't supported. Both tags should work the same.

Steps to Reproduce

  1. Make sure Syntaxhighlight_GeSHi extension is installed. Get it at
  1. Create an article with syntaxhighlight tags using standard markup:
<syntaxhighlight lang="php">
    $v = "string";    // sample initialization
html text
    echo $v;         // end of php code
  1. Now edit the article with FCKeditor. Make no changes and save. The tags get changed.
  1. Note the same code snippet wrapped in "source" tags works just fine with FCKeditor.

Server Version Information

MediaWiki 1.15.3
PHP 5.2.10-2ubuntu6.4 (apache2handler)
MySQL 5.1.37-1ubuntu5.1
FCKEditor Version 1.0.1 (Subversion r65138)
SyntaxHighlight Version (Subversion r65138)

Browser Version

Ubuntu 9.10 x86 (2.6.31-20-generic)
Google Chrome 5.0.342.9 beta
Firefox 3.5.9

Attachments (1)

FCKeditorParser.body.php (22.5 KB) - added by fdujardi 14 years ago.

Download all attachments as: .zip

Change History (4)

comment:1 Changed 14 years ago by Alfonso Martínez de Lizarrondo

Component: GeneralProject : MediaWiki+FCKeditor

Changed 14 years ago by fdujardi

Attachment: FCKeditorParser.body.php added

comment:2 Changed 14 years ago by fdujardi


Please find attached a small patch to handle the syntaxhighlight tag. With this patch, it is processed the same way as the source tag. The litte drawback is that it is indeed replaced by the source tag when saving. However, it is still more functionnal than the default behaviour which somewhat breaks the content when previewing/saving.

The implementation is pretty simple and safe: in FCKeditorParser.body.php there is a switch that checks if tag must be handled in a particular way. Right now, there is a case for the source tag. I've just replaced the line:

case 'source':


case 'syntaxhighlight': case 'source':

so that the same process applies for both the source and syntaxhighlight tags.

Could someone please review and merge it in a future release? Thank in advance.



comment:3 Changed 12 years ago by Jakub Ś

Resolution: invalid
Status: newclosed

Since FCKeditor is no longer supported and was replaced with CKEditor, active development of the MediaWiki extension and support for it are also finished.

I’m closing this ticket as it is no longer valid.

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy