I have a textbox and a link button.  When I write some text, then select some of them and then click the link button, selected text from textbox must be show with a messagebox.   How can I do it?    When I click the submit button for textbox below,...
I need the coordinates in pixels of the beginning of the text selection (anywhere on the page, not in a textarea).  I tried using the cursor coordinates but this didn't work quite well because the cursor coordinates and the beginning of the sel...
I am trying to somewhat duplicate the "autocorrect" functionality seen in programs like Microsoft Office's Outlook.  For starters, anytime a user types "a " (the letter a and a space) at the beginning of a line I want to change th...
I have div with some text and contenteditable="true". When I single click on this div - works some my scripts, it is not very important. And when I double click on this div - need to edit text in div. Edit text need to be only after double cl...
I have some content generated by a ML model in 100s of paragraphs, each para has some highlighted content.   Sometimes, highlighted data is incorrect, we want the user to select the text and get it highlighted again to correct it.  <p> Contrary...
I have the following html:  <p>Morbi quis augue vitae quam <a href="#">pharetra| varius</a> at at| urna.</p>   The selection is marked with | characters. Also a screenshot of the selection:    I can extend this selecti...
When implementing a rich text editor in javascript, I need to apply some changes to every text node in selected range. Range object provides interface to get startContainer, endContainer, startOffset, endOffset for the selected range. How can I itera...
I'm looking for a way to track the text selection on a web page. I need some code to be executed whenever there is a change in selection. I have successfully done this on all major desktop browsers, but the same does not seem to be working on Fir...
I need the ability to select a range of HTML by giving it an ID selector. What I have below works great in Chrome and Firefox, but not in IE 10 (standard mode). (older version of IE are not a concern for this)  function selectElementContents(elementI...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.