PDA

View Full Version : [CLOSED] Textarea's text selection is not retaining



iansriley
Aug 21, 2014, 4:50 PM
Hi,

We have created a small text editor as per our requirement. In this text editor, we used html textarea control to type text. on top of this textarea, we have a ext.net combobox with list of style items like bold, italic, underline etc.,. To apply some style, we select some text in textarea and then select a style from the combobox (let's say bold style). (Note:After applying style from combobox we are resetting combobox to default item, 'Apply Style') With some javascript code we are able to modify the textarea content as <b>selected text</b> but, the selected text in textarea is loosing selection.

I need to retain the selection for the selected text (in textarea) after style has been applied. With some javascript code, I could get this selection but, after my javascript code execution finished, execution going into script manager code. After script manager code execution completed, whatever selection I retained using javascript, is no more visible. I observed this while debugging the javascript in browser.

Please suggest what I can do to retain textarea selection?

Thank you,

geoffrey.mcgill
Aug 21, 2014, 5:02 PM
Please suggest what I can do to retain textarea selection?


Unfortunately we do not have any suggestions based upon the description you provided.

Does the same problem happen if you replace the <ext:TextArea> with a standard html <textarea> element?