yakovlevga / brickyeditor

WYSIWYG block editor jQuery plugin.
MIT License
115 stars 20 forks source link

Consider new options: formSelector and inputSelector #8

Closed Hrumpa closed 6 years ago

Hrumpa commented 6 years ago

This can help to simplify the use of the editor inside forms. Not a big issue though. For now it is possible to assign value to the input like this:

ignoreHtml: true,
onload: function (editor) {
    $(formSelector).submit(function () {
        $(inputSelector).val(JSON.stringify(editor.getData()));
    });
}
yakovlevga commented 6 years ago

Thanks for idea! Will add in future releases.