Changeset 1164

Show
Ignore:
Timestamp:
06/19/07 16:05:26 (1 year ago)
Author:
ben
Message:

Fix for content toolbar Javascript in Internet Explorer.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • devel/mod/contenttoolbar/js/edit.js

    r1135 r1164  
    379379 
    380380  if(window.tinyMCE != null){ 
    381     tinyMCE.execCommand("mceInsertContent",true,value); 
    382   } 
    383 
    384  
    385 /** 
    386 * Set the provided value in the specified field 
    387 * If tinyMCE its avaible it take care of insert on it too 
    388 * @param string id Field's id 
    389 * @param strinv value String to be appended 
    390 * @author Diego Andrés Ramírez Aragón <diego@somosmas.org> 
    391 */ 
    392 function setResource(id,value){ 
    393   var field = $(id); 
    394   field.value = value; 
    395  
    396   if(window.tinyMCE != null){ 
    397     tinyMCE.execCommand("mceSetContent",true,value); 
    398   } 
    399 
     381    if(tinyMCE.isMSIE){ 
     382    tinyMCE.execCommand("mceSelectNode",false,id); 
     383    } 
     384    tinyMCE.execCommand("mceInsertContent",false,value); 
     385  } 
     386