Nerian / bootstrap-wysihtml5-rails

WYSIWYG editor for Bootstrap, integrated in Rails assets pipeline

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to add validation.

BlackRabbitt opened this issue · comments

I have integrated the editor to my description section of the form. Now I want to add the client side validation for presence: true. Can anyone help.

Found the solution by adding the events as suggested by the documentation

$('#some-textarea').wysihtml5({
    "events": {
        "load": function() { 
            console.log("Loaded!");
        },
        "blur": function() { 
            console.log("Blured");
        }
    }
});