Question

How can i set text direction [rtl] on load editor.

Can any one helper me in this regards.

Was it helpful?

Solution

According to the docs, this should do it:

CKEDITOR.config.contentsLangDirection in the CKSource manual

Example taken from there:

config.contentsLangDirection = 'rtl';

OTHER TIPS

Another way to do it is directly from your view file, the benefit of using replace() method is that you can use different direction and style for each of your view.

CKEDITOR.replace( 'article_area', {
    contentsLangDirection: 'rtl'
} );

By using replace() you can also do other filtering stuff like allowing/disallowing tags and removing buttons from the editor. for a detailed description visit:

http://ckeditor.com/ckeditor_4.1rc/samples/datafiltering.html

just change the ContentsLangDirection="Rtl" inside the CkEditor like below

<CKEditor:CKEditorControl ID="CKEdMainPageDescriptionWebsiteMobileappAr" BasePath="ckeditor/" runat="server" Width="100%" Toolbar="Basic"  ContentsLangDirection="Rtl"
                                        ToolbarBasic="|Bold|Italic|Underline|Strike|-|NumberedList|BulletedList|Outdent|Indent|-|JustifyLeft|JustifyCenter|JustifyRight|JustifyBlock|
                                            |Styles|-|Format|-|Font|-|FontSize|
                                          /
                                        |Link|Unlink|-|TextColor|-|Undo|Redo|Cut|Copy|Paste|PasteText|PasteFromWord|"> </CKEditor:CKEditorControl>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top