1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / General Discussions / Paste in Formatted Code Block

Paste in Formatted Code Block

5 posts, 0 answered
  1. Doug
    Doug avatar
    34 posts
    Registered:
    20 Sep 2010
    04 Jan 2011
    Link to this post
    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,
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    05 Jan 2011
    Link to this post
    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
  3. Doug
    Doug avatar
    34 posts
    Registered:
    20 Sep 2010
    05 Jan 2011
    Link to this post
    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,
  4. Doug
    Doug avatar
    34 posts
    Registered:
    20 Sep 2010
    05 Jan 2011
    Link to this post
    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.
  5. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    05 Jan 2011
    Link to this post
    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
5 posts, 0 answered