SyntaxHighlighter Plug-in for Tinymce 3.X WYSIWYG Editor

SyntaxHighlighter Plug-in for Tinymce 3.X is ready now. I don’t know why tinymce development team had to change the way of writing plug-in for the tinymce, they say it’s more modular.  What bothered me really is that there is no backward compatibility. That’s you must upgrade (Actually it’s rather migrate) your plug-in to the new way.

Anyway, I have upgraded the plug-in I talked about here, to work on tinymce 3.x. To get it running on your site please use the attached file in this post and follow the same instructions on this blog entry.


Hope this helps

22 Comments

  • Hey, i just tryed your plugin. for me it does not work at all .. neither when i integrate your (bold) settings into my tinymce nor when i use your complete settings.

    is there anything more do to then editing the settings and pasting your folder into the plugins folder of tinymce?

    thx for help :)

  • your examples do not work :(((

  • They do work, but I have not include the SyntaxHighlighter, you need to install it.

    Can you tell me what exactly the problem, so I can help.

  • The examples work but require some work because of UPPER/lowercase characters.
    For instance, change:

    theme_advanced_buttons3_add_before : "tablecontrols,CodeHighlighting"

    to:

    theme_advanced_buttons3_add_before : "tablecontrols,codehighlighting"

  • Hi feelexit,

    You are using the mode :"exact"

    You either need to use mode : "textareas"  or you can still use the mode:"exact" but then you need to mention the element id like elements : "WYSIWYG", the example attached has a texarea element with id="WYSIWYG".


    Hope this helps

  • Hi, I installed this plugin to test on my computer which has apache installed. It worked fine with Joomla. But when i did the exact same thing at my server, which also runs Apache, the icon didnt show up? What could be the reason?

  • Hi Aditya,

    Can you give me a sample of what you did?

  • Hi,

    Your sample has lot's of $variables, so I couldn't test it. All I can think of right now is the Theme. Try to use the advanced theme and check.

    Please let me know if this solves your problem.

  • For tinymce 2.x please use this
    http://weblogs.asp.net/nawaf/archive/2008/04/06/syntaxhighlighter-plugin-for-tinymce-wysiwyg-editor.aspx

  • Hi Aditya,

    Can I access your site? I will try to debug it using Firebug.

    Regards

  • Ok sure. I can send you the login details of my site that runs on Joomla. What rights would you require to debug, so that I can create your seperate account? Also, kindly give me your email account, so that the details are safe
    Thanks & Regards
    Aditya.

  • hi nawaf,
    Firstavail, thanks for this plugin :=)
    Unfortunately I can't manage to get it work. When I load the blog with tinymce, the tinymce dosen't load and the webdevelopper error console says:
    "Illegal character ï>>¿/**"
    (without the quotes)
    it looks like a encodification problem to me, but I can't solve it. I tried to eliminate the comment with your name (acording to the console it's where the problem is) but I had no luckkkkkkk.
    Any thoughts?
    thanks anyway for your time
    cheers

  • Hi

    Can you please post a sample of your code.

    Did you try this one. It's basic example (it includes all the necessary files tinymce + dp.SyntaxHighlighter + plugin)
    http://weblogs.asp.net/blogs/nawaf/zipfiles/Example_3.x.full.zip

    Please let me know if this help you solve your problem

    Regards

  • hi Nawaf, thanx for answering, and sorry for wasting your time.
    I am an idiot: I am using version 2 of tinymce...
    I downloaded your plugin for this version and it works like a charm.
    I'll try to be smarter next time :)
    cheers

  • Dear osdave,

    Never say that,

    Actually these type of mistakes only smart people fill into.

  • Hi Victory,

    What you can do is to set the mode as mode:"exact" but then you need to mention the element id like elements : "WYSIWYG", the example attached has a texarea element with id="WYSIWYG".

    Hope this helps

  • First of all, thanks for all you work.
    Secondly I wonder if it should highlight within TinyMCE or only on the output?

    I got the plugin to work and it does add a but it does not highlight inside TinyMCE as I hopped it will do.

  • Hi Jeff,

    I have not really tried to test it. May be you could test it and tell us :)

    Thanks

  • Hi, thanks for this great article.
    Does anybody know how to get it working within the b2Evolution framework?
    The extra layer of complexity has stumped me.
    Thanks!
    Matt

  • Super. Nice Plugin. Thanks nawaf227. :) :) :)

  • Hi,

    for some reason tinymce keeps replacing (php open and close tags) with html ascii codes. example:

    <?php

    echo "test";

    ?>

    should be:

  • I love what you guys tend to be up too. This sort of clever work and
    exposure! Keep up the wonderful works guys I've incorporated you guys to our blogroll.

Comments have been disabled for this content.