SyntaxHighlighter

What it does:
SyntaxHighlighter adds support for the most excellent dp.SyntaxHighlighter from Alex Gorbatchev for easy use in your WordPress. In it’s own words, SyntaxHighlighter “is meant to help a developer to post code snippets online with ease and without having to worry about applying format.”

Which it does pretty swell, but sadly, this didn’t quite work out on WordPress and it’s various display-filters, which are were quite annoying regarding this task. Now they aren’t anymore. And even the usage of SyntaxHighlighter got easier by using own tags and administration options.

Usage:

[ source:str language] str source [/source]

Please take note to NOT use a whitespace in the [ source:]-command like shown in Usage and Example. So if you copy & paste it, don’t forget to remove the space.

  • str language tells the parser how it should highlight the following source. Currently, the following strings are understood:
    • css
    • c#, c-sharp, csharp
    • c, cpp, c++
    • vb, vb.net
    • delphi, pascal
    • js, jscript, javascript
    • php
    • py, python
    • ruby
    • sql
    • xml, xhtml, xslt, html, xhtml
  • str source contains the source-snippet you want to display.

Example:

[ source:php]
// Re-insert source as (formatted) textarea
foreach( $theSources[2] as $sourceID => $sourceBlock ) {
    $theBrush =
        $theSources[1][$sourceID].$optionString;
    $thePost = str_replace(
        ”{sourceID:{$sourceID}}”,
        sprintf( $textArea, $theBrush, $syntaxOptions['syntaxCols'], $syntaxOptions['syntaxRows'], $sourceBlock ),
        $thePost
    );
}
[/source]

will become

[source:php]
// Re-insert source as (formatted) textarea
foreach( $theSources[2] as $sourceID => $sourceBlock ) {
$theBrush =
$theSources[1][$sourceID].$optionString;
$thePost = str_replace(
“{sourceID:{$sourceID}}”,
sprintf( $textArea, $theBrush, $syntaxOptions['syntaxCols'], $syntaxOptions['syntaxRows'], $sourceBlock ),
$thePost
);
}
[/source]

Don’t forget to activate support for the language(s) you want to display. Do this by going to the WordPress-Administration Options-Menu and click it active.

Supported languages:

SyntaxHighlighter currently supports:

  • C#
  • CSS
  • C++
  • VB & VB.NET
  • Delphi, Pascal
  • Java
  • JavaScript
  • PHP
  • Python
  • Ruby
  • SQL
  • XML, HTML, XSLT and any other XML style code

To keep things slim and pretty you can turn on or off every supported language in the WordPress Options, just like you wanted to ask for anyway.

Administration options:

When activating the plugin, you may notice a new administration menu under Options named “Syntax”. Here you can choose which languages should be supported and define some global display options, which are as follows:

  • Textarea Cols / Rows: will set in which dimensions the source-block is displayed first while CSS is not yet loaded.
  • Make the Textbox Collapsible? If activated, your sourceboxes will be collapsed at first, so your users will have to click them open to see the source.
  • Hide Controls on top? If activated, this option will hide the controls over your sourceboxes. These controls are show bla, print and a bit of info about the original SyntaxHighlighter-script.
  • Hide Gutter? If activated, this option will hide the line-counter to the left.
  • Hide Columns? If activated, this option will hide the column-counter which would otherwise appear above your source.

Download & Installation
Download:
Go ahead and fetch it here: syntax.zip

Installation:
Extract all files and directories from the .zip-archive to your WordPress plugin-folder. Then browse to your administration menu named “Plugins” and activate the plugin named “SyntaxHighlighter”. That’s it.

History:

