| 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 | } |
|---|