?
Solved

tinyMCE with Text Area

Posted on 2008-10-28
4
Medium Priority
?
923 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 2000 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Preface In the first article: A Better Website Login System (http://www.experts-exchange.com/A_2902.html) I introduced the EE Collaborative Login System and its intended purpose. In this article I will discuss some of the design consideratio…
Preface This is the third article about the EE Collaborative Login Project. A Better Website Login System (http://www.experts-exchange.com/A_2902.html) introduces the Login System and shows how to implement a login page. The EE Collaborative Logi…
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…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).
Suggested Courses

771 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