Is there a way to save the changes like changing the background of HTML text that span over multiple tags so that when it is loaded again the changes made should be reflected in the HTML page.  EDIT: Detailed explanation.  When the HTML page is loa...
In JavaScript, it's possible to programmatically select text in an input or textarea element. You can focus an input with ipt.focus(), and then select its contents with ipt.select(). You can even select a specific range with ipt.setSelectionRan...
When double-clicking on a html page most browsers select the word you double-click on (or the paragraph you triple-click on). Is there a way to get rid of this behavior?  Note that I do not want to disable regular selection via single-click+dragging;...
In JavaScript, there is a method window.getSelection(), that lets me get the current selection that the user has made.  Is there a corresponding function, something like window.setSelection(), that will let me set, or clear, the current selection?...
I am trying to fix an application in IE11 and I stuck in this bug:  In the older version of IE ther was a simple selection object but it is deprecated in IE11. The MSDN page offer to use getSelection instead of that, but it is not the same. I need to...
When the user finishes to type in a URL in a contenteditable div, I want to autolink it, like Medium does: ).  I'm wondering how it is possible to achieve that using selection/range (I do not need to support IE, only modern versions of Chrome, Fi...
Update  I recently discovered you can programatically create selections with Chrome which aren't continuous, by either replacing elements / textnodes inbetween in the parts you want unselected or hiding and then showing them.   Example of non-con...
I am trying to find the textual start and end of the selection.  So, in the following text, if I selected "world! What a fine" from within "Hello, world! What a fine day it is!", I should get 7 as the start coordinate, and 24 as the e...
I wrote a code to detect the end of selection using javascript, and to place a marker at the end position. See this jsfiddle: http://jsfiddle.net/vCwwN/  The above code do the following:   It handles all LTR scripts (e.g. English) properly (showing m...
I am working on a website where I would like to be able to display a box containing syntax-highlighted source code for the user to copy. When I click on the box, giving it focus (Chrome shows its focus outline), and type Ctrl+A, the text of the entir...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.