0

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

    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();

你们有什么想法吗?谢谢你

4

1 回答 1

0

对不起,我刚刚忘记在调用者文件中添加带有相关 id 的 textarea 标记

于 2013-11-17T10:09:12.373 回答