문제

I have a form in Arabic language in which I am using CLEditor for text area.Editor works fine but earlier I have used a JavaScript function to change the text direction of textarea from right to left as the form was in Arabic. The JavaScript function used is

function rtl(element)
        {   
            if(element.setSelectionRange){
                element.setSelectionRange(0,0);
            }
        }
 <textarea name="test" id="test"   onkeyup="rtl(this);"></textarea>

How to make the JavaScript function work on cleditor? Is it possible?

도움이 되었습니까?

해결책

I think you would just need to add the following to change the text direction in cleditor.

$("#test").cleditor({
                      bodyStyle: "direction:rtl"
                    });
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top