textarea

Change an HTML5 input's placeholder color with CSS

匿名 (未验证) 提交于 2019-12-03 01:26:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Chrome supports the placeholder attribute on input[type=text] elements (others probably do too). But the following CSS doesn't do anything to the placeholder's value: input[placeholder], [placeholder], *[placeholder] { color: red !important; } Value will still remain grey instead of red . Is there a way to change the color of the placeholder text? 回答1: Implementation There are three different implementations: pseudo-elements, pseudo-classes, and nothing. WebKit, Blink (Safari, Google Chrome, Opera 15+) and Microsoft Edge are using a pseudo

Replace textarea with rich text editor in Django Admin?

匿名 (未验证) 提交于 2019-12-03 01:23:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I would like to know the best way to replace a standard textarea field with a rich text editor in Django Admin? 回答1: There's an add-on Django application to provide TinyMCE support for Django admin forms without having to muck around with admin templates or Django newform internals. 回答2: Take a look on this snippet - basic idea is to include custom JS in your admin definitions which will replace standard text areas with rich-text editor. For jQuery/FCKEditor such JS could look like that: $(document).ready(function() { $("textarea").each

Focus textarea with caret after text in Android browser

匿名 (未验证) 提交于 2019-12-03 01:23:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am currently writing a simple webapp to view tweets in the Android browser. I am using this code to focus the caret after the current text: var oldContent = document.tweetBox.tweet.value; document.tweetBox.tweet.value = ''; document.tweetBox.tweet.focus(); document.tweetBox.tweet.value = oldContent + to; This code works flawlessly in Chrome, Fluid, Opera, Firefox en Safari. The weirdest part is that the cursor starts blinking AFTER the 'to' text if I use my hardware keyboard but the text that I enter starts where I was typing before the JS

asp.net : Get the value from textarea

匿名 (未验证) 提交于 2019-12-03 01:20:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: i am creating one form for image upload drag and drop through jquery. when i dragged one image to aspx form, that time that image preview and title ( textarea ) and desc ( textarea ) created to aspx page. after entered the title and desc, it is saved to database when i click save button. i couldn't get the textarea control in c# (code behind ) ? textarea does not added directly to aspx page. it is is dynamically added through jquery so???? in jquery textarea added <textarea id = "txtImagename1" runat = "server" rows = "1" cols =

Selenium paste text into textarea

匿名 (未验证) 提交于 2019-12-03 01:18:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Using Selenium, I'd like to edit the contents of a textarea . Calling textarea.SendKeys("My text") works, but it types it in letter by letter which is obviously quite slow for longer strings. One workaround I found ( http://code.google.com/p/selenium/issues/detail?id=2876 ) suggests that I copy the string to a clipboard and paste it into the textarea . The Keys reference they give is ambiguous between OpenQA.Selenium.Keys and System.Windows.Forms.Keys , so I tried both of them. Here's my code to do that: Clipboard.SetDataObject("My text");

JavaFX Multiple colors in textarea (JavaFX 8)

匿名 (未验证) 提交于 2019-12-03 01:14:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I cannot find so much documentation in JavaFX. And I will be happy to know how I can do this : When I type a word in a textarea, fx "google" or "facebook". Can I so do like it can change color of google to fx green, and changes the font and stuff like that. I will be happy to know how i can do this :). 回答1: No. JavaFX 8 does not support multiple colors for text in TextArea. You could try Tomas Mikula's RichTextFX control and see if that works for you. RichTextFX provides a text area for JavaFX with API to style ranges of text. It is intended

Transparent background of a textarea in JavaFX 8

匿名 (未验证) 提交于 2019-12-03 01:12:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Since I am using JavaFX 8, all my textarea s do not apply the transparency that has been defined in the corresponding css. It works fine in Java 7, but for the release candidate of JavaFX 8, I can't get it to behave like before. EDIT: This question is about JavaFX TextArea, not a JTextArea. -fx-background-color: rgba(53,89,119,0.2); does not have any effect on the textarea anymore, although it should have an alpha value of 0.2, but it is opague... Is that a known issue? 回答1: The TextArea consists of several nodes. To make the background

Force spell check on a textarea in WebKit

匿名 (未验证) 提交于 2019-12-03 01:10:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm creating a browser based QC/data entry app that will let people edit OCRed files, which naturally have tons of errors. Chunks of data are put in textareas so they can be checked, but the red underlines only appear when the user manually puts the cursor in a misspelled word. Is there a way to force WebKit to add the little red spell check underlines to textareas? 回答1: Essentially you need to use the selection api to move the insertion point over each word to get Safari to highlight it. Here's an example to scan over the first thousand

Textarea issue when user types, but text doesnt' change

匿名 (未验证) 提交于 2019-12-03 01:03:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I have a little issue. I have a select with options. When one option is selected, then text changes in textarea, everything is working perfectly while user don't try to write something in text area, when user types, then text doesn't change anymore. Here is code: select with option: <select class = "es" id = "es1" > <option id = "edu1" > 1 </option> <option id = "edu2" > 2 </option> </select> here is jQuery code which I use(in this code I am taking selected option id and then by id number I am showing text, everything is working

In-field labels plugin not working [closed]

匿名 (未验证) 提交于 2019-12-03 01:01:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am trying to use the In-field labels plugin on the contact form of my webpage , but the script is not working (the in-field labels don't appear). Also my form has positioning problems that I have been trying to work with for a while but in vain. Here is my code: $(function(){ $("label").inFieldLabels(); }); <form action="" method="get" name="contact-form" accept-charset="utf-8"> <fieldset> <p> <label for="name">Name</label><br /> <input type="text" name="name" value="Name" id="name"> </p> <p> <label for="email">Email</label><br /> <input