Skip to content

Instantly share code, notes, and snippets.

@jakedowns
Created May 22, 2020 20:07
Show Gist options
  • Save jakedowns/b3f9a90de1182af083024e037e3ac42f to your computer and use it in GitHub Desktop.
Save jakedowns/b3f9a90de1182af083024e037e3ac42f to your computer and use it in GitHub Desktop.
Example of How to Programmatically Update EasyMDE/CodeMirror/Simple Editor Input Value for Integration & Acceptance Testing
// Ghost Inspector Hooks
window.ezmde_editors = window.ezmde_editors || [];
window.ezmde_editors[this.name] = new EasyMDE(/* ... */);
// Set Value Programmatically
Object.keys(window.ezmde_editors).forEach((k,i)=>{
window.ezmde_editors[k].value('my test value');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment