Bueno amigos tengo un problema que ya siento que me la gano por completo. Les cuento tengo esta funcion para ver el largo de un campo.
Código Javascript
:
Ver original//validacion de largo de texto en un campo
function checkTextBox(idCadena,largoMin,idError){
var campo = $("#"+idCadena).val();
if(campo.length >= largoMin){
$("#"+idError).hide();
return true;
}else{
$("#"+idError).show();
//alert(campo.length);
return false;
}
}
y bueno tengo un textarea pero OJO lo tengo con
tinyMCE con la siguiente configuracion:
Código Javascript
:
Ver originaltinyMCE.init({
mode : 'exact',
elements: 'descripcion',
theme : "advanced",
theme_advanced_buttons1 : "bold,italic,underline,separator,strikethrough,justifyleft,justifycenter,justifyright, justifyfull,bullist,numlist,undo,redo,link,unlink,formatselect,fontselect,fontsizeselect, code",
theme_advanced_buttons2 : "",
theme_advanced_buttons3 : "",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
width: '680px',
height: '300px',
remove_linebreaks : true,
remove_redundant_brs : true,
cleanup_on_startup : true,
force_br_newlines : false,
force_p_newlines : false,
forced_root_block : '', // Needed for 3.x
theme_advanced_resizing : true,
theme_advanced_resize_horizontal : false,
dialog_type : 'modal',
relative_urls : false,
remove_script_host : false,
convert_urls : false,
apply_source_formatting : false,
remove_linebreaks : true,
paste_convert_middot_lists : true,
paste_remove_spans : true,
paste_remove_styles : true,
gecko_spellcheck : true,
entities : '38,amp,60,lt,62,gt',
accessibility_focus : false
});
y bueno el textarea esta de la siguiente manera.
Ahora cuando ejecuto la funcion y le caso los "//" al alert me da 0, si al campo le saco el tinyMCE devuelve el valor real.
la pregunta
¿como puedo validar el largo del campo pero con tinyMCE?
Gracias :)