FAQ Database Discussion Community

Is it possible to set different colors for different lines in a javafx textField/Area?

I know that you can set a color of a whole textArea/Field by setting the style of the node to be -fx-text-fill: red; but is there a way to set the color of one single line instead of all of the lines while still keeping the textArea/Field editable?

Keep linebreaks when getting text from tag not not showing up

I'm trying to make myself a file manager, and I managed to make an "edit file" function in PHP. In the main page I do have a textarea, but when I want to edit the main page "source", the text stops exactly where the textarea tag closes (</textarea>) Here's a...

ReactJS component not rendering textarea with state variable

I am facing an intriguing bug in React. I have this component: 'use strict'; import SummaryStore from '../stores/SummaryStore'; import React from 'react'; export default class ChangeSummaryForm extends React.Component { constructor() { // store initialisation SummaryStore.register(); var vRating = SummaryStore.getBookForSummaryPrint().summaryRating; var vStarClassName = this.getRatingClasses(vRating); this.state = { sStarClassName: vStarClassName, sCurrentBookToShow: SummaryStore.getBookForSummaryPrint()...

CKEditor will not show echo function

I implemented Ckeditor into my blog , and I have an "Edit Page". In that page I want to get the text that I wrote so I can obviously edit it, problem is it doesn't show up , like the rest of the text , here's my code after the...

JavaFX TextArea get caret position from coordinate

Is it possible to get the caret position (an int) at a screen coordinate (2 double) in JavaFX TextArea?

Display two columns data in textarea using table PHP

I am trying to display the data from two columns in a database table inside a textarea in php, under the headings tag number and scc It should read something like this. However it reads all in one line with no breaks and it looks messy. Here is my code,...

Gap around textarea within a table

I've done some research on removing the gap I've got around a textarea located in a table. Depending on the browser, it appears at the top (IE, Chrome) or bottom (Firefox). <table border="0"> <tr> <form method="POST" action="updatereview.php"> <td class="shrink"> text </td> <td class="shrink"> <select name='update_score'> <option value="1">1</option> <option value="2">2</option> <option...

Detection of textarea value chage

How can I detect, that value in my textareaId has changed when the change was caused by javascript? eg. $("#buttonID").on("click, function(){ $("#textareaID").val("lorem ipsum"); }); $("#textareaID").change(function(){ //not working }); $("#textareaID").bind('input propertychange', function(){ //not working }); ...

Render multiple values, separated by line break, within a textarea

I am rendering a dynamic form in angular. When attribute has multiple values I wish to render them within a textarea. Each value on its own line. But cant't get it to work! This is what I have so far: <script type="text/ng-template" id="form_field_text"> <label for="{{field.displayName}}">{{field.displayName}}</label> <br /> <div ng-if="field.multivalue ==...

How to access clipboard and current cursor position when pasting in a textarea in IE8/9 before it becomes the current value?

Since IE8/9 do not support HTML5's maxlength attribute, I need to find a way to prevent pasting too long text into a textarea/input, so I chose to go with the onpaste-attribute/eventhandler via jQuery, see the example code below: $(document).ready(function() { $('textarea[maxlength]').on('paste', function() { var maxlength = $(this).attr('maxlength'); if (this.value.length >=...

Understanding of css textarea offsets

I made a simple example of textarea on jsfiddle with font-size and line-height. JSFiddle textarea textarea { font-size: 20px; line-height: 4; height: 260px; } <textarea> A A A </textarea> 1) How does browser calculate the AREA_1 height and the AREA_2 height? Why are they different? 2) How does browser calculate...

How to delete a selection of textarea

I'm making a a simple texteditor and for that I'm using a function which gets the selected text of a textarea. My problem is not getting the selected text but when i add some tags to the selected text, for example bold or italic, it appends. So what I want...

How many characters can “javascript var keyword” store?

I want to create a variable to store the value of textarea by using var keyword. But I don't know exactly about the maximum characters which "var" can store. Can you help me?...

How to activate a textarea with jquery?

I have a textarea (#textarea), which I want to "activate" when a button (#activate) is clicked. By "activate", I mean the blinking prompt should appear and you should be able to type into the textarea. In other words, clicking on #activate should have the same effect as clicking on the...

Add borders into a textarea [closed]

I need to reproduce this contact form. It's already done, but i got some problems for the textarea. Seems I need to put kinds of "hr" into the textarea, or... or I don't know. Any help would be welcome....

Extjs5 Textarea Resizing

I have the following form defined: Ext.define('Admin.view.messaging.MsgDataForm',{ extend: 'Ext.window.Window', xtype: 'msgdataform', title: 'Compose Practice Message', defaultFocus: '[name=subject]', modal: true, layout: 'fit', closable: false, width: 700, items: [{ xtype: 'form', layout: 'anchor', fieldDefaults: {labelWidth: 60,labelAlign: 'right',anchor: '100%'}, padding: 10, items: [{ xtype: 'fieldcontainer', layout: 'hbox', fieldLabel: 'Date', items: [{ xtype: 'datefield',...

Pointers about resizing text area

Need some help/pointers.... When the user will click on a p element i want it content to be displayed in an text area so it would be possible to modify the text and etc... The text area will be of a fixed width.Thus when the last character will be at...

Asp.net textarea add empty string to the value [closed]

I have the textarea inside repeater <textarea class="form-control" disabled="disabled" > <%#Eval("value") %> </textarea> and when it's have value appear to have empty string in front and end of my string value Empty string in the inspector How to remove the empty string in front and end of the value (Trim)...

Create text-area dotted on each line

I would like to make a contactform like this one: http://line25.com/wp-content/uploads/2012/letter-form/20.jpg (a multi-line textarea where each line has a dotted border-bottom, like a notebook. So not just the bottom border of the field) The name and e-mail fields I already have: #contactform input[type="text"]{ border: none; border-bottom: dashed 2px #c9c9c9; width:...

TextArea with Canvas Binding to Rect

I have the problem of this textarea not showing up when I run it. Is there any way to make it show up. BTW its getting called through the gameloop on a class that extends canvas. public void render(Graphics g){ Graphics2D g2d = (Graphics2D) g; if(!initialized) init(); try { test.requestFocus();...

how to prevent unclearing a textbox when selection is made?

I'm trying to build a texteditor and for that I'm using a textarea to fill in my text My problem is when I click a button the textarea selection is gone. Here is some code to show the problem: <!DOCTYPE html> <html> <body> Address:<br> <textarea id="myTextarea"> California Road </textarea> <p>Click...

Can't post textarea with newlines/carriage return on submit

I'm simply trying to pass the values in a textarea through the post variable (or whatever $_POST is). More specifically I want to include the newline characters in it. Whenever I hit submit I have my code re-direct me to another webpage. <form action="blah.com" method="post"> .... <textarea id="Field15" name="Field15" cols="50"...

Why does my script not make new lines using keyup?

I'm coding a script for my forum which generates a preview of the given string. Here is my js code function MakePreview() { var getText = document.getElementById('inputText').value; document.getElementById('outputText').innerHTML = getText;} Here is my HTML code <article> <h2>What are you doing?</h2> <textarea id="inputText" onkeyup="MakePreview()"></textarea> <br/> <input type="submit" class="button" value="Hello"/> </article> <article>...

Whitespace in textarea

I build an array of URLs from the content of a textarea, than process it with simple php dom. I get this error: Warning: file_get_contents(http://www.example.com ) Obviously, there is a whitespace at the end of the URL (which is the last in the array and the last in the textarea)...

Adding psuedo elements to