title: Get the focused image element inside a contenteditable div
body: <p>I need to modify a pasted image inside a <code>contenteditable</code> div: resize it proportionately, add borders, etc... Perhaps this can be achieved by adding a <code>className</code> that will alter the necessary CSS properties.
  The problem is that I don't know how to reference the focused, i.e. the active, the clicked-upon image or any element for that matter.</p>
  
  <p>This is the HTML that I am trying to use</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  
  &lt;body&gt;
  
    &lt;div contenteditable="true"&gt;This is a div. It is editable. Try to change this text.&lt;/div&gt;
  
  &lt;/body&gt;
  
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>