There is this trick around to turn the browser into a notepad by pasting a single line into the URL bar:
data:text/html,<html contenteditable>
Since the search function is excellent in most browsers (marks all occurrences of the searched word), this can be more useful than other simple editors like the default Windows 10 Editor.
To make it visually more appealing, you can add a title and style
attributes:
data:text/html,<title>Editor</title><html contenteditable style="background:Black;color:LightGray;font-family:monospace">
However when pasting text from the clipboard into the notepad, the text will be pasted as rich text and maintains the color and font from the source. This makes the text unreadable if the rich text color matches the background color. Is there a way to make the broweser notepad discard rich text formatting when pasting?
By not using <html contenteditable>
but <textarea>
instead, any text pasted from the clipboard will lose rich text attributes. The default font in <textarea>
already is monospace. The autofocus
attribute will automatically place the cursor in the <textarea>
. With a few style
attributes, this version of the one-line browser notepad looks equally visually appealing.
data:text/html,<title>Editor</title><style>body,textarea{background:Black;color:LightGray;width:100%;height:100%;margin:0;border:none;resize:none}</style><textarea autofocus>