Questions tagged [textselection]

In User Interface Design, text selection is the method of handpicking a portion of text, most commonly for the purpose of copying/cutting/pasting.

In User Interface Design, text selection is the method of handpicking a portion of text that will be further acted upon by the user. The selection is done by the interaction devices provided by the user interface.

Text selection is most commonly associated with the user actions of copying, cutting, and pasting. In Graphical User Interface, text selection is performed by a mouse or touch represented as cursors.

459 questions
1
vote
1 answer

Exclude element from copied text in Safari

I want users to be able to copy-paste a block of text without also getting inline controls, like buttons. In Chrome, applying user-select: none; to the controls accomplishes this. If the user selects the whole paragraph, the buttons are excluded…
twhb
  • 4,294
  • 2
  • 20
  • 23
1
vote
1 answer

Text Selector Cursor is Not disapeared After Switching the Fragments

I am building a android app in which there is a screen in which there are two tabs in form of fragment fragments are basically used for language translation. The problem is when i input something inside the the edit text of Multi Fragment and try to…
1
vote
0 answers

Multi caret insert/edit of selection in VS Code

I want to refactor some code which consists of repeating values using vs code. I am aware of { "key": "ctrl+d", "command": "editor.action.addSelectionToNextFindMatch", "when": "editorFocus" } which inserts more cursors one by one after each…
1
vote
0 answers

Font Family and Font Size Combo Box Coding Bugs

it's been a while since I posted. Haven't had much time for programming for a while. Just got back into it a couple of days ago. I'm working on a personal project which is a kind of Project Manager with a fairly complete text editor. I am working…
1
vote
2 answers

Why getting a text selection from textarea works when a button clicked but not when a "div" clicked (in Internet Explorer)

Consider the following code: (Live demo here - Open in Internet Explorer 7 or 9) HTML:
But clicking here not :(
JS: …
Misha Moroshko
  • 166,356
  • 226
  • 505
  • 746
1
vote
1 answer

Get position from selected text in source HTML

How to get position from selected text in HTML? the HTML content is rendered by setting innerHTML. For example 1.   2 is rendered 1. 2 The use is then selecting 2 with text selector. const start =…
Juri
  • 1,531
  • 2
  • 20
  • 43
1
vote
0 answers

Textmate: Increase / Decrease The Selection?

Does anyone know of a bundle/plugin/keyboard command to increase the scope of selected text? Intellij (and I think Eclipse) allow you to increase the scope of your selection. Intellij will do this if you place the cursor on a method name, for…
John Gordon
  • 2,181
  • 5
  • 28
  • 47
1
vote
1 answer

How to find out if a selected text is surrounded by an html element of not

I am implementing a simple text editor with content editable div and a two buttons, one for bold text and one for italic. The way I am making a text bold or italic is by inserting a span around the selected text with class text-bold and text-italic,…
BlackMath
  • 932
  • 7
  • 24
1
vote
0 answers

Disable React Native Webview text selection loupe on iPad

Setup: Our RN (0.61.5) app is using react-native webview@8.0.6 to display content and interact with the user. The app includes some text input fields, swipe guestures, buttons, longpress actions. As of iPad os 15.1 a text selection magnifier has…
1
vote
1 answer

Command to select to beginning or end of code block/paragraph in VSCode

So I found this issue on GitHub which discusses cursor navigation by code block/paragraph. Is there a related functionality to simultaneously select from the current cursor position to the end or beginning of the next block as well?
Ben Francis
  • 83
  • 1
  • 7
1
vote
1 answer

SelectableText.rich background color of selection, not of TextStyle

I'd like for the TextSpans in my SelectableText.rich to have the normal, blueish color when selected despite having a backgroundColor specified in their TextStyle. How can I do that ? Here's some bad code for reproducibility : import…
ouai
  • 150
  • 1
  • 10
1
vote
1 answer

CSS Make user text selection vertically in table

I want to create a table, but I want the user to be able to select the columns first and then the second column and so on (instead of the way of selecting the rows first). First Second This is the first message This is the second…
QuickWrite
  • 13
  • 4
1
vote
2 answers

HTML – Selecting multiple text in multiple frames

Is it possible to instruct HTML / CSS to maintain selections separate in separate frames (or iframes, divs, or anything)? I would need to separate the text selection mechanism in different frames. So, when I select a text in the first frame, then in…
Binyomin
  • 111
  • 4
1
vote
1 answer

What can I use to reliably get a character offset of a click in Javascript using multiple nodes of text?

I'm using Window.getSelection to get the character offset of where a user clicks, when that user clicks on some text. This works great when there is a single text node, and there are a lot of great answers on SO about how to do so. However, I'm…
1
vote
1 answer

Grabbing the CSS of an HTML text selection using JS

I am creating a text editor using HTML, CSS, and JS. I've got most of the functions worked out, and even though it is deprecated, I've been using document.execCommand() to stylize text content in a contenteditable div. I have a hotbar at the top of…
TimTam
  • 63
  • 1
  • 8