We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

Textarea | Forum

Mohammad Dec 23 '13
Hi guys

I want add additional js feature to textareas and that's ok,but I have problem with some of them,i.e my code is not working on textareas which have WYSIWYG editor(forums,creating group) or in newsfeed,just textarea for comments(there is no way to get my code working here,all I can find are to class"base_cmnts_temp_cont and comments_fake_autoclick invitation" but they were useless)

What I have to for get my code working?


  wysiwyg.png (2.34Kb)
  comment.png (2.76Kb)
Daisy Team
Daisy Dec 25 '13
What js features exactly are you talking about? How did you implement it to textareas without WYSIWYG?
Mohammad Dec 25 '13
Hi Daisy

Auto direction for important parts of site(I just have problem with WYSIWYG and add comment)
I make it works the ones without WYSIWYG just this simple-> $('textarea')

Actually this should work for those that have WYSIWYG but it's not working:(

it's not only the WYSIWYG textarea,I have this problem with hidden textarea which appear by clicking(like comments),I don't know how to understand if they became visible !!!

Thanks for help

The Forum post is edited by Mohammad Dec 25 '13
Mohammad Jan 6 '14
any help from Oxwall?
Mohammad Jan 13 '14


It's more than 20 days waiting for an answer from support team

Mohammad Jan 17 '14
still waiting :)
Daisy Team
Daisy Jan 17 '14
Dear Mohammad,

The standard language RTL configuration changes the text direction in the textareas, doesn't it? Why don't you use the standard software settings? What exactly you need to do, please provide me with more details or the code you are using, so we could understand how did you develop the RTL function.

Mohammad Jan 17 '14

Thanks Daisy for reply

this is my function for checking if it's Persian(or arabic)

function checkPersian( firstChar ) { 

   if( typeof this.characters == 'undefined' )   

     this.characters = ['ا','ب','پ','ت','س','ج','چ','ح','خ','د','ذ','ر','ز','ژ','س','ش','ص','ض','ط','ظ','ع','غ','ف','ق','ک','گ','ل','م','ن','و','ه','ی'];  

  return this.characters.indexOf( firstChar ) != -1;


and I have another function which get the class or id or attribute(it does not matter) and checking with checkpersian():

function checkInput(){ 

   jQuery( this ).css( 'direction', checkPersian( jQuery( this ).val().substr( 0, 1 ) ) ? 'rtl' : 'ltr' );


and this is how I call function checkInput() : 

(this will check textareas)

$('textarea').change( checkInput );

$('textarea').keydown( checkInput );

$('textarea').keyup( checkInput );

My Problem is:

1- I can't understand when comment textarea become visible(user need to click to show textarea)

2-I can not figure out WYSIWYG id or class to implement for them RTL direction  

P.S: sorry codes looks bad in here !

The Forum post is edited by Mohammad Jan 17 '14
Daisy Team
Daisy Mar 6 '14
Mohammad, sorry but we cannot understand why do you need to use custom RTL function. Doesn't the standard language RTL configuration change the text direction in the textareas? Why do you need to check whether it's the Persian language? Why don't you use the getRtl() function?

Anyway, you can see how the textarea becomes visible for Newsfeed status in the /ow_plugins/newsfeed/components/update_status.php file.
Mohammad Mar 7 '14
Quote from Daisy Doesn't the standard language RTL configuration change the text direction in the textareas?

I want to change it between RTL and LTR automatically

Quote from Daisy Why do you need to check whether it's the Persian language?

Because it's not easy to write in LTR textarea or something with RTL langauges.e.g if right now in this forum I use Persian is hard to read.if you use a number or () or etc it's impossible to read ! (FYI,I'am not just changing textareas.I change other place too but my problem is only textarea)

Quote from Daisy Why don't you use the getRtl() function?

I have no idea what that is

Quote from Daisy Anyway, you can see how the textarea becomes visible for Newsfeed status in the /ow_plugins/newsfeed/components/update_status.php file.

Thank you very much.I'll look into it

Daisy Team
Daisy Mar 10 '14
Mohammad, let me explain how I understand the problem and how our RTL function works.

You can simply change the text direction for the Persian language via Admin Area > Settings > Language > Available language. Find the Persian language >> click the Edit button and check the RTL box. Thus, the whole site text direction (including the textareas) will be changed to RTL.

In case you have several languages activated on your site, the text direction will depend on the settings of the language (see above).

As far as I've understood you have problem with the English language, i.e. when a user chooses the English and try to type something on Persian - the text direction is LTR and it becomes hard to read the text. If your site is the Persian community, the best way for you is to activate only Persian language and do not create additional functionality.

If I took you wrong, please specify why do you need to check whether it's the Persian language or not?

As for the getRtl() function - you can see the way it works in the files related to the language placed in this directiry: /ow_system_plugins/base/bol
Daniel Williams
Daniel Williams Jul 19 '22
To add extra features to textareas you need to go to extra settings on the app and enter the code HTKB. io games the impossible quiz
Naviya singh
Naviya singh Jan 17
As the top supplier of Call Girls in Mahipalpur, you can rely on us to give you with the greatest service possible. You won't have any trouble finding someone in our gallery that fits your likes because we offer a large selection of girls.