textarea

insert at cursor in react

↘锁芯ラ 提交于 2019-12-05 08:55:01
I need to insert text at caret (current cursor position) in the React -controlled textarea (like autocomplete). For vanilla textarea I used this code: insertAtCursor: function (myField, myValue) { // IE if (document.selection) { myField.focus(); var sel = document.selection.createRange(); sel.text = myValue; } // FF else if (myField.selectionStart || myField.selectionStart == '0') { var startPos = myField.selectionStart; var endPos = myField.selectionEnd; myField.value = myField.value.substring(0, startPos) + myValue + myField.value.substring(endPos, myField.value.length); } else { myField

jQuery Mobile Responsive Panel and Textarea

北城余情 提交于 2019-12-05 08:46:09
I've got jQuery Mobile application http://gudulin.ru/test/problem.html . Left panel opens after page loads: $('#my-panel').panel("open"); I added a class ui-responsive-panel to my page and @media css stuff, so I can work with panel and page content together. Everything is OK on laptops browser, but there is a problem on iPad browser (Safari or whatever else). When left panel is opened and I'm starting type text into text area, a page jumps after typing any symbol. The problem comes when you start typing at the bottom of textarea (when text goes down the keyboard). If you didn't get what I mean

How to remove dots present at the right bottom-corner of the textarea ? HTML

风流意气都作罢 提交于 2019-12-05 08:21:07
问题 I'm trying to remove dots in a textarea which are present at the bottom-right corner. Here's an example of what I mean (from Chrome): How to remove those diagonal lines? 回答1: Just add in your CSS file textarea {resize: none} 回答2: html sass textarea { position: relative; z-index: 1; min-width: 1141px; min-height: 58px; } .resizer { position: relative; display: inline-block; &:after { content: ""; border-top: 8px solid #1c87c7; border-left: 8px solid transparent; border-right: 8px solid

How do I stop a textarea from scrolling to the top whenever I change its value

妖精的绣舞 提交于 2019-12-05 08:15:08
I'm making something where a textarea gets more and more text appended. In firefox, the textarea scroll back up to the top each time. I currently have something like textarea.scrollTop=1000000; to scroll it back down each time it changes, but it still goes up to the top for a very short time. Is there any way to stop it doing so? I ran into this problem, too. It happens in IE and Firefox but not Opera and Chrome. I thought of hiding the momentary jumps to the top by " double-buffering " changes to the textarea: Create two textareas with the exact same properties and dimensions. Only one of

Javafx fxml file TextArea line break and tab in text

陌路散爱 提交于 2019-12-05 08:10:50
How to edit text in the TextArea in `.fxml file as such I can use line breaks and tabs . The Textarea is predefined and can not be edited. Images to support FXML File The View If you want to directly use the text you can use something : <TextArea prefHeight="200.0" prefWidth="200.0" text="${'Multi\nLine\tTab'}" /> In case you want to use in Scene Builder, you can switch to multi-line mode. Switching to multi-line mode, scene builder will insert: &#10; for \n &#9; for \t 来源: https://stackoverflow.com/questions/28093508/javafx-fxml-file-textarea-line-break-and-tab-in-text

How to simulate Chrome/Safari border around active input or textarea on other elements such as divs or iframes?

孤街浪徒 提交于 2019-12-05 07:53:06
I was using simple textarea element and then replaced it with iframe with designMode='on' to give user the possibility to mark some text and make it italic. But I still want an iframe to look like textarea, so I need a border around it similar to that which appears in Chrome and Safari when textarea is active. How can I achieve such an effect? You can get the rounded outline in webkit like this: outline: 2px auto red; Notice that the width of the outline will not obey the specified width, and the color isn't completely accurate either. To use the normal focus color, you can do this: outline:

Display form controls above table when inline editing with jqGrid

 ̄綄美尐妖づ 提交于 2019-12-05 07:43:20
I'm using jqGrid with inline editing enabled. Problem is that the contents of some of the fields are quite long, and by default the field is not large enough to be usable: What I want to do is set a fixed width for the textarea, and have it expand to be visible above the table when it gets focus. Something like this: I can set the CSS for the textarea in editoptions:dataInit , but if I just increase the width, the right hand side of the textarea gets clipped off at the end of the table cell. I guess I can fix this with some clever CSS? BTW, I know that a popup editor would probably make more

How to add resizer to textarea in IE?

折月煮酒 提交于 2019-12-05 07:15:06
How to add resizer to textarea in IE the same as in Chrome and Firefox? jQuery.resizable() won't work for me. Internet Explorer (and Microsoft Edge, as of May 5, 2016) do not support native gripper/resizing on textarea elements. While these may eventually be supported in the future (in Microsoft Edge), the best option you have for now is to polyfill the functionality. Many options exist online that do this, but if you're using jQuery and jQuery UI, you could use the Resizable widget: $("textarea").resizable({ handles: "se" // place handle only in 'south-east' of textarea }); By default, this

Display PHP query result in textarea

房东的猫 提交于 2019-12-05 06:51:50
I'm having a little problem over here, I'm trying to make a news system with an edit button, it's all going great but I'm having problems with the "textarea", I can display the results on inputs but when I try to display them in a textarea it wont, look: This code works perfectly: <input name="txt_02" size="87" maxlength="100" id="txt_Resumen" maxlength="140" value="<?php echo $not_Resumen?>"/> This wont: <textarea name="txt_descripcion" cols="66" rows="10" id="txt_descripcion" value="<?php echo $not_Contenido ?>"> </textarea> I tried with $not_Resumen and other ones in the textarea and it

textarea auto-resize in jquery

非 Y 不嫁゛ 提交于 2019-12-05 06:45:45
问题 How can I make a <textarea> auto-resize with its content (like in Facebook) using jQuery. 回答1: Use jQuery UI Check this demo: http://jqueryui.com/demos/resizable/#textarea 回答2: <script type="text/javascript"> function adjustTextarea(this_){ var value_ = this_.value; value_ = value_.replace(new RegExp("\n\r", 'gi'), "\n"); value_ = value_.replace(new RegExp("\r", 'gi'), "\n"); var split_ = value_.split("\n"); this_.rows = split_.length; return; } </script> <textarea cols="100" style="overflow