Feature #11784

{direction:rtl} doesn't work in text formatting

Added by Mahmood Jalilnejad over 5 years ago. Updated about 3 years ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:-% Done:


Target version:-


I need to write wiki/issue text in Right-to-Left languages
searching issue list , I found that "{background:color}" is added 7 months ago (revision r8860 , feature #2416)
Now , I need it to write {direction:rtl;text-align:right} or p{direction:rtl}>. like what is possible in the Qt Wiki Textile format

I am not an RoR developer, otherwise I might fix it myself

Related issues

Duplicates Redmine - Feature #8121: Allow overriding direction of part of text Closed 2011-04-10


#1 Updated by Boaz Rymland almost 5 years ago

+1. I'd be happy to see this implemented. RTL is very basic these days... . Thanks.

#2 Updated by Toshi MARUYAMA almost 5 years ago

  • Status changed from New to Closed
  • Resolution set to Duplicate

Duplicate with #8121.

#3 Updated by Ali Nadalizadeh about 3 years ago

Temporary fix for persian users which converts the whole wiki paragraph to RTL (once detects persian/arabic content):

$(document).ready(function() {

$.each($(".wiki, .wiki-edit"), function(i,v){
    var txt = $(v).text();
    for(ci in txt) {
        if (txt.charCodeAt(ci) > 0x600 && txt.charCodeAt(ci) < 0x700) {
            $(v).css("direction", "rtl");

$.each($(".issue .subject a"), function(i,v){
    var txt = $(v).text();
    for(ci in txt) {
        if (txt.charCodeAt(ci) > 0x600 && txt.charCodeAt(ci) < 0x700) {
            $(v).parent().css("direction", "rtl");
            $(v).parent().css("text-align", "right");


Append the code above to the main layout file (app/views/layouts/base.html.erb) or any other javascript file which is included in all pages.

Also available in: Atom PDF