Format Code Block

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

Rumen

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.

> 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 effectsI'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.

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.

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks or appropriate markings.