Paste in Formatted Code Block
Hey all,
How do you paste in code so that it is formatted nicely? On a new thread under the tip box, it means 'For code snippets use 'Format Code Block''. It fails to mention the type of tag to use to produce this effect.
Any thoughts?
Thanks,
Hello Doug,
For instance if you want to enable it for ContentBlock control you can map the template of the GontentBlock designer from Sitefinity's configuration ( take a look at attached screenshot) and then set the property of theHtmlField control. Then you can set ToolsFile property of the RadEditor ]\
htmlEditor.Editor.ToolsFile = "~/Controls/ToolsFile.xml";
where you have <tool name="FormatBlock" /> tool added.
Kind regards,
Ivan Dimitrov
the Telerik team
I was referring to the forums on Sitefnity.com. How do you indicate when posting on the forum that a specific section of text should be code.
For example, on my word press blog, I can use
[code lang="whatEverLanguage"]
// Code Section
[/code]
How do you do that on the forums here on Sitefinity.com?
Thanks,
Never mind, got it. I am more used to using a tag within the text editor on forum posts such as in WordPress.
Thanks for all the help.
Hi Doug,
This is done throught the format code block tool of the RadEditor. This all done through styles. Each time you post a reply to a forum post you will see the bellow text above the content area: