Ticket #5543 (closed Bug: invalid)

Opened 5 years ago

Last modified 3 years ago

Support for syntaxhighlight tag (SyntaxHighlight GeSHi extension)

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

Description

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 http://www.mediawiki.org/wiki/Extension:SyntaxHighlight_GeSHi
  1. Create an article with syntaxhighlight tags using standard markup:
<syntaxhighlight lang="php">
<?php
    $v = "string";    // sample initialization
?>
html text
<?
    echo $v;         // end of php code
?>
</syntaxhighlight>
  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 1.0.8.7) (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

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

Change History

comment:1 Changed 4 years ago by alfonsoml

  • Component changed from General to Project : MediaWiki+FCKeditor

Changed 4 years ago by fdujardi

comment:2 Changed 4 years ago by fdujardi

Hi!

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

by:

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.

Regards,

Fabrice

comment:3 Changed 3 years ago by j.swiderski

  • Status changed from new to closed
  • Resolution set to invalid

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 – 2012 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy