Trying to replace a textarea with better option - javascript

Can't seem to figure out the best way to do this.
I am passing through some text to a textarea, but the text is formatted in a mimic of a column format as such:
Text Value Comments
Text2 Value Comments
Longtext Value Comments
etc...
My users take the text from this area and copy/paste it into word. As you can imagine, the attempt at column formatting becomes distorted.
Is there a better way to create this column type of text data set, instead of within a textarea?

Related

Text to Speech - highlight the read word when it is being Spoken and track speak progress

1]: https://i.stack.imgur.com/USZOJ.png
My Requirement is i want to copy paste data to this textbox. after copying text its formatting should not change,
one should be able to change the font size , font etc.
If data contains paragraph and table then it can be pasted in
its own format.
Text color and table border color in the textbox should be changed to
white irrespective of original format color.
Table layout should not get disturbed in textbox.
**
i have found solution on this and i have achieved it in web based
TinyMCE editor and JavaScript, i am using window speech synthesis to
read the copied data in to the editor , when i click on read button
it reads the data but i need to highlight the read word when it is
being Spoken
**
There are two main ways to get the job done:
Using the HTMLBody property of Outlook items which returns or sets a string representing the HTML body of the specified item. The HTMLBody property should be an HTML syntax string.
Using the Word editor. The WordEditor property of the Inspector class returns an instance of the Word Document which represents the message body.
See Chapter 17: Working with Item Bodies for more information.

Adding choices of two dropdown boxes into one string in Acrobat form

I have been unsuccessfully searching for the solution for two days.....
Basically, I have two dropdown boxes and one text field, so the choice of either or both of them must go in the text field. The choices in the dropdown boxes are identical, but because of language specifics, the strings they return are slightly different.
My problem is that I can't seem to find a way to get the string from both of the dropdown boxes into the text field. If I have a choice from one of them, then it's ok. But I can't get a string from both of them.... It's like the choices do not combine into one simple string....
Hopefully that makes sense.
Thank you in advance.
Set the text box value to be calculated and then set the custom calculation script to something like...
event.target.value = this.getField("dropdown1").value + ", "+this.getField("dropdown2").value
Adjust the comma delimiter as you see fit.

Acecomplete doesn't show 'meta' word

I successfully connected ace-editor with autocomplete but find an annoying bug: if autocomplete line is too long, 'meta' word is not shown:
How can I split my long line for multiple lines and show 'meta' word?
If it's not possilbe, how to show 'meta' word at least?
Ace allows to use caption and value properties to set different texts for insertion and display
{
caption // short descriptive string
value // the long string that gets inserted
}
you can aslo set item.docText to value, so that the value is displayed in the tooltip when the item is selected

Editable and non editable input field and select

I have a table, you can see it there: http://jsfiddle.net/webYa73/xuw23/
We can edit each row and save the changes.
I would like to see the input field and the select box also in the non editable case maybe with another font color, how can I do it in Javascript?
Have you considered using jQuery? It would make something like this much easier.
For example: to delete a row - instead of:
e.parentNode.parentNode.parentNode.removeChild(e.parentNode.parentNode);
it could be simplified to:
$(e).closest("tr").remove();

Auto Complete Fields in Rails that Display Something Different Than What They Select

I'm trying to create an auto complete field (using the script.aculo.us plugin) in a form for a category select, but I want the auto complete list to display a number next to each category (the number of other things in the same category). This is similar to the Tags field on stack overflow.
Right now I can display the number I want, but when I select any field the extra number gets dumped into the text field with the category. Currently I'm simply appending the number to each item on the array before I display it. How can I make it so when you select something from the list the number (enclosed in parentheses) does not get put into the text field. Thank you.
I finally solved my problem, I just needed to figure out what some of the plugin's options were. It turns out there is an option for the auto_complete_field helper called :select. The value you provide to this tells the JavaScript which part of the <li> element (the HTML tags the results are displayed in) to return to the text box.
The solution was a simple matter of enclosing the name of the category in a span with a special class and leaving the number part I didn't want outside of this class. This was easy since I was already using my own partial to display the results.

Categories