dcsimg
www.webdeveloper.com
Results 1 to 2 of 2

Thread: HELP!!! Can't get values from several(on one page) CodeMirror

  1. #1
    Join Date
    Aug 2017
    Posts
    1

    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
    Can anyone faced this problem.
    All Internet rummaged, found nothing.
    Thanks in advance !

    PS.
    Have cm.save() ( http://codemirror.net/doc/manual.html#api_static )
    but how to attach to an indefinite count of fields in form : I do not understand

  2. #2
    Join Date
    Mar 2007
    Location
    localhost
    Posts
    4,800
    Moved to JavaScript Frameworks.
    --> JavaScript Frameworks like JQuery, Angular, Node <--
    ... and please remember to wrap code with forum BBCode tags:-

    [CODE]...[/CODE] [HTML]...[/HTML] [PHP]...[/PHP]

    If you can't think outside the box, you will be trapped forever with no escape...

Thread Information

Users Browsing this Thread

There are currently 3 users browsing this thread. (0 members and 3 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles