To use it you can add the class "prettyprint" to your pre tags like this:
Then I realised it would be a pain to have to go through all of my posts for the last 12 months and add this class to each pre tag, so I edited the partial view in Umbraco which renders the content grid. I made it replace any opening pre tags with a pre tag with the class of prettyprint.
The partial is in Views > Partials Views > Grid > Editors > Rte
You can change it to this:
@model dynamic @using Umbraco.Web.Templates @Html.Raw(TemplateUtilities.ParseInternalLinks(Model.value.ToString().Replace("<pre>","<pre class=\"prettyprint\">")))
Now my pre tags are formatted automatically and I don't need to add a class to them.
This post shows you how you can ignore a file in git locally without ignoring it from the repository…Read Post
This post shows you how you can get the name of the picked item in Nested Content or Stacked Content…Read Post
In this post I share my approach to using source control for my Umbraco website source code and medi…Read Post
This post will show you how to solve the error "Could not load file or assembly 'Microsoft.CodeDom.P…Read Post