Solved

tinyMCE with Text Area

Posted on 2008-10-28
4
911 Views
Last Modified: 2013-11-19
In a php page i have three textarea, and many client create four more(I done it with DOM). And i want to assign tinyMCE to all the text areas, that was sucessfull. But the issue is  i can't get the values from the textarea using javascript.

When i used this command   alert(document.getElementById('txt1').value);
the result is empty, but the textarea having value. When i post the page i got the values from all textarea. But i need client side validation to check datas are entered in textarea.

Pls help
0
Comment
Question by:logicslab
  • 2
  • 2
4 Comments
 
LVL 2

Expert Comment

by:quetzal22
ID: 22828849
From what I see here:
http://tinymce.moxiecode.com/examples/example_06.php

it seems that if your textarea has name="myEditor" then you will need to do:
var ed = tinyMCE.get('content');

//then to find out the value of it
alert( ed.getContent() );

//then if you want to change the value of it
ed.setContent('Hello');
0
 

Author Comment

by:logicslab
ID: 22828974
Hi quetzal22

thank you for your quick reply.
 
One more question about tinyMCE. How can i add Mathematical Symbols to textarea using tinyMCE?
0
 
LVL 2

Accepted Solution

by:
quetzal22 earned 500 total points
ID: 22829000
The "Full Featured" example:
http://tinymce.moxiecode.com/examples/full.php

shows you all the supported features. Mathematical symbols are not an option. TinyMCE is an HTML editor. HTML does not support Mathematical symbols (they never thought about that until later - then they came up with MathML - http://www.w3.org/Math/). You may want to ask the TinyMCE folks if they intend to add that support.
0
 

Author Closing Comment

by:logicslab
ID: 31511060
Thank you very much
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
XSLT 5 48
removing hyperlinks from end-notes in a PDF to HTML conversion 8 107
Coldfusion- Create and save form elements in Database 7 84
Stupid git question 2 103
There are two main kinds of selectors in CSS: One is base selector like h1, h2, body, table or any existing HTML tags.  For instance, the following rule sets all paragraphs (<p> elements) to red: (CODE) CSS also allows us to define our own custom …
I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
The viewer will learn how to count occurrences of each item in an array.
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question