Ver Mensaje Individual
  #1 (permalink)  
Antiguo 04/06/2011, 13:25
Avatar de ColdFusion
ColdFusion
 
Fecha de Ingreso: octubre-2008
Ubicación: Tocoa, Colon Honduras C.A.
Mensajes: 419
Antigüedad: 15 años, 6 meses
Puntos: 9
execCommand no ejecuta correctamente

Código Javascript:
Ver original
  1. function doQuote() {
  2.  
  3.         if (editorVisible) {
  4.         ifm.contentWindow.focus();
  5.             if (isIE) { //IE
  6.                 var range = ifm.contentWindow.document.selection.createRange();
  7.                 if (range.text == '') {
  8.                     range.pasteHTML("<blockquote>Ingrese su texto</blockquote>");
  9.            }  else myeditor.execCommand("formatblock", false, "<blockquote>" + mytxt + "</blockquote>");
  10.            
  11.             }else if (window.getSelection) { //FF
  12.            
  13.             var userSelection = ifm.contentWindow.getSelection().getRangeAt(0);
  14.           if(userSelection.toString().length==0)
  15.           myeditor.execCommand('inserthtml', false, "<blockquote>Ingrese su texto</blockquote>");
  16.           else myeditor.execCommand("formatblock", false, "<blockquote>" + userSelection.toString() + "</blockquote>");
  17.            } else myeditor.execCommand("formatblock", false, "<blockquote>" + mytxt + "</blockquote>");
  18.  
  19.     }else { AddTag('[quote]', '[/quote]');}
  20.    
  21. }

es parte de un editor bbcode y tendria que mostrar un blockquote, pero no funciona :/ alguien sabe que pasa!