Formatting Text in RadControls for WinForms Q3 2009

Posted by: the telerik blogs, on 21 Oct 2009 | View original | Bookmarked: 0 time(s)

I am happy to announce a few new features coming in Q3 2009, related to text formatting. As you know, a couple of releases ago we added a feature called Html-like text formatting to our controls:

 

 src=

 

Although we supported a very limited and basic set of HTML tags, our clients were happy with having the option to format text via HTML. We received a great deal of feedback on this feature, including many requests to support more HTML tags. Q3 2009 (the beta is coming out this week), comes with support for new tags in our parsing and rendering engine. The most important additions are support for images (local or from resource), lists (bulleted and numbered) and span. We also added relative font sizes and strikethrough. Additionally we added limited support for the style attribute in the span tag, plus the following CSS properties: font-family, font-size, color, and background-color. The list of supported tags is really a small subset of html which we believe covers almost all needed scenarios.

While the previous tags were not exactly html, the new tags are a subset of html. Here is a comprehensive list (including the old tags) of the HTML tags that we now support: <html>, <font>, <color>, <size>, <b>, <strong>, <i>, <em>, <u>, <br>,  <p>, <span>, <ol>, <ul>, <li>, <strike>, <a>, <img>, all respective closing tags.

The HTML-like text formatting is available on a framework level, which means that you can format any text element in our controls. Suppose that you need to underline a specific word in a button, to make it stand out, for example Click me and keep me pressed. This can be achieved directly in the Text property of the button by using the following markup:

<html>Click me and <b>keep me pressed</b>

OR

<html>Click me and <strong>keep me pressed</strong>

So far, so good. But how do you pass this functionality to your end user? Also, how would you know whether a particular tag is supported?

This is where the biggest new feature comes in. Yes, this is a new editor (RadMarkupEditor) for formatting text:

 

 src=
 

RadMarkupEditor is a WYSIWYG editor which has been added on framework level to simplify the way users and developers edit text in HTML markup. The editor supports two views: Design and Markup. In Design view you will be able to edit your Text without writing HTML, and in Markup view you will see the generated HTML and edit it as needed.

The editor provides an intuitive and easy to use Ribbon interface and can be used both at design-time and runtime. Here is a code sample demonstrating how you can use it at Run Time:

RadMarkupDialog dialog = new RadMarkupDialog(); DialogResult result = dialog.ShowDialog();   if (result == DialogResult.OK) {     MessageBox.Show(dialog.Value); }

 

A natural question emerges from this what will happen if we copy and paste HTML content, created with RadEditor for ASP.NET? Well, the results will be mixed so we would not recommend doing this. Most of the content will show, because we use the IE engine to render the HTML. However, styling will be gone, because CSS is not supported. Also, forget about loading images located on the internet or editing these table in WYSIWYG manner.

The new HTML features will be introduced in the upcoming beta and will be officially released in Q3 2009.

Do you think the editor will be helpful in your application? Would you rather see a RTF implementation than HTML? Feel free to leave a comment here or contact us through our support system.
 

Advertisement
Free Agile Project Management Tool from Telerik
TeamPulse Community Edition helps your team effectively capture requirements, manage project plans, assign and track work, and most importantly, be continually connected with each other.
Category: ASP.NET | Other Posts: View all posts by this blogger | Report as irrelevant | View bloggers stats | Views: 1524 | Hits: 301

Similar Posts

  • Performance Gains and Enhanced HTML-like Support Brought to WinForms Applications with Q3 2009 Release more
  • Behaviors vs Subclassing in Silverlight more
  • Cascading Implicit Styles in WPF more
  • Mini-Tutorial Element Binding more
  • Introducing LINQ to M more
  • Silverlight Validation in Detail more
  • Data-binding menu, context menu and toolbar, a.k.a. a simple text editor for Silverlight more
  • Reporting Release History : Q1 2009 SP1 (version 3.0.9.430) more
  • Whats new in Aspose.Total for .NET Q1 2009? more
  • Top 5 New Features in SQL Server 2008 Reporting Services more

News Categories

.NET | Agile | Ajax | Architecture | ASP.NET | BizTalk | C# | Certification | Data | DataGrid | DataSet | Debugger | DotNetNuke | Events | GridView | IIS | Indigo | JavaScript | Mobile | Mono | Patterns and Practices | Performance | Podcast | Refactor | Regex | Security | Sharepoint | Silverlight | Smart Client Applications | Software | SQL | VB.NET | Visual Studio | W3 | WCF | WinFx | WPF | WSE | XAML | XLinq | XML | XSD