I'm trying to use Syntax Highlighter with my blog at http://a.shinynew.me. This is a tumblog.
I cannot seem to get it to work. I have followed his basic instructions for installation using the CDN hosted versions, but nothing happens on the page and nothing gets thrown in either firebug or chrome dev tools. All referenced resources are loaded.
I was hoping someone could clue me in to how to use Syntax Highlighter with Tumblr, and if not, what a suitable alternative might be.
I'm going to switch the answer on this to a better answer which is Gist from GitHub. Embeds perfectly with beautiful syntax highlighting and minimal markup.
https://gist.github.com/
Try this.
Related
I have been using Rouge and Kramdown to properly format syntax since I've been using Jekyll. I haven't looked in awhile, but recently noticed that the syntax highlighting doesn't appear to be working properly. I noticed that the change broke when GitHub pages started supporting Jekyll 3.9 (was 3.8.5 for the longest time) and the latest version of Rouge. Anyone else find a solution to this? It appears to be broken on many sites that use GitHub Pages and I cannot find a site where it's working.
Here is a URL that does not work: https://www.jasongaylord.com/blog/embed-javascript-in-custom-aspnet-server-controls
The URL in question that is supposed to show syntax highlighting not working, does in fact appear to have syntax highlighting working correctly.
Section of your site with syntax highlighting, highlighted by Chrome dev tools. Shows syntax highlighting CSS class provided by Rouge and data-lang attribute
I'm baffled! I built ckeditor 4.13 using the online builder, and included the codesnippet plugin. Now when I chose the plugin within the editor from the toolbar it allows me to add the code under which ever language I choose, but the syntax highlighting doesn't work for all languages. For example CSS is not highlighted. The background of the chosen theme is there, but no highlighting. SQL queries are fine as are some others, but not CSS or PHP it would seem!
Also, I'm editing in one place and then viewing the article on another place (pulling the article from a database). The styling is completely missing altogether when it's the article is viewed. I tried to find a CSS file which may contain the classes that had been attached to the snippets (such as language-php) but couldn't. I thought if I just linked to the CSS file in my header it would attach the styling...I was wrong!
Any ideas how I can tackle this issue please? Google has brought nothing so far.
For anyone interested, I've found the best way to deal with the syntax highlighting issue is to download prism. This will work with the classes produced by ckeditors codesnippet plugin and colour code the syntax according the theme you chose from Prism. Look at prismjs.com.
I have been using syntax highlighter for my blogs which are hosted on Blogger.com, but recently I noticed that the code which has been highlighted by syntax highlighter doesn't appear on blog's feed and on mobile version. I tried to search over internet but couldn't find any useful information. I am novice to blogger/javascript and couldn't figure out why I am not able to see the formatted code.
Any kind of information will be appreciated here.
After a bit of research I found prettyprint syntax highlighter, which is also being used on Google website e.g developer.android.com.
I liked this its really easy to use and light weight.
Steps to inetgrate is shown in prettify syntax highlighter blogs.
Can anybody point me in the right direction as to how to
implement the editor that opens up when I try to post an answer or type a new question ?
Also when displaying the replies how is the feature with syntax highlighting for the code snippets implemented ?
As far as I know, the Javascript based editor is a heavily modified version of WMD Markdown Editor.
Moving on to your second question. What server side language are you using? For example, in PHP Geshi is a popluar syntax highlighter. Although I personally have not worked with it.
Try the Editor control that comes with AJAX Control Tool kit
I inherited a web site project that includes mootools.js (about 40k) in most of the scripts. However, I have not seen, intuitively, where it is being used and given the nature of this porject, ahem, I'm thinking it might not be being used at all!
I'm "under the gun" to ship this tonight (yup, it's a pre-Thanksgiving release). I have not used mootools.js so I'm not sure what to grep for or if there's a sure tell way to determine this. I don't want to have to JSLint it (or do I LOL). Any suggestions would be appreciated. Thanks.
Mootools grafts itself onto some of the native js stuff, so it might be hard to do just by code inspection unless you are very familiar with what MooTools gives you.
Remove it, run your automated tests.
Cause you have those, right?...
Remove it and see if anyone complains.
(You could try it on a test machine first, if you're not feeling brave.)
You can check your source code on some MooTools methods, for example, addEvent().
If it is used so here is the Mootols :)
Just check from the home page of http://mootools.net/
I also was interested on one site why they use jquery and mootools. So, I found addEvent() method. It is Mootols method.
You must have a dev version of the site. Just pull it out and go over pages see if stuff breaks. Mostly you will get unknown function type stuff, if there is any dependencies. Firebug is your friend.
1, Open firebug
2, Click the DOM tab
3, Check if the Mootools object exists (It will say the current version of mootools next to it).
Hope this helps
:)