March 10
Now that I have more than a single "webmaster" interacting with the Umbraco Administration UI I've found that the plain-text display of the source in the XSLT, CSS, and Template editors has been a source of some frustration. Relative to other webmaster tools, such as Visual Web Developer Express, the lack of formatting and highlighting tends to slow-down these folks. In the course of looking for solutions I came across an older post from Per Ploug Hansen on just this topic. His solution (originally suggested by Ismail Mayat) is to apply the EditArea editor from Christophe Dolivet to the editXslt.aspx page.
This has been so well received by my folks that I thought I'd create this simple how-to:
- Download the EditArea archive here
- Extract the archive to your Umbraco install
- ...<your umbraco root>/umbraco/js/editarea/...
- Edit the the Umbraco files by adding a reference to the required script as follows in the <head> section
- For the XSLT editor:
- ...<your umbraco root>/umbraco/developer/editXslt.aspx
- <script language="javascript" type="text/javascript" src="../js/editarea/edit_area/edit_area_full.js"></script>
- For the Stylesheet editor:
- ...<your umbraco root>/umbraco/settings/stylesheet/editstylesheet.aspx
- <script language="javascript" type="text/javascript" src="../../js/editarea/edit_area/edit_area_full.js"></script>
- For the Template editor:
- ...<your umbraco root>/umbraco/settings/editTemplate.aspx
- <script language="javascript" type="text/javascript" src="../js/editarea/edit_area/edit_area_full.js"></script>
- Then, in the <head> of each file add this script:
- <script language="Javascript" type="text/javascript">
// initialisation
editAreaLoader.init({
id: "editorSource" // id of the textarea to transform
,start_highlight: true
,font_size: "8"
,allow_resize: "no"
,allow_toogle: false
,language: "en"
,syntax: "html" //change to CSS for stylesheets
,toolbar: "search, go_to_line, |, undo, redo, |, change_smooth_selection, highlight"
});
</script>
- Save the files, and you're done.
That's it. I notice a small delay when the pages first load but in this environment, Administration, a bit of a delay is insignificant.
-Paul