Ver Mensaje Individual
  #2 (permalink)  
Antiguo 20/06/2011, 11:14
lulavoy
 
Fecha de Ingreso: noviembre-2008
Mensajes: 135
Antigüedad: 15 años, 6 meses
Puntos: 3
Respuesta: Verificar TextArea Ckeditor

Hola Maganius,

tras mucho buscar creo que logré solventar tu problema y el mio.
No sé si del mejor modo pero creo que funciona:

<textarea id="texto_anuncio" name="texto_anuncio"><?php echo $texto; ?></textarea>
<script type="text/javascript">
CKEDITOR.replace( 'texto_anuncio', { toolbar : [['Bold','Italic','Underline'], ['PasteText']], uiColor : '#89d7ee', language : 'es', forcePasteAsPlainText : true });
getvalue = function()
{
var editor = CKEDITOR.instances.texto_anuncio;
var value = editor.getData();
return value;
}
</script>

Y despues donde quieras contolar por JS si han rellnado el textarea, . . .
var texto_anuncio = getvalue();
alert(texto_anuncio);

Espero te sirva. Cualquier cosa comentalo