Ver Mensaje Individual
  #2 (permalink)  
Antiguo 08/06/2012, 10:49
Avatar de YYs86
YYs86
 
Fecha de Ingreso: abril-2012
Ubicación: Salamanca
Mensajes: 136
Antigüedad: 12 años
Puntos: 14
Respuesta: colocar algo entre texto seleccionado

Solución con JQuery:

Código Javascript:
Ver original
  1. $("#botondelevento").click(function(){
  2.  
  3.   selectedText = document.getSelection();
  4.   $("#texto").replaceSelection("[CODIGO]"+selectedText+"[/CODIGO]");
  5.  
  6. });
__________________
Web developer:

http://xtremgaming.es
http://leaderleague.com