You are not logged in.
Hi,
First of all I am totally non-technical person.
I am using Xinha Editor in Joomla based Website. This website is in Urdu Language (a language spoken in India and Pakistan)
Now I need Xinha Editor to be "RTL" and aligned to "Right" by default.
I found the following answer to this Question in Tickets:
http://trac.xinha.org/ticket/510
There are only few Instructions written there, which could be very EASY, but while I have absolutely no idea of these things, therefore I need a little help.
1st: In above ticket, it is written that I have to add the following code:
xinha_config.pageStyle = "body{ direction: rtl; }";
But please be kind enough and tell me in which File I have to add this code (There are many files in Folder of Xinha which I downloaded as plugin for Joomla)
2nd: The it is written to change the the following:
el.style.direction = "ltr";
In which file I have to change it?
3rd: And there is also a uploaded file there named "tst.html". What I have to do with it? Should I upload it on the server?
Please help.
*********************
Moreover, I want to change the Default font of Editor and change it to Urdu Language Font. How could it be done?
Thanks and Regards
Last edited by zaidi (2009-06-27 06:03:45)
Offline
Hi zaidi,
1. For RTL:
See the 'examples\testbed.html' in the Xinha downloaded package. There, you can see some 'xinha_config.' parts (like 'xinha_config.fullPage = true;')... these are for the sake of editor configuration. Then you konw what to do now... if no! I tell you: add 'xinha_config.pageStyle = "body{ direction: rtl; }";' just behind those other config sentences. It's an example file, and you should add it to your own.
On another thing useful to mention! : if you set 'xinha_config.fullPage' to 'false' then you get the contents of the editor without a 'body' section. Consequently the 'xinha_config.pageStyle = "body{ direction: rtl; }";' sentence won't work man! since there is no 'body' to style that! and we don't have any other surrounding tag... but you can use this one : 'xinha_config.pageStyle = "*{ direction: rtl; }";' it'll apply the style to all of elements. The second way (* instead of 'body') will work all the time (with or without a body or another element).
2. Change the default font:
Very easy: set another style: 'xinha_config.pageStyle = "body { direction: rtl; font-family: Tahoma, Arial;}";' the rtl part is the same, but the new part (that sets the default font) tells: set the font family to 'Tahoma' and if not available to the 'Arial'.
NOTE for 1 & 2:
For both two scenarios (RTL and Font), you are ONLY changing the editor's STYLE, and if you show the returned content from the editor in a style other than editor's one (for example: in a ltr or in another font) you get another appearance! the solution is to set your default font or direction the same, where you want to get the same(appearance)!
If the user change the font or direction for a specific part of the content, it'll be appear the same anywhere with any style applied.
[url=http://www.mybbhelp.ir]Persian MyBB Help & Support[/url]
[url=http://www.iranian-forum.com/forumdisplay.php?f=149]Download Games (PC - Sega - S-Nintendo -Atari)[/url]
[url=http://www.iranian-forum.com/showthread.php?t=9536]Learning C++ (Farsi)[/url]
Offline