Is there a simple way of getting a HTML textarea and an input type="text" to render with (approximately) equal width (in pixels), that works in different browsers?
A CSS/HTML solution would be brilliant. I would prefer not to have to use Javascript.
Thanks
/Erik
...
The .Net generated code for a form with the "DefaultButton" attribute set contains poor javascript that allows the functionality to work in IE but not in other browsers (Firefox specifcially).
Hitting enter key does submit the form with all browsers but Firefox cannot disregard the key press when it happens inside of a <textarea> contr...
Is it possible to highlight text inside of a textarea using javascript? Either changing the background of just a portion of the text area or making a portion of the text selected?
...
I definitifely like the one at stackoverflow, because it's clean and simple. Also the live preview with code/syntax hilighting is really helpful (and motivating).
What is your favourite Javascript Editor Framework and why?
...
How does Stackoverflow implement the resizable textarea?
Is that something they rolled themselves or is it a publicly available component that I can easily attach to textareas on my sites?
I found this question and it doesn't quite do what I want.
autosizing-textarea
That talks more about automatically resizing textareas whereas I ...
Hi,
I have a textarea with overflow-x: auto; attributed to it. It works great when a user is typing text into the box by hand. When a user copy pastes a line from a file, however, that is bigger than my textarea, the overflow-x property does not work, instead the textarea wordwraps the long line.
Is there a way (maybe javascript) to ma...
Is there a free and open source extension of JTextArea that would support "vi mode"?
...
How do you get the cursor position in text area using JavaScript?
For example:
This is| a text
This should return 7.
How would you get it to return the strings surrounding the cursor/selection? eg:
'This is', '', ' a text'
If the word "is" is highlighted, then it would return 'This ', 'is', ' a text'
...
I would like to print only the contents of a textarea element from a website page. In particular, I would like to ensure that nothing gets clipped by the boundary of the textarea as the contents will be quite large.
What is the best strategy for tackling this?
...
errr i checked the related questions using different re-phrase(s) of my question but nothing was related enough to my question....
anyway
i have this form with a <textarea> and i wanted to capture any line breaks in that textarea on server-side and replace them with a <br/>
is that possible?
i tried setting the css of the textarea to whi...
Hi,
I'm trying to find an editor (or some simple JavaScript - preferably jQuery) that will allow me to edit the contents of a textarea.
I don't want it to be rich text or WYSIWYG; I just want to be able to select a bit of text, click a button/link and have some simple HTML tags that I define put either side of the highlighted text. I a...
I have a string
var s:String = "This is a line \n This is another line.";
this.txtHolder.text = s; //.text has \n, not a new line
and i want to put it into a text area, but the new line character is ignored. How can i ensure that the text breaks where i want it to when its assigned?
...
Is it possible to hide the scroll bar on an HTML textarea element using CSS or any other means ?
...
Hi all,
I am trying to implement Autocomplete in a text area (similar to http://www.pengoworks.com/workshop/jquery/autocomplete.htm).
What I am trying to do is when a user enters a specific set of characters (say insert:) they will get an AJAX filled div with possible selectable matches.
In a regular text box, this is of course simple...
I'm building a CMS in PHP and one dread I have is that the users will have to fill the data in from existing Word (and Excel, but nevermind that) documents. Now, I've seen what happens when they carelessly copy and paste from Word to a textarea: the database got filled with crap markup.
Now, I could certainly strip all markup myself, bu...
The Problem
I am working on an in-browser editor within a textarea. I have started looking for some information on dealing with textarea selection and found this jQuery plugin that does some simple manipulation. However, it doesn't explain what's going on.
The Question
Where can I find a good resource on Textarea Selection in JavaSc...
I would like to provide a horizontal scroll to a textarea in my HTML page. The scroll should appear without wrapping, if I type a long line without a line break. A few friends suggested using overflow-y CSS attribute, which did not work for me. The browsers that I use are IE 6+ and Mozilla 3+.
...
I am currently trying to justify text in a textarea, unfortunately the CSS:
text-align: justify;
Doesn't work on the text like center, left and right do. I've tried this in both Firefox 3 and IE 7 with no luck.
Is there any way around this?
...
An HTML text input has an attribute called "maxlength", implemented by browsers, which if set blocks user input after a certain number of characters.
An HTML textarea element, on the other hand, does not have this attribute. My goal is to emulate the behavior of maxlength on an HTML textarea. Requirements:
At a minimum, show (CSS chan...
How does one go about attaching a bunch of code to an onkeydown event, but keep entering text into a textarea fast and crisp? Anything more than a couple of IF statements seems to slow it down quite considerably.
EDIT: I should add (can't believe I forgot!) that this doesn't affect desktop browsers. It's mainly an issue with iPhone Safa...