Follow me on twitter @yodasmydad
Ahhhh #Fringe can't finish like that!! Latest Tweet:

Hey I'm Lee. My blog was put up to house my strange thoughts, ramblings, nuggets of information I can refer back to and document my learning curves on new dev stuff like Umbraco v5 and other .NET related things.

All thoughts and comments on here are my own, and in no way reflect my employer - I also take no responsibility for spelling, grammar or terminology, so read at your own risk!

Blogs I Read

Sites I Like

Swapping Out The Editor In nForum v1.1

If you don't like the BBeditor in nForum, you can swap it out very, very easily and replace it with your favourite in v1.1 (TinyMCE, MarkDown etc..).  You simply need to open up ForumEditorIncludes.ascx in the usercontrol folder and replace the references with your editor of choice.

    <script type="text/javascript" src="/nforum/markitup/markitup/jquery.markitup.js"></script>
    <script type="text/javascript" src="/nforum/markitup/markitup/sets/bbcode/set.js"></script>
    <link rel="stylesheet" type="text/css" href="/nforum/markitup/markitup/skins/simple/style.css" />
    <link rel="stylesheet" type="text/css" href="/nforum/markitup/markitup/sets/bbcode/style.css" />
  <script type="text/javascript">
      $(document).ready(function () {
          $('#txtPost').markItUp(mySettings);
      });
    </script>

And if you need to do some custom text transformations on the input, just add it to ConvertBbCode() extension method in ExtensionMethods.cs as this is called whenever editor input is displayed on the page.

        public static string ConvertBbCode (this string theInput)
        {
            // If you need to do more text transformations just add them here
            return !string.IsNullOrEmpty(theInput) ? Helpers.ConvertBbCodeToHtml(theInput) : theInput;
        }

That's it :)

Back to top