I need a textarea control with mask able property, if the textarea is mask able then the text should appear as stars instead of actual text.
I can have any no of textareas in my form, So i can't save actual text in other variable and save the stars or dots for actual textarea.
Can somebody help me to solve this issue?
As others have already pointed out, it's not possible and should not be done. But here is something which you should give a try. If you really want to achieve it, you'll have to compromise on something. Use
contenteditable
div instead of input and use following CSS:Demo: http://jsfiddle.net/GCu2D/793/
CSS:
HTML:
Obviously, this is not a perfect solution, but you can start from here.
Note: You will need to adjust the font-size and the image used. Both dimensions needs to be in sync. Ofcourse you can change the size of image using
background-size
. Border here is just for visual feedback. If you need to adjust the width of the stars, then you may usecalc()
and play around with the exact dimension.