For all those developers out there that want to display code on their Sitefinity web site, check out the Format Code Block tool for the RadEditor. This handy tool allows you to easily paste a chunk of code on your site with ease.
Steps To Enable The Format Code Block Tool
- Go to Administration > Settings and then select “Text area” from the menu on the left.
- Click the EDIT button for the “Default tool set”. See the yellow highlighted link below.
- Insert the following code <tool name=”FormatCodeBlock” /> after the “FormatBlock” xml node. See the XML highlighted in yellow below.
- Click the SAVE button.
You will now see the following tool added to your RadEditors. Click this icon to open the format code block editor.
Below is an example of the format code block editor. Simply paste your code in the text area at the top, select a language, click preview, and then click OK once you are ready to paste the code block.
Now you can quickly and easily add formatted code to any of your content in seconds. Enjoy.