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.
|