textselection

Android Text Selection Terminology

走远了吗. 提交于 2019-12-01 11:36:24
How are the two "trapezoids" that appear during text selection (in the emulator) called? Where can I find more information about how to control them programmatically? For further clarity, I am attaching a snapshot where you can see the left & right "text-selection trapezoids": We just call them cursor controllers, or handles. Lokesh to be precise .. In android terminology it is "SelectionModifierCursorController" CJBS It would appear based on the name of the images used to display these handles that they're called Text Select Handles, of which there's a Left Text Select Handle; Right Text

Android Text Selection Terminology

北城以北 提交于 2019-12-01 09:19:54
问题 How are the two "trapezoids" that appear during text selection (in the emulator) called? Where can I find more information about how to control them programmatically? For further clarity, I am attaching a snapshot where you can see the left & right "text-selection trapezoids": 回答1: We just call them cursor controllers, or handles. 回答2: to be precise .. In android terminology it is "SelectionModifierCursorController" 回答3: It would appear based on the name of the images used to display these

Prevent element from taking part in text selection

女生的网名这么多〃 提交于 2019-12-01 06:09:38
I have some source code in a <pre><code> with line numbers in a separate <div> . When the text is selected, the line numbers come with it, and are subsequently copied. Is there any way to prevent the line numbers from being a part of the selection, even if I select the elements above and below the source code block? I'd like to avoid JavaScript for the benefit of people who browse with it off. (With JavaScript, I'd add a button to hide the line numbers). unselectable="on" and the various vendor-specific user-select CSS properties did not work; the numbers are still selected and copied. Give

Capture text selection in Google Docs

不问归期 提交于 2019-11-30 22:32:33
问题 I'm writing a Chrome extension that captures the user text selection and sends the selected text to Google search. manifest.json { "manifest_version": 2, "name": "Selection Extension", "description": "Search your selected text", "version": "1.0", "permissions": [ "tabs", "http://*/*", "https://*/*" ], "background": { "scripts": [ "background.js" ], "persistent": false }, "browser_action": { "default_icon": "icon.png", "default_title": "Mark it!!" }, "content_scripts": [ { "matches": ["<all

Change text selection highlight with JS

删除回忆录丶 提交于 2019-11-30 21:01:21
For standard browsers you can use something like this to change the coloring of selected text: div.txtArea::selection { background: transparent; } div.txtArea::-moz-selection { background: transparent; } div.txtArea::-webkit-selection { background: transparent; } But I need to do this with JavaScript instead. My users can select text and then change the color. While they are selecting another color it updates the color constantly. Since the text is selected they can't see what the color looks like. I need to change the selection style of my targeted element to be transparent only during

Change text selection highlight with JS

有些话、适合烂在心里 提交于 2019-11-30 17:11:13
问题 For standard browsers you can use something like this to change the coloring of selected text: div.txtArea::selection { background: transparent; } div.txtArea::-moz-selection { background: transparent; } div.txtArea::-webkit-selection { background: transparent; } But I need to do this with JavaScript instead. My users can select text and then change the color. While they are selecting another color it updates the color constantly. Since the text is selected they can't see what the color looks

Android Text Selection Listener

白昼怎懂夜的黑 提交于 2019-11-30 07:15:27
I'm trying to create a graceful, distraction-free text editor. One of the features I really would like to implement is a pop-up with simple text formatting commands, such as bold, italic, underline, font color, and font face. To give you an idea, here is a picture of the popup in iOS(Obviously, this is just the idea. I want to create a custom design for the popup): I have a few questions: 1) Is there such thing as a text selection listener, or some equivalent? 2) Will I need to override the default android action for text selection? 3) How would I display/create this popup? (Vague question, I

Android 3.x ONLY WebView Text Selection + JavaScript

夙愿已清 提交于 2019-11-30 03:54:46
Problem domain: Android WebView based ePub format reader -- We need text highlights which are accessible via JavaScript methods (ie turn em on, turn em off, save them email them, etc) Anyone in the know, please correct me if I'm wrong: During text selection on a WebView -- Basically we are handed a TextView overlay (WebTextView) which is IN NO WAY attached to the underlying html other than visually (nice job on lining it all up and making it seamless, btw), on which we perform the TextSelectionActionMode and the ClipboardManager is supplied with the results... to make that clear, the actual

IntelliJ Column Selection using Cursor Keys

假装没事ソ 提交于 2019-11-29 20:32:27
Is it possible to some how setup IntelliJ IDEA so that I can column select with the cursor keys similarly to how I might in Notepad++, Visual Studio, or FlashDevelop. For instance when I'm typing code I almost always do my navigation solely through use of the keyboard. In the IDEs mentioned previously I can quickly select blocks of code by holding Shift + Alt then tapping ↑ to extend my cursor across the lines above. I can then hold Shift + Alt + Ctrl and tap ← or → to quickly jump across words and select the chunk of text I want. In IntelliJ IDEA I have to constantly enable and disable Column

How to get the selected text in textarea using jQuery in Internet Explorer 7?

廉价感情. 提交于 2019-11-29 11:41:34
I tried the jquery-fieldselection plugin to get the selected text in textarea. It works fine in Firefox and Chrome, but not in Internet Explorer 7. I use the getSelection() method like this: textarea.getSelection(); When the text within the textarea is 12345 , and all this text is selected, Firefox and Chrome returns: start: 0 // Correct! end: 5 while Internet Explorer 7 returns: start: 5 // Why ?? end: 5 I'm looking for a cross browser solution using jQuery. Baz1nga just took a look a tthelibrary and it behaves differently for IE since it does not support some methods that the modern browsers