I have the following code
$('#txtEditor').select(function (e) {
var start = e.target.selectionStart;
var end = e.target.selectionEnd;
selText = $('#txtEditor').val().substring(start, end);
});
<asp:TextBox ID="txtEditor" runat="server" TextMode="MultiLine" Width="500px" Height="500px" Font-Size="Large"></asp:TextBox>
I want to apply some style (colour it or make it bold or ittallic etc) only to the selected text (after selection) in the textbox. In selText
Im getting the selected string. But I couldn't find any event or function which will apply style only to the selected string in the textbox.