textarea

Change textarea cursor color in the textarea

醉酒当歌 提交于 2019-12-07 04:46:41
问题 I have the following textarea: How can I change the inner cursor color? 回答1: A custom caret can be used with either an .ani or .cur file textarea { cursor: url(cursor.cur); } or textarea { cursor: url(cursor.ani); } For more details regarding carets or .cursor { font-size: 12px; background-color: red; color: red; position: relative; opacity: 0.5; } 来源: https://stackoverflow.com/questions/20324434/change-textarea-cursor-color-in-the-textarea

HTML/CSS/JS: How to make an illusion of a textarea with line numbers?

自古美人都是妖i 提交于 2019-12-07 04:42:39
问题 I want to have a textarea which displays line numbers on the left. Wrap should be set to "off" (so that horizontal scrolling is available). I want to have my page as a single self-contained .html file (there will be no graphics), so I'd like to avoid any 3rd party frameworks. Which way should I go? How would you do this? 回答1: I would start with two text-areas and synchronzation mechanism. Something like this, <script> window.sync = function(e){ var textarea = document.getElementById("lines");

HTML Textarea - cursor starting in center of textarea rather than top

余生颓废 提交于 2019-12-07 04:13:58
问题 I have an HTML template and CSS that renders a textarea field, however when clicking in the field, the cursor starts from half way down the text area, not from the top left as I would expect. This does not occur in IE, but does in Chrome and FF. I also get a list of previous values entered listed below, suggesting that the textbox styles are being applied. Can anyone advise on which CSS proprties I should be looking to modify? Here is the HTML: <input id="description" class="textarea" type=

Display form controls above table when inline editing with jqGrid

本小妞迷上赌 提交于 2019-12-07 03:46:24
问题 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.

How bind the scroll event on a Live()?

大憨熊 提交于 2019-12-07 03:10:13
问题 A while ago I've solve an issue for someone that wanted his textarea to grow. I've made a function that listens to the scroll and keyup events of the area and recalculates the number of rows. I wanted to use the code in another project, but there's a problem. The textarea's are not know To solve this, I'm using live instead of bind , so that future area's will be bound as well. Now I'm finding that the live executes a lot slower than a bind . I've created a simplified example on jsFiddle. The

Which value will be sent by <textarea> and why?

自古美人都是妖i 提交于 2019-12-07 03:06:07
问题 <form> <textarea name="test" value="no"> hi </textarea> <input type="submit" /> </form> hi or no,and reason? I ask this question because I see javascript editors use textarea.value = html; to restore the content when submit,why they do this if value attribute is useless? 回答1: hi will be submitted. There is no value attribute for the <textarea> tag. See W3School's textarea tag reference for details. To answer your question of why you see javascript libraries accessing the value property of a

Display PHP query result in textarea

余生长醉 提交于 2019-12-07 02:56:16
问题 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

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

ぃ、小莉子 提交于 2019-12-07 02:47:49
问题 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? 回答1: 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"

Jeditable inserts extra spaces around the text in text area

泪湿孤枕 提交于 2019-12-07 01:31:06
问题 Jeditable is inserting extra spaces around the actual text in a text area for me when I click to edit some text. How do I trim this or actually fix this? 回答1: You can actually just pass a function to trim the string you are going to edit. Use this in your settings: data : function(string) {return $.trim(string)}, submit: "Save" 回答2: Found the reason. And it is insane! In place edit will insert space around the text if you html looks like following <div id="inplace_edit_this"> This is some

How to disable TinyMCE's textarea

放肆的年华 提交于 2019-12-07 00:04:18
问题 I've tried all of the following: $(#"tbxNote").attr("disabled", "disabled"); ////doesn't work $(#"tbxNote").attr("disabled", "true"); //doesn't work either :) tinyMCE.init( mode: "none" ); //throws an error This is how I'm loading TinyMCE: //load tinymce plugin $('#tbxNote').tinymce({ // Location of TinyMCE script script_url: '/common/scripts/tiny_mce/tiny_mce.js', // General options theme: "advanced", // Theme options theme_advanced_buttons1: "link,unlink", theme_advanced_buttons2: "", /