Menu
Hello!
Can’t get values from several(on one page) CodeMirror
[CODE]
// 1. displaying more than one CodeMirror on the page
$(‘textarea’).each(function (index, elem) {
CodeMirror.fromTextArea(elem, {
lineNumbers: true
});
});
// 2. click of a button, get a form
$( “button” ).click(function() {
data = $(‘form’).serialize();
});
// 3. in the data no value from CodeMirror
Can anyone faced this problem.
All Internet rummaged, found nothing.
Thanks in advance !
PS.
Have cm.save() ( [url]http://codemirror.net/doc/manual.html#api_static
but how to attach to an indefinite count of fields in form : I do not understand