Project:Wysiwyg syntaxhighlighter integration
Version:6.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:active
Issue tags:D7

Issue Summary

Hello,

Have you updating module to drupal 7 in your TODO list?

Thanks,
Alex

Comments

#1

Issue tags:-#D7+D7

#2

Subscribing

#3

Subscribing

#4

+1 please. no good clean syntax highlighting seems to exist for 7 right now.

#5

At the very least, the 'path' needs to be split into 'path' and 'filename' in 'wysiwyg_syntaxhl.module':

<?php
return array(
         
'syntaxhl' => array(
         
'path' => drupal_get_path('module', 'wysiwyg_syntaxhl') . '/tinymce/syntaxhl',
         
'filename' => 'editor_plugin.js',
         
'buttons' => array('syntaxhl' => t('SyntaxHighlighter')),
         
'url' => 'http://github.com/RichGuk/syntaxhl',
         
'load' => TRUE,
        ),
?>

#6

Yes, it is now. I will produce one shortly. Give me a week or so.

#7

Hi, had to use this module on D7, not much to change, but did refactor the directory structure to mimic other imce plugins for D7. Patch attached against 6.x-1.x

AttachmentSize
wysiwyg_syntaxhl_1082018.patch 50.18 KB

#8

thanks wesnick, I'll look this over and if it looks right, I'll commit it to a new d7 branch and cut a release. Might take me 3 or 4 days to get to it, unfortunately.

#9

I just got it working for Drupal 7, and was about to suggest a patch for this module...

As jshvrsn suggested, the only change needed is removing editor_plugin.js from path and adding it to 'filename' (and updating the info file to version 7.x of course)

Great work guys!

#10

I confirm the only changes needed to get this working in D7 is moving the filename to its own element, and updating the path.

Here's a patch.

AttachmentSize
d7version-1082018-10.patch 1.19 KB

#11

I actually have not been successful in getting syntaxhighlighter to work in D7 when it uses the {syntaxhighlighter} format tags, I can only get it to work when using pre tags. As such, for this to work completely, I also had to modify the js, but the patch in #10 will get the this module working as expected in D7 (as far as I can tell).

#12

Could not get it to work for nginx. It requires regex modifications I believe in a new location.