function drawImage(editor) {
	var cm = editor.codemirror;
	var stat = getState(cm);
	var options = editor.options;
	if(editor.onAddImage) {
		return editor.onAddImage(function(url) {
			_replaceSelection(cm, getState(cm).image, options.insertTexts.image, url);
		});
	}
	_replaceSelection(cm, stat.image, options.insertTexts.image, "http://");
}
/**
 * Action for drawing an img.
 */
Action for drawing an img.
Action for drawing an img .
function drawImage(editor) {
	var cm = editor.codemirror;
	var stat = getState(cm);
	var options = editor.options;
	if(editor.onAddImage) {
		return editor.onAddImage(function(url) {
			_replaceSelection(cm, getState(cm).image, options.insertTexts.image, url);
		});
	}
	_replaceSelection(cm, stat.image, options.insertTexts.image, "http://");
}
function drawImage ( editor ) { var cm = editor . codemirror ; var stat = getState ( cm ) ; var options = editor . options ; if ( editor . onAddImage ) { return editor . onAddImage ( function ( url ) { _replaceSelection ( cm , getState ( cm ) . image , options . insertTexts . image , url ) ; } ) ; } _replaceSelection ( cm , stat . image , options . insertTexts . image , "http://" ) ; }
Action for drawing an img.
Action for drawing an img .