views:

373

answers:

1

Hi all, I'm using the tiny mce editor in my website and I want to load some text from database in the text area that uses tinymce.

The javascript configuration for the editor is the following:

<script type="text/javascript">
tinyMCE.init({
    mode : "textareas",
    theme : "advanced",
    editor_selector : "mceAdvanced",
    plugins : "style,table,iespell,preview,directionality,inlinepopups",

    // Theme options
    theme_advanced_buttons1 : "bold,italic,underline,|,justifyleft,justifycenter,justifyright,justifyfull,|,formatselect,fontsizeselect",
    theme_advanced_buttons2 : "bullist,numlist,|,outdent,indent,|,link,unlink,image,code,|,forecolor",
    theme_advanced_buttons3 : "tablecontrols",
    theme_advanced_toolbar_location : "top",
    theme_advanced_toolbar_align : "left",

    // Example content CSS (should be your site CSS)
    content_css : "css/example.css",

    // Drop lists for link/image/media/template dialogs
    template_external_list_url : "js/template_list.js",
    external_link_list_url : "js/link_list.js",
    external_image_list_url : "js/image_list.js",
    media_external_list_url : "js/media_list.js",

    // Replace values for the template plugin
    template_replace_values : {
     username : "Some User",
     staffid : "991234"
    }
});
</script>

and this is the way I'm trying to load the text inside textarea:

<textarea name="program" cols="40" rows="12" class="contact_fields mceAdvanced"><? php echo $row_this_trip['program']; ?></textarea>

Also none of the following is working:

<textarea name="program" cols="40" rows="12" class="contact_fields mceAdvanced">Lorem Ipsum</textarea>

or

<textarea name="program" cols="40" rows="12" class="contact_fields mceAdvanced"><?php echo( htmlentities( $row_this_trip['program'] ) ); ?></textarea>

I can't find what's wrong in this. Can you please help me?

A: 

Do you have link in your html to the TinyMCE script?

<script src="linktoscript.js" type="text/javascript" />
ZippyV
yes of course, the editor works ok besides the fact that I cannot load text in it. I also just found out that the problem is appearing only in firefox browser. Everything works ok, using all other browsers. This is weird.
ktsixit