Testing.
Newly entered syntax block:
{syntaxhighlighter brush: php;fontsize: 100; first-line: 1;}<?php print $this; // this block was entered with the tinymce editor // if it was entered with the editor plugin it gets // a class "wysiwyg-syntaxhl class // on Save, the editor looks for pre tags // with that class and will convert it to // the '{}' macro's on save ?>{/syntaxhighlighter}
Old syntax block:
[swf file="some-flash-file.swf"] <- wrong [swf file="flash/some-flash-file.swf"] <- correct # this block was already syntax highlighted in 'pre' format # so it doesn't get the wysiwyg-syntaxhl special class. If you save # the node without invoking the popup, it will remain intact. # If you edit it with the popup, it will then get the wysiwyg-syntaxhl class. # When saved, all pre's that have the wysiwyg-syntaxhl class are converted to # the macro format with {}'s # Note: you can edit this text in the tinyMCE editor and not trigger # the conversion, it will only get converted to the {} format if you click the syntax button and # invoke the popup
Just a regular pre block:
some text with white space
If you enable the 'path' option in the wysiwyg profile section, you can investigate the preceding pre boxes easily. Just put your cursor in the box you want to check and look at the path. You should see something like:
Path: pre.wysiwyg-syntaxhl brush: php;fontsize: 100; first-line: 1;
-for pre's that were created by converting macro {} to pre boxes, or for newly inserted syntax boxes from the popup.
or
Path: pre.brush: bash;fontsize: 100; first-line: 1;
-for syntax boxes that pre-existed in the node, and still use the pre format instead of the macro {} tags
or
Path: pre
-for regular pre tags that might pre-exist.
Note: The syntax highlight button should 'activate' (button should get a border) if you place the cursor in ANY pre element. I am only checking for whether the element is a <pre>, that's it.