Solved

tinyMCE with Text Area

Posted on 2008-10-28
4
899 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
Thank you very much
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

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…
This article covers the basics of the Sass, which is a CSS extension language. You will learn about variables, mixins, and nesting.
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

744 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now