Aug 21, 2014, 4:50 PM
[CLOSED] Textarea's text selection is not retaining
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,
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,
Last edited by Daniil; Sep 02, 2014 at 1:07 PM.
Reason: [CLOSED]