【问题标题】:tinymce text area in facebox modal window not allowing me to typefacebox模式窗口中的tinymce文本区域不允许我输入
【发布时间】:2011-02-26 22:18:30
【问题描述】:

我正在为我的文本框使用 facebox(一个 jquery 模态插件)和 tinymce。但是,当我打开任何模式窗口时,我无法在 tinymce 输入框中输入任何内容。

有什么帮助吗?

    <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>';

?>

【问题讨论】:

    标签: php jquery tinymce facebox


    【解决方案1】:

    当你的模态窗口加载时调用它:

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

    希望这会有所帮助。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2010-12-26
      • 1970-01-01
      • 2020-04-17
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多