YetAnotherForum
Welcome Guest Search | Active Topics | Log In | Register

Tag as favorite
Syntax highlighter by Alex Gorbatchev
Golo Roden
#1 Posted : Thursday, February 26, 2009 12:39:20 PM

Rank: Newbie

Medals:

Joined: 9/19/2008
Posts: 5
Points: 15

Thanks: 0 times
Was thanked: 0 time(s) in 0 post(s)
Hi,

at the moment I try to embed the syntax highlighter by Alex Gorbatchev (http://alexgorbatchev.com/wiki/SyntaxHighlighter) into BE 1.4.5.

Integrating the styles and scripts is no problem, but how do I setup the Tiny MCE editor / Windows Live Writer to produce the correct code?

Has anyone already done this successfully?

Cheerio,


Golo
Sponsor  
 
jwendl
#2 Posted : Tuesday, April 07, 2009 3:08:31 AM
Rank: Newbie

Medals:

Joined: 9/20/2008
Posts: 7
Points: 21

Thanks: 0 times
Was thanked: 0 time(s) in 0 post(s)
Golo Roden wrote:
Hi,

at the moment I try to embed the syntax highlighter by Alex Gorbatchev (http://alexgorbatchev.com/wiki/SyntaxHighlighter) into BE 1.4.5.

Integrating the styles and scripts is no problem, but how do I setup the Tiny MCE editor / Windows Live Writer to produce the correct code?

Has anyone already done this successfully?

Cheerio,


Golo


Yes, it's quite easy really:

Code:
< == ~/admin/tinyMCE.aspx (From TFS)
> == ~/admin/tinyMCE.aspx (From Local)
11,13c11,12
<         plugins : "inlinepopups,fullscreen,contextmenu,cleanup,emotions,table,iespell,advlink",
<         convert_urls: false,
<         
---
>         plugins : "inlinepopups,fullscreen,contextmenu,cleanup,emotions,table,iespell,advlink,codehighlighting",
>         convert_urls: false,
15c14
<         theme_advanced_buttons1: "fullscreen,code,|,cut,copy,paste,|,undo,redo,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,bullist,numlist,outdent,indent,|,iespell,link,unlink,sub,sup,removeformat,cleanup,charmap,emotions,|,formatselect,fontselect,fontsizeselect",
---
>         theme_advanced_buttons1: "fullscreen,code,|,cut,copy,paste,|,undo,redo,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull|,bullist,numlist,outdent,indent,|,iespell,link,unlink,sub,sup,removeformat,cleanup,charmap,emotions,codehighlighting,|,formatselect,fontselect,fontsizeselect",
21c20
<         
---
>         remove_linebreaks : false,


Then you get : http://weblogs.asp.net/nawaf/archive/2008/04/10/syntaxhighlighter-plug-in-for-tinymce-3-x-wysiwyg-editor.aspx

Copy the codehighlighting folder into ~/editors/tiny_mce3/plugins/codehighlighting

Code:
< == ~/editors/tiny_mce3/plugins/codehighlighting/js/codehighlighting.js (From Download)
> == ~/editors/tiny_mce3/plugins/codehighlighting/js/codehighlighting.js (From Local)
6c6
<      code = code + "</textarea> "
---
>      code = code + "</pre> "
30c30
<         return "<textarea name='code' class='"+lang+options+"' cols='50' rows='20'>";
---
>         return "<pre name='code' class='brush: "+lang+options+";'>";


That should be it.
Users browsing this topic
Guest
Tag as favorite
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAFPro Theme Created by Jaben Cargman (Tiny Gecko)
Powered by YAF 1.9.4 RC1 | YAF © 2003-2009, Yet Another Forum.NET
This page was generated in 0.052 seconds.