Created
May 22, 2020 20:07
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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