javascript - CodeMirror - load file on editor on page load -


i'd load inside codemirror editor local file on page load, i've tried using filerreader apis without success. tried use jquery .load() function can load file in generic textarea not in editor.

on page load wait data request complete before initializing codemirror

since jquery mentioned use example

$(function(){     $.get('path/to/codefile',  function(data){           $('textarea#editorid').val(data);           // init codemirror      })  }) 

Comments

Popular posts from this blog

testing - Detect whether test has failed within fixture -

AbotX : How do you create a parallel crawler that stays on and can be added to at run time from new requests -

android - Create single AAR file from multiple modules using Gradle -