jQWidgets Forums

jQuery UI Widgets Forums Editors Editor Right to left text in jqxEditor

This topic contains 1 reply, has 2 voices, and was last updated by  Nadezhda 10 years, 7 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • Right to left text in jqxEditor #61727

    zarinfam
    Participant

    I need Right to left text in jqxEditor, some tools that make all text rtl or ltr. something like this link.

    Right to left text in jqxEditor #61874

    Nadezhda
    Participant

    Hello zarinfam,

    Here is an example which shows how to make the whole text in jqxEditor to Right to Left direction.

    HTML:

    <!DOCTYPE html>
    <html lang="en">
    <head>
        <title id='Description'>This example illustrates how to load external stylesheet into the jqxEditor.</title>
        <link rel="stylesheet" href="../../jqwidgets/styles/jqx.base.css" type="text/css" />
        <script type="text/javascript" src="../../scripts/jquery-1.11.1.min.js"></script>
        <script type="text/javascript" src="../../scripts/demos.js"></script>
        <script type="text/javascript" src="../../jqwidgets/jqxcore.js"></script>
        <script type="text/javascript" src="../../jqwidgets/jqxbuttons.js"></script>
        <script type="text/javascript" src="../../jqwidgets/jqxscrollbar.js"></script>
        <script type="text/javascript" src="../../jqwidgets/jqxlistbox.js"></script>
        <script type="text/javascript" src="../../jqwidgets/jqxdropdownlist.js"></script>
        <script type="text/javascript" src="../../jqwidgets/jqxdropdownbutton.js"></script>
        <script type="text/javascript" src="../../jqwidgets/jqxcolorpicker.js"></script>
        <script type="text/javascript" src="../../jqwidgets/jqxwindow.js"></script>
        <script type="text/javascript" src="../../jqwidgets/jqxeditor.js"></script>
        <script type="text/javascript" src="../../jqwidgets/jqxtooltip.js"></script>
        <script type="text/javascript" src="../../jqwidgets/jqxcheckbox.js"></script>
        <style>
            .rtl{direction:rtl;float:right;font-size:17px;}
            .ltr{direction:ltr;float:left;font-size:17px;}
        </style>
         <script type="text/javascript">
             $(document).ready(function () {
                 $('#editor').jqxEditor({
                     height: "400px",
                     width: '800px',
                     rtl:true,
                     stylesheets: ['editor.css']                
                 });
             });
        </script>
    </head>
    <body>   
        <textarea id="editor">
            <b>jqxEditor</b> is a HTML text editor designed to simplify web content creation. You can use it as a replacement of your Textarea or you can create it from a DIV element. 
            <br />
            <br />
            Features include:
            <br />
            <ul>
                <li>Text formatting</li>
                <li>Text alignment</li>
                <li>Hyperlink dialog</li>
                <li>Image dialog</li>
                <li>Bulleted list</li>
                <li>Numbered list</li>
            </ul>
        </textarea>
    </body>
    </html>

    editor.css:

    html, body {
      font-family: HelveticaNeue-Light, Helvetica Neue Light, Helvetica Neue, Helvetica !important;
      font-size: 12px !important;
    }
    div{
        direction:rtl;
    }

    Best Regards,
    Nadezhda

    jQWidgets team
    http://www.jqwidgets.com/

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.