getselection
Get caret (cursor) position in contentEditable area containing HTML content
I have contentEditable element (can be p, div, ...) and I would like to get caret (cursor) position in it. I can normally achieve it with this piece of code:[详细]
2023-02-05 22:32 分类:问答nodeName for selected text in Javascript
I have HTML which looks something like this: <span id=\"text\"> <span class=\"segment\" id=\"first\">some text</span>[详细]
2023-01-17 23:31 分类:问答How to get the coordinates of the end of selected text with javascript?
My problem is similar to this, b开发者_StackOverflowut I need a way to get the coordinates of the right side of the selection with Javascript in Firefox. I made a small example to show what I mean:[详细]
2023-01-16 22:45 分类:问答Need to set cursor position to the end of a contentEditable div, issue with selection and range objects
I\'m forgetting about cross-browser compatibility for the moment, I just want this to work. What I\'m doing is trying to modify a script (and you probably don\'t need to know this) located at typegree[详细]
2023-01-01 08:35 分类:问答What is the easiest method to get the selection in input text field?
How could I get the selected text in the following code ? I working with Firefox 3.6.3 (currently not interested in other browsers).[详细]
2022-12-31 02:43 分类:问答Javascript functions return lines of function code or "{[native code]}," what am I doing wrong?
I am writing some code to find the user selection in a contenteditable div, I\'m taking my code from this quirksmode article.[详细]
2022-12-30 05:41 分类:问答Range Selection and Mozilla
I would like to specify that firefox select a range. I can do this easily with IE, using range.select();. It appears that FFX expects a dom element instead. Am I mistaken, or is there a better way to[详细]
2022-12-27 05:33 分类:问答getSelection & surroundContents across multiple tags
I\'ve got a script that changes the background colour of text that has been selected. However i\'m encountering an issue when the text is selected across multiple elements/tags.[详细]
2022-12-26 00:41 分类:问答getSelection() by Double Click or manual selection is not the same
I allow me to ask a question, because I have a little probleme with an function which returns me the parent of a selection.[详细]
2022-12-24 05:55 分类:问答getSelection() and insertNode -- Javascript Text Selection
Does anyone know how to set the browser selection to a newly / independently created range? 开发者_JS百科I understand how to get the text selection from the browser, and I understand how to create a r[详细]
2022-12-09 19:17 分类:问答
加载中,请稍侯......