Feature #11784
closed
{direction:rtl} doesn't work in text formatting
Added by Mahmood Jalilnejad about 12 years ago.
Updated almost 10 years ago.
Description
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
+1. I'd be happy to see this implemented. RTL is very basic these days... . Thanks.
- Status changed from New to Closed
- Resolution set to Duplicate
Temporary fix for persian users which converts the whole wiki paragraph to RTL (once detects persian/arabic content):
<script>
$(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");
break;
}
}
});
$.each($(".issue .subject a"), function(i,v){
var txt = $(v).text();
console.log(txt);
for(ci in txt) {
if (txt.charCodeAt(ci) > 0x600 && txt.charCodeAt(ci) < 0x700) {
$(v).parent().css("direction", "rtl");
$(v).parent().css("text-align", "right");
break;
}
}
});
});
</script>
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