Hello everyone, I put them in context: I have a textarea to which I found myself in need of adding a plugin in Jquery because I had to add functions of a WYSIWYG editor. The functions were basic, such as: Bold, italics and lists (to say an example), and on the internet I found this plugin called: Easy editor link
I have my textarea like that, I just added the ID so that the jquery code works, leaving the HTML as follows:
<textarea class="form-control" id="infoadicional" name="infoadicional" placeholder="Escribe algunas líneas sobre ti." value="hola" rows="11" maxlength="2000" ><?php echo $variable ?></textarea>
As you can see, that HTML code already has the maxlength attribute, however it does not work, and with good reason, when reviewing the code, I notice that the plugin is adding another div being in the following way:
Following my basic knowledge, I use the following code to avoid that the DIV element allows writing more characters once the limit is reached. But unfortunately it does not work :(
$('.easyeditor').keyup(function() {
if ( $(this).val.length > 2000) {
return false;
}
});
Everything to get an editor like this:
Is anyone familiar with the subject able to help me please?