code: function drawImage(editor) {
  	var cm = editor.codemirror;
  	var stat = getState(cm);
  	var options = editor.options;
  	var url = "http://";
  	if(options.promptURLs) {
  		url = prompt(options.promptTexts.image);
  		if(!url) {
  			return false;
  		}
  	}
  	_replaceSelection(cm, stat.image, options.insertTexts.image, url);
  }
docs: Action for drawing an img.