从其他文件初始化微小的Mce


init tinyMce from other file

我做了一些初始化tinyMce的类前任:

    var tinyMce_reader = function (rp_documentPath, objectID_arr){
     this.objectID_arr = objectID_arr;
     this.idx = 0;
    this.rp_documentPath = rp_documentPath;
      this.doc_sent_arr = [];
     this.doc_modif_arr = [];
}
    tinyMce_reader.prototype.init = function(){
        tinymce.init({
                menu : {},   
                plugins: "preview,print,fullpage",
                toolbar: "fontsizeselect undo redo |  bold italic underline |  aligncenter alignjustify  | bullist numlist outdent indent | print preview",
                statusbar : false,
                valid_elements : '*[*]',
                selector: "textarea",
                width : 798,
                height : 405,
                content_css : "courriers.css"
            });
    for(var i = 0; i < this.objectID_arr.length; i++) {
           this.doc_sent_arr.push(0);
            this.doc_modif_arr.push(0);
        }
}

当我从文件中实例化对象时,一切进展顺利,但是如果我从另一个文件执行此操作,它不起作用。

加工:

$(document).ready(function(){   
var objectID = ['1371','1377'];
var instance = new tinyMce_Fax_reader('<?= $_SESSION['rp_parameters']->rp_urlPath ?>courrier_MR_prereservation.php', objectID,<?= rp_appSession::rp_GetConseiller()->getConseillerID() ?>);//.?object_id='+objectId[0]);
instance.init();

不工作:

include_once(ROOT_PATH."/includes/components/rp_componentTinyMce.php");
$(document).ready(function(){   
var objectID = ['1371','1377'];
var instance = new tinyMce_Fax_reader('<?= $_SESSION['rp_parameters']->rp_urlPath ?>courrier_MR_prereservation.php', objectID,<?= rp_appSession::rp_GetConseiller()->getConseillerID() ?>);//.?object_id='+objectId[0]);
instance.init();

你们有什么想法吗?谢谢

对不起,我只是忘了在调用者文件中添加具有相关 ID 的文本区域标签