jQuery Editor: Right to Left Layout

A live JavaScript/jQuery example of jqxEditor, the jQWidgets Editor component, with its complete source code below. It is one of 14 jqxEditor demos for jQuery.

jqxEditor API used in this demo

Source code

To run it in your own page, load jqx.base.css, a theme and the library files below from npm (npm install jqwidgets-scripts) or the jsDelivr CDN, then add the markup and the script. jQuery is not required: jqxcore.js provides $. Getting started with jqxEditor shows the setup step by step.

The page loads jqx.base.css, a theme and these library files: jqxcore.js, jqxbuttons.js, jqxscrollbar.js, jqxlistbox.js, jqxdropdownlist.js, jqxdropdownbutton.js, jqxcolorpicker.js, jqxwindow.js, jqxeditor.js, jqxtooltip.js, jqxcheckbox.js.

It also loads helper scripts of this demo site, which are not part of the library: demos.js (getWidth() and other layout helpers).

script.js

$(document).ready(function () {
    $('#editor').jqxEditor({
        height: "400px",
        width: getWidth('editor'),
        rtl: true
    });
});

body.html

<textarea id="editor">        &lt;b&gt;jqxEditor&lt;/b&gt; 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. 
    &lt;br /&gt;
    &lt;br /&gt;
    Features include:
    &lt;br /&gt;
    &lt;ul&gt;
        &lt;li&gt;Text formatting&lt;/li&gt;
        &lt;li&gt;Text alignment&lt;/li&gt;
        &lt;li&gt;Hyperlink dialog&lt;/li&gt;
        &lt;li&gt;Image dialog&lt;/li&gt;
        &lt;li&gt;Bulleted list&lt;/li&gt;
        &lt;li&gt;Numbered list&lt;/li&gt;
    &lt;/ul&gt;
</textarea>

Learn more

More jQuery Editor demos