1

Topic: Clear intial value on enter

Hi there.

I'm about to use TinyMCE for the first time.

I'm using some JS code to remove the default values of the input fields on a form but this doesn't seem to work in a TinyMCE textarea.

How can I achieve this in the easiest way possible?

Current JS:
function clearDefault(f) {
    f.value='';
    f.style.color='#000';
}

This is called in the <input> tag as onfocus="clearDefault(this)".

Thanks in advance.

MSP

2

Re: Clear intial value on enter

You have to set the content before TinyMCE init.
Otherwise, make use of getBody() to do the work you were looking for.
http://www.tinymce.com/wiki.php/API3:me … or.getBody

3

Re: Clear intial value on enter

Hi jlo

Sorry for taking so long to return and answer.

Many thanks for your reply. Unfortunately I need a bit of hand-holding here.

I've tried a couple of ways but can't find a way to make this work.

Any pointers?

Many thanks

MSP

4

Re: Clear intial value on enter

Take a look at the FAQ

5

Re: Clear intial value on enter

hello it's a  good site,welcome to our site,there have all fashion things.