CodeMirror Syntax Highlighting Extension
Using SDL Tridion every day, one of the features I use the most is the Source Editor within the Content Management Explorer. This is a flat text area in which code is written. While it is fine for simple Template Building Blocks, once you have a complex Page Template Dreamweaver TBB for example, it can get a bit hard to work with the code, especially since the tab key does not behave as you are used to within your favourite text editor. Of course, you could use Dreamweaver (I personally don�t), or copy and paste the code into another editor, however sometimes it is necessary to work within the editor in the web interface.
To improve this I have developed a GUI Extension for SDL Tridion 2011 (and 2013) and have just released the beta version as open source on GitHub.
Currently the extension has the following features:
The extension utilises the fantastic CodeMirror script which should allow extension with different modes and additional functionality.
Here�s a screenshot of the extension in action:
Download the package below or use the sources from GitHub and build them (On build of the BuildingBlocks.Tridion2011Extensions.CodeMirror project, there is a post build event which copies the needed files to C:\Extensions\CodeMirrorExtension).
Take the files in that folder and put them on the Content Management Server in a folder of your choosing.
In IIS, create a virtual directory under the %SDL Tridion 2011 Website%\Editors\ called CodeMirror pointing to the directory from Step 2.
Add the following lines to the config in %TridionDir%\web\WebUI\WebRoot\Configuration\System.config (remember to update installPath element to the directory from Step 2.)
<server version="126.96.36.199920" modification="37">
Open a Template Building Block, all being well you should see a new 'Enable Code Mirror' button on the Ribbon Toolbar.
Switch to the source tab and click 'Enable Code Mirror' to begin editing! (P.S. You can now use the TAB key as it was intended!)