textarea

jquery keyup on the data inside CKEDITOR

扶醉桌前 提交于 2019-12-23 03:01:58
问题 I'm building a little fake html/css mobile phone which automatically inserts data from a several input boxes on a page like so: (the phone is inserted using an iframe..(don't ask)..) $('#mgSiteDescription').bind('keyup', function() { var iframedoc = $('.liveDemoFrame').get(0).contentDocument; $(iframedoc).find('#header h2').html($(this).val()); }); This works absolutely fine for my input fields. Now, I'm using CKEditor for my textareas which brings me to my problem. As the textarea isn't

Text-area with em not working in IE and Opera

旧城冷巷雨未停 提交于 2019-12-23 00:30:07
问题 This is my first attempt to make a complete webpage layout in 'em' measurements. I am building a live preview markdown editor. This page works perfectly in Firefox and chrome, but in IE(i have IE9) and Opera(updated last night) The text-area shoots the boundary significantly. In Opera, the border of textarea is also not showing rounded corners. ( text area is showing rounded corner but not its border) This is css for the textarea #pad { background-color:#BBBB99; background-image:url("../img

How to detect a change with jQuery to the contents of a textarea that's using jWYSIWYG plugin?

一世执手 提交于 2019-12-22 18:12:10
问题 I'm using the jwysiwyg plugin on textareas in my form (jwysiwyg: https://github.com/akzhan/jwysiwyg ) I want to detect changes to any of the textareas that are in my form. Normally, with a standard non-wysiwyg textarea, I do: $('textarea').change(function(e){ alert('Something changed!'); }); This proves ineffective when jwysiwyg is being used due to jwysiwyg's DOM manipulation. Anyone have any pointers? 回答1: Use this code, I've tested it with the help/example/01.basic.html and 02.full.html, I

jQuery Autosize plugin on dynamically added textarea elements

为君一笑 提交于 2019-12-22 17:45:55
问题 Hi :) I'm using jQuery Autosize plugin to resize some of my textarea elements dynamically. Everything is good but the problem is that when I add some textarea elements to the DOM dynamically, the autosize thing no longer works. I initialize the plugin like so: $(document).ready(function () { $('textarea').autosize(); }); I tried to enable the plugin for my dynamically added textareas like: myDynamicallyAddedTextarea.autosize(); Unfortunately, nothing happened. Can anybody help me with this?

How to change color of selected text of textarea?

你。 提交于 2019-12-22 14:27:11
问题 I have textarea and i want to change color of selected text. Example: var text = "abcdefg"; I want to change color of selected text efg . here is my code: var input = document.getElementById('area'); var value = input.value.substr(input.selectionStart, input.selectionEnd - input.selectionStart); $('#abc').find(value).attr('color',color); 回答1: Use ::selection CSS selector that select part of text is seleced. You can add your CSS property to selected text of elements. var textarea = document

Default text on textarea jQuery?

自作多情 提交于 2019-12-22 12:54:19
问题 I have a textarea that i would like to show some default text on page load. Once the textarea is clicked i would like to have the text disappear and possibly if user clicked in textarea and did not type anything in and then clicked out of textarea the default text will show again. I have searched Google and on here but i can only seem to find tutorials relating to text boxes and NOT textareas, plus i already am using a class on the textarea so cannot depend on class for it to work. Does

<textarea> Not sending via email

落爺英雄遲暮 提交于 2019-12-22 10:45:15
问题 I'm trying to create a simple email form for a client and cannot get the <textarea> to send as a message. I've tried everything I have found so far and nothing is working properly... Here is my code: <h4>Email Al</h4> <table> <form name="contactForm" id="contact" action="send_form_email.php" method="post"> <tr> <td> <label>Name:</label> <input type="text" name="name"> </td> <td> <label>Email Address:</label> <input type="email" name="email"> </td> </tr> <tr> <td colspan="2"> <label>Website

Why can't this textarea assume the full height of its parent in Chrome?

喜欢而已 提交于 2019-12-22 08:47:43
问题 Consider the following page, which displays a line of text with a <textarea> underneath it. * { box-sizing: border-box; } html, body { height: 100%; margin: 0; } .outer { background-color: #eee; display: flex; flex-direction: column; height: 100%; padding: 10px; } .expand { flex-grow: 1; } textarea { height: 100%; width: 100%; } <div class="outer"> <p> Nice little wall of text. </p> <div class="expand"> <textarea></textarea> </div> </div> The intended behavior is to have the textarea occupy

jQuery .html() does not copy contents of textareas or inputs

痴心易碎 提交于 2019-12-22 08:34:33
问题 I'm trying to copy the contents of an element using elem.html() but it's not including the contents of inputs or textareas . Here's an example (try writting in the boxes then click "Copy"): http://jsfiddle.net/gAMmr/2/ Is there a way of copying all info? These are the approaches I have tried so far: elem.clone() - not suitable for my task because it copies the element itself elem.children().clone() - misses out text nodes elem.contents().clone() - doesn't include the textarea contents EDIT:

Justify and Center <textarea> text HTML/CSS?

吃可爱长大的小学妹 提交于 2019-12-22 08:08:50
问题 I have a textarea and I want it to be justified so all the lines are equal in width and to be centered to the text stays in the middle of the textarea when it's not at maximum line length. This is my textarea: <textarea class="Whiteboard" type="text" placeholder="Type something..."></textarea> ...and the CSS: textarea.Whiteboard{ resize: none; background-color: #F1F1F1; border: none; height: 500px; width: 800px; text-align: center; font-size: 50px; } Thank you all! 回答1: Unfortunately there is