JSFiddle - React, Tailwind, and code Playground

Check if base64

by Dave

HTML

<div id="MainDiv" contenteditable="true"><p>222zxcxzcxzc<img src="https://www.gravatar.com/avatar/50d6f954cbf5f65d85d6f093271ea2a2?s=32&d=identicon&r=PG"></p></div>

JavaScript

//$('img:not([src^="data:image"])').each(function(i){
//alert('image not base64');
//});

//the above code dose not work in ie

$('img').each(function(i){
      var imgSrc = this.src;
      var siteURL = "data:image";

  if(imgSrc.indexOf(siteURL) === -1){
     alert('image not base64');
  }
});