1.3.0 Replaced textarea-functionality with the all new & simple [source]-command
1.2.1 Fixed a bug in RegEx which sometimes didn’t parse the posting correctly
1.2.0 Added some more admin options for easy one-time configuration
1.1.2 I wish I’d get a Dollar for each fixed incompatibility with WordPress
1.1.1 Fixed even more incompatibility with WordPress when having HTML-entries
1.1.0 Added admin options & dynamic script loading
1.0.0 Final Release
0.1.1 Fixed incompatibility with WordPress’ auto-p and texturize-filters
0.1.0 Initial Test Release.

  • #1 geschrieben von Steven Li
    vor 3 Jahren

    Congratulation, though I do not know germany at all.
    I am a newbie on PHP and WordPress, I just have a test to write a plugin.

  • #2 geschrieben von joe
    vor 3 Jahren

    Hallo Eric,
    geiles Plugin!!

    Ich habe leider das Problem dass alle Anführungszeichen im Code falsch dargestellt werden.

    hast du dafür eine Erklärung?

    joe

  • #3 geschrieben von Erik Range
    vor 3 Jahren

    @Joe: Hast Du das Snippet direkt aus dem entsprechenden Editor rauskopiert oder noch irgendwo anders, wo die Anführungszeichen eventuell schon vorher umformatiert wurden? Generell zeigt das Plugin nur genau das an, was man übergibt, ohne Umformatierung oder “Beschönigung” wie sonst bei WP üblich. Oben im Beispiel sind auch alle “Häkchen” korrekt angezeigt, gerade extra nochmal getestet.. hehe

    Ansonsten vielleicht mal eruieren, ob sich da evtl. noch ein anderes Plugin einschaltet, was man im Falle der Source-Darstellung aushebeln müsste. :-)

  • #4 geschrieben von Danny Meier
    vor 3 Jahren

    Hallo

    Ich hab das Problem dass das Plugin nur beim Default-Theme funktioniert. Sobald ich irgend ein anderes verwende, bekomme ich nur noch eine Textarea mit dem Code darin. Kein SyntaxHighlighting, kein zusammenklappares Textfeld, nichts. Die CSS wird aber eingebunden wenn ich im Quellcode nachschauen gehe. Auch die JavaScript-Konsole meldet keinen Fehler.

    Hat jemand einen Rat für mich? Ist bis auf das TimeZone Plugin, das einzige welches aktiviert ist. Sobald ich mein Theme wieder auf Default ändere funktionierts.

  • #5 geschrieben von Bjørn
    vor 3 Jahren

    Just what I was looking for! Thanks a bunch :-)

  • #6 geschrieben von (v)
    vor 3 Jahren

    G’work!

    ps> can you add to next release simple check for code presence on page (if no code then don’t load a scripts’ stuff)?!

  • #7 geschrieben von Erik Range
    vor 3 Jahren

    @Danny: tritt das Phänomen nur mit einem bestimmten Template auf? Generell hört sich das ganze so an, als würde er einfach das CSS nicht mitladen, denn das konvertieren zur textarea ist schonmal richtig. Diese wird dann eigentlich nur noch per CSS “eingekleidet”.

    @(V): It’s already in there, but on a per-posting base. That means if the current posting in the loop hasn’t got any code in it, the script simply displays the posting the usual way WordPress does. If the current post contains a [source]-tag, it gets parsed at it should.

  • #8 geschrieben von Marcus
    vor 3 Jahren

    Thank you very much for writing this plugin– it has saved me much time!

    I notice one problem in my setup: the lines of code seem to be spaced to cause breaks in the green column ruler and boxes in the grey horizontal bands. Any ideas on what is causing this?

    I am running a vanilla WP 2.0.4 install, and viewing the pages in Firefox. I do *not* see these problems when viewing your page (this page), but when I copy your source snippet into a new post I do. All languages in syntax are activated.

  • #9 geschrieben von Wordpress Workshop
    vor 3 Jahren

    This plugin is excellent but it hoses my Dagon Sitemap real quick, any ideas on how to allow these 2 plugins both to exist at the same time?

    Here is the link to Dagon: http://www.dagondesign.com/articles/sitemap-generator-plugin-for-wordpress/

  • #10 geschrieben von Sebastian Gingter
    vor 3 Jahren

    Hrm. Ich hab da ein Feature-Request:

    Wäre es möglich, dass der Code immer in einer Festbreitenschriftart (z.B. Courier New o.ä.) dargestellt wird? Es ist für einen Entwickler irgendwie seltsam, den Code in einer normalen Schriftart zu sehen. Das zerlegt einem auch vor allem gerne die Kommentarformatierungen und die Einrückungen.

    Bzw. Was müsste man dafür machen? ;-)

  • #11 geschrieben von Erik Range
    vor 3 Jahren

    @Marcus: you got a screenshot or url to check out? I don’t quite get what exactly you mean with those spaces.

    @WordPress Workshop: I’ll give both plugins a try in a minute and will report back on the issue.

    @Sebastian: Die Darstellung des Codes wird durch das CSS-File ./styles/Styles/SyntaxHighlighter.CSS formatiert. Voreingestellt sind dort Courier New, Courier sowie mono. Hast Du bei Dir das Problem, dass einfach nur eine Textbox bzw. Textarea mit dem Source angezeigt wird? Ganz schlicht und ohne Formatierung?

  • #12 geschrieben von Sebastian Gingter
    vor 3 Jahren

    @Erik: Nicht wirklich.
    Ich haber z.B. hier: http://thespicemustflow.de/post/2006/10/16/31/
    einen Code drin. Der wird aber nicht richtig dargestellt. Der Code ist Arial und nicht Courier New.
    Der Rest mit Textbox und Farben scheint alles korrekt zu funktionieren.

  • #13 geschrieben von Erik Range
    vor 3 Jahren

    @Sebastian: Hört sich eigentlich eher so an, als würde der CSS-Wust von Binary Blue einfach die Einstellungen für den Font überschreiben. Ich hab’ jetzt mal provisorisch ein !important an die entsprechende Stelle gesetzt. Einfach nochmal kurz runterladen, Plugin überschreiben (wp-content/plugins/syntax/Styles/SyntaxHighlighter.css reicht schon) und Bescheid sagen, ob das als Mini-Fix soweit geht.

  • #14 geschrieben von Sebastian Gingter
    vor 3 Jahren

    Bin erst jetzt dazu gekommen. Das !important hilft leider nicht.

    Das greift laut meiner WebDeveloper Toolbar bis genau in das CSS-Element, aber bei Elementen die in dp-highlighter hineingeschachtelt sind greifen die Einstellungen nicht mehr.

    Zumindest nicht in meinem FireFox 2.0 und IE7.

  • #15 geschrieben von Lindquist
    vor 3 Jahren

    I don’t know if this has been answered in German already, but I’m also having the spacing problem where it appears there are margins in between individual lines of code. Anybody got a fix?

    You can see what it looks like at in a simple example at http://www.johnlindquist.com

  • #16 geschrieben von Lindquist
    vor 3 Jahren

    I looked through my own CSS and realized that this element was interfering with SyntaxHighligher’s CSS:

    html>body .entry li {
    margin: 7px 0 8px 10px;
    }

    I just took that out and everything is perfect. Thanks for the amazing plug-in.

  • #17 geschrieben von Erik Range
    vor 3 Jahren

    Ah, okay.. that was pretty quick, didn’t even have time to react *g* Thanks for the info regarding the CSS.. might come in handy for future releases.. seems SyntaxHighlighter gets stuck with some templates here and there. ;-)

  • #18 geschrieben von Lindquist
    vor 3 Jahren

    Yeah, I just modified the default template/CSS to my liking, so I was unaware of a lot of default CSS. I know no one in the world uses the default template, but there are probably more people like me who just change the main styles and leave the “html>body .entry li” as is.

  • #19 geschrieben von Eloy
    vor 3 Jahren

    Could someone be so kind to explain me
    how I can use the firstline function?
    I couldn’t find it anywhere, but it’s probably something I oversaw :)

    Anyway, nice plugin!

  • #20 geschrieben von Erik Range
    vor 3 Jahren

    I guessed hard, but I failed miserably – which firstline function are you referring to? I need a hint :-)

  • #21 geschrieben von Eloy
    vor 3 Jahren

    Hahaha, yeah sorry about that, forgot to send you the link:
    http://www.dreamprojections.com/SyntaxHighlighter/Tests/FirstLine.html

    It’s nice to be able to break up a file in chunks while maintaining the correct line numbers.

  • #22 geschrieben von Erik Range
    vor 3 Jahren

    I’ve got to admit, that’s a feature which’s not in there yet. But take my promise: it will be in the next version. Or, to be more precisely: the next version coming up is especially for this feature I wanted to implement anyway, but sat around on my lazy butt, thinking nobody would notice it’s not in there anyway. *g* Give me a day or two, I’m a bit short of time at the moment, but I’ll get to this ASAP. ;-)

  • #23 geschrieben von Eloy
    vor 3 Jahren

    Cool! I’ll wait patiently then :)

  • #24 geschrieben von Jeff
    vor 3 Jahren

    The plugin is not writing the scripts to the footer, everything else (from examining the source) is working properly. I can force it to work by manually adding the script src’s at the bottom of my template, but from looking at syntax.php it appears that it should be doing it automatically based on the preferences. Any ideas?

  • #25 geschrieben von Morten Bock
    vor 3 Jahren

    A little debug info for those of you who can’t get the styling to show up:

    The tags get_header(); and wp_footer(); are required for linking to CSS and JS files.

    Took me a while to figure this out in my home made theme :-)

    Other than that: Great plugin!

  • #26 geschrieben von Morten Bock
    vor 3 Jahren

    Sorry, that’s wp_head(); not get_header();

  • #27 geschrieben von Reiner
    vor 3 Jahren

    Hallo Erik,

    ich erhalte in meinem Quelltext die Fehlermeldung “Invalid argument supplied for foreach() in blablabla/wp-content/plugins/syntax/syntax.php on line 185″, wenn ich dein Plugin einbinde (offenbar klappt was mit den options nicht.
    Dadurch werden die Brushes nicht geladen (weil die forEach-Schleife nicht ausgeführt wird) und die Textfelder nicht eingefärbt. Ich habe mir jetzt die wichtigsten Sprachen einkommentiert, ohne dieser Hardwired-Lösung wäre ich aber auch glücklicher.

    Gruß,

    Reiner

  • #28 geschrieben von Erik Range
    vor 3 Jahren

    @Morten: Thanks for pointing that out! :-) Maybe I should add a bit of info to the posting on which action hooks are being used here. For a quick reference, it’s: admin_menu, wp_head, the_content, wp_footer

    @Reiner: Welche WP-Version nutzt Du denn? Ich kann zwar jetzt spontan eine if( is_array( $syntaxOptions ) )-Anweisung vor das foreach setzen, aber das beseitig höchstens die Fehlerausgabe. Aus irgendeinem Grund greift bei Dir das get_settings( 'syntaxOptions' ); nicht. Aber im Admin-Menü hast Du die Einstellungen schon gemacht, oder?

    @Jeff: Which template are you using? It should have a get_footer(); in the index.php

    @Eloy: still a bit patience please :(

  • #29 geschrieben von Speck0r
    vor 3 Jahren

    Hallo, ich habe folgendes problem, dass die darstellung des codes nicht in farbe ist ich vermute das die css nicht geladen wird oder benutzt wird. was kann ich dagegen tun?

    Thx 4 Help
    speck0r

  • #30 geschrieben von Lothar Baier
    vor 3 Jahren

    Ich habe das Plugin installiert, funktioniert auch so weit ganz gut. Leider fügt mir entweder Wordpress oder das Plugin am Ende jeder Zeile einen br-tag ein. Kann man das vermeiden?

    Gruß
    Lothar

  • #31 geschrieben von Stefan @ Brandt Aktuell
    vor 3 Jahren

    Hallo,
    do you know about problems between the wp-plugin Adsense-Deluxe and SyntaxHighlighter?

    If i activate your plugin SyntaxHighlighter the adsense box include with Adsense-Deluxe are not showing on the content page. If i deactivate your plugin the adsense box is include the content page.

  • #32 geschrieben von Luke
    vor 3 Jahren

    Wow great job mate I will definitely be using this. Thank you very much.

  • #33 geschrieben von eyoung
    vor 3 Jahren

    Howdy,I’m very glad to have found it!
    Now,I have a problem.
    There is scroll bar in the pages when the string of the code is too long.
    I wander if there is something to do for avoiding it.

  • #34 geschrieben von Kruppi
    vor 3 Jahren

    Hallo Erik, erstmal vielen Dank für dein Plugin nur wie bekomme ich die Einrückung des Codes hin?

    MfG Kruppi

  • #35 geschrieben von Kruppi
    vor 3 Jahren

    Ach so läuft das hier?! Nicht erwünschte Kommentare bzw. Fragen werden gelöscht? Wie wäre es denn mal mit beantworten? Oder hast du noch nie von dem Sprichwort: “Es gibt keine dumme Fragen sondern nur dumme Antworten” gehört? Naja vielen Dank für den Support!

    MfG Kruppi

  • #36 geschrieben von Akhil Bansal
    vor 3 Jahren

    Thanks, I am using it.

  • #37 geschrieben von Matteo
    vor 3 Jahren

    This is a great plugin. I searched one for my ruby on rails blog, but I didn’t find anything. So I use a TextMate snippet to have a preformatted block of code! This is a great and useful solution! Thanks

  • #38 geschrieben von Chris Johnston
    vor 3 Jahren

    Nice plugin, except it doesn’t quite work for me. The problem that I am having is that I am getting html showing up in the displayed source. The html is not present in the post, it is being added sometime during the rendering of the page. I am using WordPress 2.0.7.

    Here is a url that shows the problem:
    http://www.fuzzylizard.com/archives/2007/01/22/857/

    Anyone have any ideas what is going on here? I would really like to get this plugin working correctly.

  • #39 geschrieben von jesús
    vor 3 Jahren

    Stefan, I am having the same problem, if this plug-in is activated, the ads from the Adsense-delux plug-in doesn’t show anything.

    Anybody have found a solution?

  • #40 geschrieben von hackereac
    vor 3 Jahren

    I used that plugin.But tag not shown.
    I couldn’t tag
    1.
    2.
    3.
    4. [There is tag but don't shown]
    5.
    6.
    9.
    10.
    11.

    Help me pls???

  • #41 geschrieben von small
    vor 3 Jahren

    Thanks very much for this plugin – defiantly in my top plugins for wordpress, its perfect!!

  • #42 geschrieben von Can Erten
    vor 3 Jahren

    The necessary plugin (:
    Thank u so much!

  • #43 geschrieben von Trevor Fitzgerald
    vor 3 Jahren

    Hi, first off this is a great plugin. It’s perfect for what I needed.

    I did find a little bug that doesn’t let it work for some installations of WordPress. For the people that have their blog URI different than their wordpress installation URI:

    The syntaxPath function points to the wrong directory. It assumes that your wordpress files are all stored in the same directory as your main index page.

    To fix this for everyone, change:

    return get_settings( ‘home’ ).”/wp-content/plugins/syntax/”;

    to:

    return get_bloginfo ( ‘wpurl’ ).”/wp-content/plugins/syntax/”;

    and it will work.

    -Trevor

  • #44 geschrieben von Erik Range
    vor 3 Jahren

    @65: Sorry, but there’s not tag shown in the editor. You’ll have to enter it yourself, as you need to specify which language you’ll be highlighting. See above for an example. It’s really simple. :-)

    @Trevor: Thanks for pointing that out. I’ll fix it in a minute.

  • #45 geschrieben von Finglas
    vor 3 Jahren

    Danke für das Plugin.

  • #46 geschrieben von Daniel Fischer
    vor 3 Jahren

    For some reason this plugin isn’t working for me. All I get is a textarea, (I don’t have any styling that is going on) I also notice that there is no div like you have indiciating to style the textarea. Why won’t it work for me? :(

  • #47 geschrieben von pizzamx
    vor 3 Jahren

    got the same problem as Kommentar(76)

  • #48 geschrieben von Ryan
    vor 3 Jahren

    Thanks for the plugin. I have noticed a small issue with the plugin. When I have it using the [source:css] and I have the word “bottom” in there it is displayed twice.

    Example:
    background-position: bottom left;

    Results:
    background-position: bottombottom left;

    http://blog.aisleten.com/2007/05/03/ajax-css-star-rating-with-acts_as_rateable/

  • #49 geschrieben von Satish Talim
    vor 3 Jahren

    One major problem with this plugin is that when I activate it, it screws up the Adsense Deluxe plugin code and I am unable to validate my page here -
    http://validator.w3.org/check/referer

    If I disable this plugin, then my page validates. This plugin does not work properly with Adsense Deluxe.

  • #50 geschrieben von Mirko
    vor 3 Jahren

    Hallo!

    Das Plugin ist wirklich top! Ich habe jedoch zwei Probleme:

    1. Ich nutze das Plugin “Post Teaser”. Ist dieses und das “Syntax Plugin” aktiviert, funktioniert Post Teaser nicht mehr.

    2. Ich nutze das Standard Template von wp, und die Darstellung des Codes sieht mit diesem nicht ganz so toll aus. siehe http://www.frytux.de/?p=12

    Hat jemand eine Idee??

  • #51 geschrieben von Sam
    vor 3 Jahren

    Hi, thanks for a great plug-in. However, it seems to nuke my formatting. Here is an example. I’m new to WordPress so I’m not sure where the bug lies. Any help is appreciated.

  • #52 geschrieben von sur
    vor 3 Jahren

    thanks a lot for such a great plugin!

  • #53 geschrieben von Streuner
    vor 3 Jahren

    Hi Erik,
    geniales Plugin! Ich hab allerdings ein Problem – ich tippe auf CSS. Wenn ich Code poste ist jede 2te Zeile doppelt so breit wie die davor. Ich nutze den Mandigo-Theme -> http://www.dead-bytes.de
    Bin für jede Hilfe dankbar :)
    Gruß Streuner

  • #54 geschrieben von breskeby
    vor 3 Jahren

    hallo,
    ich kann zwar java als sprache in den optionen auswählen, allerdings wenn ich im tag schreibe source:java bekomm ich kein highlighting. in der liste fehlt auch noch java. wird java garnicht unterstützt?

    gruß rené

  • #55 geschrieben von breskeby
    vor 3 Jahren

    blick ins plugin php half mir weiter. super plugin

  • #56 geschrieben von breskeby
    vor 3 Jahren

    java wird angeblich unterstützt. aber bei mir findet kein syntax highlighting statt :-(

  • #57 geschrieben von breskeby
    vor 3 Jahren

    hab den fehler jetzt gefunden. lag an falschen rückgabewerte der syntaxPath Funktion.

    gruß rené

  • #58 geschrieben von Matt V
    vor 3 Jahren

    Hi Erik,

    I installed your plugin, but it doesnt seem to want to format the comments made to a posting, only my original post. Is this intended, or did I mess something up along the way?

    Thanks!
    Matt

  • #59 geschrieben von Matt V
    vor 3 Jahren

    Disregard my previous comment, I ended up just making my own plugin. Thanks

  • #60 geschrieben von vesal
    vor 3 Jahren

    hi, i’m trying for use your plug ing but when i want to use this only i see ‘{sourceID:0}’ why?

  • #61 geschrieben von Michael Sync
    vor 2 Jahren

    I’m getting this error ~~

    Warning: Invalid argument supplied for foreach() in C:\xampp\htdocs\wordpress\wp-content\plugins\syntax.php on line 184

  • #62 geschrieben von Brian McQuay
    vor 2 Jahren

    I am having trouble getting this plugin working on the newest version of Wordpress. I’ve tried both php and html with the following code


    [source:php][/source]

  • #63 geschrieben von Brian McQuay
    vor 2 Jahren

    note: my previous comment had the code inside brackets removed and isn’t what i intended.

  • #64 geschrieben von Brian McQuay
    vor 2 Jahren

    Lets see if this one works:
    <title><?php if(is_single()) { wp_title(); echo " » "; } else if(is_category()) { echo single_cat_title(); echo " » "; } bloginfo('name'); if($paged) { echo " » Page $paged"; } ?></title>

    this is the code I’m attempting to put into the source brackets.

  • #65 geschrieben von Deny Sri Supriyono
    vor 2 Jahren

    on several try
    i had my blablabla removed automatically.
    i’m using WP 2.3.2

  • #66 geschrieben von mayvelous
    vor 2 Jahren

    Hey thanks for the wonderful plugin.
    I just installed it and I’m getting “Cannot load syntaxOptions.php.” error.

    I’m using wp 2.3.2. Any idea how to fix it?
    I just want to update the language fields and the size of the code block.

    Here is my sample page. You see the box is too tiny, and I can’t update the plugin to adjust it.
    http://www.mayvelous.com/?p=368

    Thanks and appreciate your help.
    May.

  • #67 geschrieben von Norman Schwaneberg
    vor 2 Jahren

    @alle die probleme mit der korekten bunten (css) darstellung haben:

    bitte versucht mal folgenden Quellcode in die footer.php zu adden:

  • #68 geschrieben von Norman Schwaneberg
    vor 2 Jahren

    kleiner Fragezeichen php wp_footer(); Fragenzeichen größer

  • #69 geschrieben von F98
    vor 2 Jahren

    Hi Erik!

    Der Hinweis: “Don’t forget to activate support for the language(s) you want to display. Do this by going to the WordPress-Administration Options-Menu and click it active.” hätte sollen ROT und FETT auf Deiner Seite stehen, was hab ich rumprobiert, dass Plugin zum laufen zu bekommen und bin erst nach nochmaligem Lesen Deiner Installationshinweise auf dieser Seite hinter das Geheimnis gekommen, dass das Plugin noch in den Optionen für verschiedene Sprachen freigeschaltet werden muß. Kann man das nicht gleich standardmäßig für alle machen? Nichtsdestotrotz ein sehr feines Plugin. Vielen Dank! MfG F98.

  • #70 geschrieben von pEtEr
    vor 2 Jahren

    Klasse Plugin! Leider habe ich auch das Problem, dass nur eine Textarea dargestellt wird, aber keine CSS Formatierung stattfindet!?
    Das CSS File ist im Quellcode verknüpft und auch erreichbar. In meinem Quellcode sehe ich folgendes:

    [aource:html][/source]

    In der CSS Datei ist aber keine Klasse php:showcolumns definiert!?

    Hier ein Link zu einem Beitrag mit Quellcode.

    Hat jemand eine Ideee?

    Cheers, pEtEr

  • #71 geschrieben von Jauhari
    vor 2 Jahren

    Is it work on comment sections? How to make it work?

  • #72 geschrieben von James
    vor 2 Jahren

    Doesn’t work for me at all …

  • #73 geschrieben von James
    vor 2 Jahren

    Got it working! Great plugin thanks!

    Just one note. How some the contents of strings “” in csharp aren’t coloured red like the language?

    Would be great if the known types like Regex were also coloured in the normal teal as we …

    I know … not asking for much!

    Thanks.

  • #74 geschrieben von Chris
    vor 2 Jahren

    obviously don’t work with WP 2.5:

    no php-files of the theme- or plugin-editor is highlighted!

  • #75 geschrieben von Paul Kenjora
    vor 2 Jahren

    How do I add a title to each segment of code?

    For example:

    [source:py:Some caption here]

    The caption then gets added above or below the widget.

    Thanks

  • #76 geschrieben von Dave
    vor 2 Jahren

    For everyone who will just see a gray textarea with no highlighting!

    Some designs mix up the style-sheets. Try another, e.g. the default, to see if the highlighter from here is working at all. If it does then, check the css of your design. ;)

  • #77 geschrieben von gevv
    vor 2 Jahren

    Thanks
    my qestion PIC Assembly asm code how to colour ??

  • #78 geschrieben von Ulysses
    vor 2 Jahren

    i’ve been using your plugin for sometime. lately, html breaks or `br` started showing inside the source codes. do you think it had to do with latest upgrade of wordpress. im wondering if im the only experiencing this. anyone else?

    here is a sample.

    thanks for the help.

  • #79 geschrieben von Ulysses
    vor 2 Jahren

    I left a comment yesterday. I don’t know why it was deleted. I have been using SyntaxHighlighter plugin. It has been working great, but lately I am seeing break statements in the code. Do you know why?