text: // open editor url in a new window, and pass a message
  module.exports = function(window, url, data) {
    var editor = window.open(url),
        wait = 10000,
        step = 250,
        count = ~~(wait/step);
  
    function listen(evt) {
      if (evt.source === editor) {
        count = 0;
        window.removeEventListener('message', listen, false);
      }
    }
    window.addEventListener('message', listen, false);
  
    // send message
    // periodically resend until ack received or timeout
    function send() {
      if (count <= 0) return;
      editor.postMessage(data, '*');
      setTimeout(send, step);
      count -= 1;
    }
    setTimeout(send, step);
  };
  