get text from wp_editor in wordpress

0

I have a wp_editor and when I click send I call a javascript function that takes the titulo fields, and the wp_editor text.

<div class="form-group">
<?php
   wp_editor( $content,'id_contenido',array('textarea_name' => 
 'contenido','editor_class'=>'form-control'));?>
</div>

the issue is that I want to get the text written in the editor to send it to ajax and save it in the bd, but it gives me undefined or empty ... so I try to take it

$("#id_contenido").val();

Does anyone know why I always get empty? thanks

    
asked by Lucho 26.07.2018 в 18:23
source

0 answers