includes/clientside/static/dynano.js
changeset 493 d8296f89ebb5
parent 474 3d751a6f2b05
child 582 a38876c0793c
equal deleted inserted replaced
492:e07ad77fe9d0 493:d8296f89ebb5
     8 function DNobj(id)
     8 function DNobj(id)
     9 {
     9 {
    10   this.object = ( typeof(id) == 'object' ) ? id : document.getElementById(id);
    10   this.object = ( typeof(id) == 'object' ) ? id : document.getElementById(id);
    11   if ( !this.object )
    11   if ( !this.object )
    12   {
    12   {
       
    13     console.warn('Dynano: requested object is bad. id parameter follows.');
       
    14     console.debug(id);
       
    15     console.debug(tinyMCE.getInstanceById(id));
    13     this.object = false;
    16     this.object = false;
    14     return this;
    17     return this;
    15   }
    18   }
    16   this.height = __DNObjGetHeight(this.object);
    19   this.height = __DNObjGetHeight(this.object);
    17   this.width = __DNObjGetWidth(this.object);
    20   this.width = __DNObjGetWidth(this.object);
   100   }
   103   }
   101   // If tinyMCE init hasn't been called yet, do it now.
   104   // If tinyMCE init hasn't been called yet, do it now.
   102   if ( !tinymce_initted )
   105   if ( !tinymce_initted )
   103   {
   106   {
   104     enano_tinymce_options.mode = 'exact';
   107     enano_tinymce_options.mode = 'exact';
   105     enano_tinymce_options.elements = this.object.name;
   108     enano_tinymce_options.elements = this.object.id;
   106     console.debug(enano_tinymce_options);
       
   107     initTinyMCE();
   109     initTinyMCE();
   108     this.object.dnIsMCE = 'yes';
   110     this.object.dnIsMCE = 'yes';
   109     return true;
   111     return true;
   110   }
   112   }
   111   else
   113   else