Sam San
Sam San

Reputation: 6903

openWYSIWYG disabled textarea

Is there anyone here uses openWYSIWYG 1.4.7?

I wanted to display only my textarea by calling

WYSIWYG.display('textarea1');   

And I want the text on my textarea not to be selectable that's why I tried this

<textarea1 id=textarea1 name='test1' disabled  ></textarea>

but it doesn't work.

Any suggestion?

Upvotes: 1

Views: 164

Answers (2)

Anand
Anand

Reputation: 10100

Please keep in mind that any such protection(including the one above) should be not used as a security option. User can always find a way to go select the text or even edit it before submitting it.. they can use web developer plugins like Firebug to do the trick.

Even HTTPS cant prevent this, when the user is itself doing the trick in his browser. You do your validation in server side, if applicable.

Upvotes: 0

Anand
Anand

Reputation: 10100

I doubt if you can prevent selecting the text in text area directly. You can try placing an element like iframe on top of with with higher Z-index.. so when the user selects what they see as a test area, he will actually be interacting with transparent iframe.

Upvotes: 1

Related Questions