When I paste code from clipboard in the SyntaxHighlighter dialog, every text block surrounded by empty lines become surrounded by visible
tags after saving the post. Every line ending gets an extraneous
tag. This does not happen when I disable rich text and set input method to Full html and use the {syntaxhighlighter} tag directly.
Comments
Comment #1
roske commentedI'm having the same issue with pasted code via Edit HTML Source in WYSIWYG/TinyMCE, it strips HTML code and inserts
all over the text.
Comment #2
esod commentedIf you enable jQuery Update for Drupal 6, the extra
<br>and<p>tags will not be rendered. jQuery Update is not necessary for Drupal 7 version of Syntax Highlighter.I suggest making jQuery Update a dependency for the Drupal 6 version of Syntax Highlighter. The extra
<br>and<p>tags are pretty gruesome to look at.The other issue, "All code in joined in one line" (see http://drupal.org/node/699968) unfortunately makes using Syntax Highlighter in TinyMCE a non-starter for us. In the meantime, asking Administrators to use:
or another brush seems the best solution.
Comment #3
andi.oltean commentedThe solution with Jquery update doesn't work for me. And if i try to replace JQuery 1.2.6 (Drupal 6 default) with a newer one you can't drag and drop the blocks in the block region page.
Comment #4
meecect commentedI'm working right now on trying to fix the various issues with this module, including this one. Please stay tuned.
Comment #5
meecect commentedI have created a new release (1.3). Please let me know if it solves your problem.
Comment #6
esod commentedThanks for the update!
The original node looks like this:
http://skitch.com/esod124/gudtx/4-4-validating-a-user-id-.blur-prodrupal...
I enable Wysiwyg 6.x-2.4 and Wysiwyg syntaxhighlighter integration 6.x-1.3. Filtered HTML is given Editor TinyMCE 3.4.7. SyntaxHighlighter button is check in Buttons and plugins.
Back to the node, I cut the text (the code) that's in the Recipe field, change the filter of the field to Filtered HTML, click the Insert code using SyntaxHighlighter button, and paste the text.
I save the node and unfortunately see:
http://skitch.com/esod124/gudta/4-4-validating-a-user-id-.blur-prodrupal...
Other input filters for Filtered HTML are
Encode email addresses
HTML corrector
HTML Filter
Line break converter
Syntax highlighter (of course)
URL filter
in that order.
I wish I could report a more positive result.
Comment #7
sistematico commentedesod, move Syntax Highlighter to top on Filtered HTML settings.
Anyway, i have same issue here.
Drupal 7.19
Syntax Highlighter 7.x-2.0