Format Code Block

6 posts, 0 answers
  1. Stuart Hemming
    Stuart Hemming avatar
    1622 posts
    Member since:
    Jul 2004

    Posted 15 Aug 2010 Link to this post

    Please do something with the Format Code Block settings.

    At one time the editor used to make a really good job of formating and colouring code snippets when posting 'em on the forums. But  now they are dreadful. In particular the wrapping makes the code practically unreadable. For a specific example, have a look at this forum thread. The code posted was copied directly from VS2K8.

    -- 
    Stuart
  2. Rumen
    Admin
    Rumen avatar
    12848 posts

    Posted 18 Aug 2010 Link to this post

    Hi Stuart,

    Could you please send a screenshot of the unreadable code snippet, because right now I am unable to find such content in the provided forum? Please, see the attached video at http://screencast.com/t/NmIyY2RlNzUt and let me know if you are able to find unreadable content.

    Please, note that it is not recommended to directly copy formatted content from Visual Studio in the Format Block "Paste source code below" area, because this could cause formatting side effects. My advise is to paste the VS content in Notepad and after that in the Format Code Block dialog.

    Kind regards,
    Rumen
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. Stuart Hemming
    Stuart Hemming avatar
    1622 posts
    Member since:
    Jul 2004

    Posted 18 Aug 2010 Link to this post

    Could you please send a screenshot of the unreadable code snippet, because right
    > now I am unable to find such content in the provided forum?
    The attached screenshot is what I see when I look at the code posted as part of my message dated Aug 13, 2010.

    I note from your video that you see the same as me and am a little surprised you don't regard this an unreadable. The code block has a horizontal scroll bar but wraps the pasted text (sometimes, see the post referenced above, find the line beginning 

    $telerik.$(menu.findItemByValue("Empty"

    for an example of where it hasn't wrapped). I know that in the past if I'd posted an code example like this, the linefeeds in my code would have been preserved, there would have been no additional wrapping and the code block container would have required me to scroll to see the long lines.

    Please, note that it is not recommended to directly copy formatted content from
    > Visual Studio in the Format Block "Paste source code below" area, because this
    > could cause formatting side effects
    I'd be interested to know why and what has changed to make this the case now. I've been posting in here for a number of years and have only recently seen this behaviour on the part of the editor.

    My advise is to paste the VS content in Notepad and after that in the Format Code Block dialog.
    Hardly friendly, but I will be guided by you on this.

    -- 
    Stuart
  4. Stuart Hemming
    Stuart Hemming avatar
    1622 posts
    Member since:
    Jul 2004

    Posted 23 Aug 2010 Link to this post

    Rumen,

    You said ...

    Please, note that it is not recommended to directly copy formatted content from Visual Studio in the Format Block "Paste source code below" area, because this could cause formatting side effects. My advise is to paste the VS content in Notepad and after that in the Format Code Block dialog.

    Following your advice, when creating this new forum thread I copied the code, both the markup and the code-behind in to a text editor then copied from there in to the RadEditor and I still ended up with the dreadful mess that you see there.

    Is this really what you expect the result to look like?

    -- 
    Stuart
  5. Raya
    Admin
    Raya avatar
    27 posts

    Posted 26 Aug 2010 Link to this post

    Hello Stuart Hemming,

    We implemented а fix that will be on live telerik.com in the end of the next week.
    I've attached for you a screenshot to see how your code block will look like.
     
    Hope you like the final result.

    All the best,
    Raya
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  6. Stuart Hemming
    Stuart Hemming avatar
    1622 posts
    Member since:
    Jul 2004

    Posted 26 Aug 2010 Link to this post

    Raya,

    I look forward to seeing the changes in action.

    -- 
    Stuart
Back to Top