/    Sign up×
Community /Pin to ProfileBookmark

HELP!!! Can’t get values from several(on one page) CodeMirror

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

[/CODE]

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[/url] )
but how to attach to an indefinite count of fields in form : I do not understand

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@rootAug 12.2017 — Moved to JavaScript Frameworks.
×

Success!

Help @okinadok spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...