Telerik is a leading vendor of ASP.NET AJAX, ASP.NET MVC, Silverlight, WinForms and WPF controls and components, as well as .NET Reporting, .NET ORM , .NET CMS, Code Analysis, Mocking, Team Productivity and Automated Testing Tools. Building on its expertise in interface development and Microsoft technologies, Telerik helps customers build applications with unparalleled richness, responsiveness and interactivity. Telerik products help thousands of companies to be more productive and deliver reliable applications under budget and on time.
Version Q2 2011 released 07/12/2011
select

Editor / Right-to-left Support


  • Right-to-Left support


    The RadEditor supports right-to-left (RTL) language locales. In order to configure the RadEditor in RTL mode you should go through the following steps:

    1. RTL support for RadEditor:

    - register the Editor_RTL.css file in the <head></head> section of your webpage, i.e:

    - <link rel="stylesheet" type="text/css" href="./RTL/Editor_RTL.css" />

    2. RTL for RadEditor dialogs:

    - Use the DialogsCssFile property to include the RadEditor_Dialogs_RTL.css file in the dialogs of RadEditor:

    - <telerik:RadEditor DialogsCssFile="./RTL/RadEditor_Dialogs_RTL.css"></telerik:RadEditor>

    3. RTL for the content area of RadEditor:

    - Use the ContentAreaCssFile property of RadEditor to include the EditorContentArea_RTL.css file:

    - <telerik:RadEditor runat="server" ID="RadEditor1" SkinID="DefaultSetOfTools" Height="350px" DialogsCssFile="./RTL/RadEditor_Dialogs_RTL.css" ContentAreaCssFile="./RTL/EditorContentArea_RTL.css"></telerik:RadEditor>

Source Code

C# VB.NET
Show code in new window Demo isolation steps
  • <%@ Page Language="C#" %>
    <%@ Register TagPrefix="qsf" Namespace="Telerik.QuickStart" %>
    <%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <link rel="stylesheet" type="text/css" href="RTL/Editor_RTL.css" />
        <style type="text/css">
        html
        {
          direction: rtl;
        }
        html, body, form
        {
          height: 100%;
          margin: 0px;
          padding: 0px;
          overflow: hidden;
        }
        /*info panel*/

    .infoPanel,
    .bigModule
    {
        border:1px solid #ffe58a;
        margin:1.6em 0;
        padding:1em 3em 1em 0;
        background:#fff3c8 repeat-x url(../../../Common/styles09/infoPanel.gif);
        color:#000;
    }

    .infoInner,
    .bigModuleBottom
    {
        min-height:30px;
        padding:0 0 0 66px;
        background:no-repeat -1184px -1447px url(../../../Common/styles09/sprite09.gif);
    }

    .infoPanel .title,
    .bigModule .title
    {
        display:block;
        margin:0 0 1.4em;
        padding:6px 0 0;
        font-size:1.2em;
    }

    .infoPanel a,
    .bigModule a
    {
        color:#f60;
    }
        </style>

        <script runat="server">

            protected void Page_Load(object sender, EventArgs e)
            {
                if (!this.IsPostBack)
                {
                    RadEditor1.Content = GetLanguage(RadioButtonList1.SelectedValue);
                }
            }

            protected void RadioButtonList1_SelectedIndexChanged(object sender, EventArgs e)
            {
                RadioButtonList radiolist = sender as RadioButtonList;
                RadEditor1.Content = GetLanguage(radiolist.SelectedValue);
            }

            private string GetLanguage(string selectedLanguage)
            {
                System.Xml.XmlDocument languageFile = new System.Xml.XmlDocument();
                languageFile.Load(Server.MapPath("Languages.xml"));
                // Get root element ;
                System.Xml.XmlElement languages = languageFile.DocumentElement;
                System.Xml.XmlNode selectedLangNode = languages.SelectSingleNode(selectedLanguage);

                string text = selectedLangNode.InnerXml;
                return text;
            }
        </script>

    </head>
    <body>
        <form id="form1" runat="server">
            <telerik:RadScriptManager ID="ScriptManager1" runat="server" />
            <div>
                <br />
                <br />
                <br />
                <telerik:RadSkinManager Skin="Web20" runat="server" ID="RadSkinManager1" />
                <telerik:RadFormDecorator runat="server" ID="RadFormDecorator1" />
                
                    
                 <telerik:RadAjaxPanel runat="server" ID="RadAjaxPanel1">


                            <qsf:InformationBox ID="InformationBox1" runat="server">

    <asp:RadioButtonList ID="RadioButtonList1" runat="server" CellSpacing="10" RepeatDirection="Horizontal"
    AutoPostBack="true" OnSelectedIndexChanged="RadioButtonList1_SelectedIndexChanged">

                                    <asp:ListItem Text="Latin" Value="Latin" Selected="True"></asp:ListItem>
                                    <asp:ListItem Text="Arabic" Value="Arabic"></asp:ListItem>
                                    <asp:ListItem Text="Farsi" Value="Farsi"></asp:ListItem>
                                    <asp:ListItem Text="Hebrew" Value="Hebrew"></asp:ListItem>
                                </asp:RadioButtonList>
                                
                            </qsf:InformationBox>
                            
                            <telerik:RadEditor runat="server" ID="RadEditor1" Height="350px"
                                DialogsCssFile="./RTL/RadEditor_Dialogs_RTL.css" ContentAreaCssFile="./RTL/EditorContentArea_RTL.css">
                                <Modules>
         <telerik:EditorModule Visible="false" />
                                </Modules>
                            </telerik:RadEditor>
                 </telerik:RadAjaxPanel>
            
            </div>
        </form>
    </body>
    </html>

Get more than expected!

 
 

Take your time to truly experience the power of RadControls for ASP.NET AJAX with a free 60-day trial backed up by Telerik’s unlimited dedicated support.

Download your RadControls for ASP.NET AJAX trial and jumpstart your development with the available Getting Started resources.

If you have any questions, do not hesitate to contact us at sales@telerik.com.

Copyright 2002-2024 © Telerik. All right reserved
Telerik Inc, 201 Jones Rd, Waltham, MA 02451