views:

315

answers:

3

i am using facebox (a jquery modal plug-in) and tinymce for my textboxes. however when i open any modal windows, i cannot type anything within the tinymce input box.

any help?

    <script type="text/javascript" src="resources/tinymce/jscripts/tiny_mce/tiny_mce.js"></script>

        <script type="text/javascript">
        tinyMCE.init({
         mode : "textareas",
         theme : "simple"
        });
        </script>

    <link href="resources/facebox.css" media="screen" rel="stylesheet" type="text/css"/>

    <script src="resources/facebox.js" type="text/javascript"></script>

    <script>
    jQuery(document).ready(function($) {
      $('a[rel*=facebox]').facebox()
    })
    </script>

<?php

    echo "<div style='display: none;' id='c".$oh_id."' rel='facebox'><div style='overflow: -moz-scrollbars-vertical; overflow-y: auto; width: 100%; height: 375px;'><h2 style='color: #3399cc;'>Comments for ".$row_clientName['clientName']."</h2>"; 

    echo '<form method="post" action="somepage">
     <textarea name="content" id="content" style="width: 300px; height: 125px;">
     Comments...
    </textarea><br />
    <input type="submit" value="Update" name="submit" class="comment_button"/><p>
    </form></div>';

?>
+1  A: 

I have the same problem. Did you figured out the solution?

daniel
no i ended up using a standard textbox
jeansymolanza
+1  A: 

same here, something happends that my text_area boxes are displyed without tiny_mce when I display those on a facebox popup

Diego Caliri
i think its a bug with tinymce
jeansymolanza
+1  A: 

Call this when your modal window loads:

var mce_editor = $(''); mce_editor.tinymce({ script_url: '/{your path}/tinymce/tiny_mce.js', theme: "advanced", template_replace_values: { username: "Sample User", staffid: "991234"} });

Hope this helps.

Juan Zamora M