1

我编写了这段代码来获得响应并将其放入一个 div 中:

jQuery.ajax({
     async: false,  // 同期通信
     url: sample.php,
     error: function(msg) {

         ajaxResult = false;
         return false;
     },
     success: function(data){

        jQuery('#modalContent').html(data);

      }
});

示例.php:

* firstly included the js files

tinyMCE.init({
    // General options
    mode : "specific_textareas",
    editor_selector : "mceEditor",
    language : "en",
    theme : "advanced",
    plugins : "table",
    // Theme options
    theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,fontsizeselect,|,forecolor,backcolor,|,table,row_before,row_after,delete_row,col_before,col_after,delete_col",
    theme_advanced_buttons2 : "",
    theme_advanced_buttons3 : "",
    theme_advanced_buttons4 : "",
    theme_advanced_toolbar_location : "top",
    theme_advanced_toolbar_align : "left",
    theme_advanced_statusbar_location : "bottom",
    theme_advanced_path : false,
    theme_advanced_resizing : true,
    convert_fonts_to_spans : true,
    //font_size_style_values : "0.7em,0.8em,1em,1.2em,1.5em,2em,3em",
    //font_size_style_values : "8pt,10pt,12pt,14pt,18pt,24pt,36pt",

    // content CSS (should be your site CSS)
    content_css : "/css/tiny_content.css"
});

当我在 IE 浏览器中打开时,它可以正常工作。TinyMCE 无法在 Firefox 或 Chrome 中运行。

4

0 回答 0