|
Article relates to
|
RadEditor for ASP.NET AJAX
Telerik.Web.UI.dll
|
|
Created by
|
Rumen Zhekov
|
HOW-TO
Provide support for iPhone / iPad browser.
DESCRIPTION
Safari for iPhone / iPad still does not offer a Rich Text Editing engine that the web WYSIWYG editors use to provide the ability to edit and format rich text content. The code solution below demonstrates how to replace the editor with a standard TextBox control when the page is browsed from an iPhone.
SOLUTION
Put RadEditor and a textbox on the page (the textbox should be
hidden by default):
Here is a sample page that sets and gets the content in the editor or textbox depending on what the browser is (iPhone or other):
The above code checks whether an iPhone is used on the first request and hides/shows the appropriate control. It also abstracts the editor content in a separate property (EditorContent) so you can use it anywhere on the page and have only one check for the browser/device.
Please
Sign In
to rate this article.