| |||
editor con emoticonos... Hola señores... tengo una duda con respecto a insertar emoticonos en un campo de edición en un principio use en textarea pero este no me asepta ingresar imagenes(emoticonos), con que otra etiqueta html puedo hacer un campo de edicion donde me permita ingresar los emoticonos(imagenes)... |
| |||
Respuesta: editor con emoticonos... Cita: si econtre un editor wysiwyg en jquery, ya tengo el textarea con funcionalidad para q interprete el html pero el problema es cuando quiero agregarle html desde javascript lo ingreso pero no se vizualiza nada este es el codigo q estoy usando... Cita: <script src="jquery-1.3.2.min.js"></script> <script src="jquery.wysiwyg.js"></script> <script> $(function() { $('#wysiwyg').wysiwyg(); }); function ShowEmoticono(btn){ document.getElementById('wysiwyg').innerHTML +='<img src="'+btn.value+'">'; $("#wysiwyg").val('<img src="'+btn.value+'">'); alert($("#wysiwyg").val()); //alert(btn.value); } </script> <table> <tr> <td> <div style="height:30px;background-color:#CCCCCC;width:300px;"> <button style="background:url(emoticones/alegre.gif);width:32px;height:32px;" type="button" value="emoticones/alegre.gif" onClick="ShowEmoticono(this)"></button> <button style="background:url(emoticones/alegresingafas.gif);width:32px;height:32px;" type="button" value="emoticones/alegresingafas.gif" onClick="ShowEmoticono(this)"></button> <button style="background:url(emoticones/loco.gif);width:32px;height:32px;" type="button" value="emoticones/loco.gif" onClick="ShowEmoticono(this)"></button> <button style="background:url(emoticones/bien.gif);width:32px;height:32px;" type="button" value="emoticones/bien.gif" onClick="ShowEmoticono(this)"></button> </div> </td> </tr> </table> <textarea id="wysiwyg"><img src="emoticones/alegre.gif"></textarea> Última edición por cancha; 27/03/2009 a las 18:50 |