Paste in Formatted Code Block

Posted by Community Admin on 03-Aug-2018 17:41

Paste in Formatted Code Block

All Replies

Posted by Community Admin on 04-Jan-2011 00:00

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,

Posted by Community Admin on 05-Jan-2011 00:00

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

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 05-Jan-2011 00:00

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,

Posted by Community Admin on 05-Jan-2011 00:00

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.

Posted by Community Admin on 05-Jan-2011 00:00

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:

Tip:


Best wishes,
Radoslav Georgiev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

This thread is closed