Skip to content

Instantly share code, notes, and snippets.

@mortalis13
Last active February 8, 2021 16:33
Show Gist options
  • Select an option

  • Save mortalis13/e4c46bb24ae5c6a07f79b4cb2104b26a to your computer and use it in GitHub Desktop.

Select an option

Save mortalis13/e4c46bb24ae5c6a07f79b4cb2104b26a to your computer and use it in GitHub Desktop.
data:text/html,<html><head><title>EDIT window</title></head><body onload="document.body.contentEditable='true';" onclick="if(event.shiftKey){this.contentEditable='false';this.innerHTML=this.innerHTML.replace(/(<\/a>)/ig,'$1<br>');event.preventDefault();}" height="99%" width="100%"></body></html>

Using the data: protocol, the snippet creates an inline page with HTML/JS code. Can be used as a bookmark. Shift+Click disables the contentEditable mode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment