code: function convertToDataUrl(editor, url, range) {
  	return locateFile(editor, url)
  	.then(fileName => {
  		return readFile(fileName)
  		.then(contents => {
  			const ext = path.extname(fileName).slice(1);
  			const dataUrl = `data:${mimeTypes[ext] || defaultMimeType};base64,${contents.toString('base64')}`;
  
  			editor.transact(() => editor.setTextInBufferRange(range, dataUrl));
  
  			return dataUrl;
  		});
  	});
  }
docs: Converts file, located by `src` argument, to data:URL string
  @param  {TextEditor} editor
  @param  {String}     url    File URL, either absolute or relative to editor’s file
  @param  {Range}      range  Editor’s replacement where converted data:URL should
  be written
  @return {Promise}