Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I use the data URI in internet explorer as a URL?

The code I'm trying to use is

data:text/html,
<body contenteditable style="font: 2rem/1.5 monospace;
                             max-width:60rem;
                             margin:0 auto;
                             padding:4rem;">

I found it on a webiste. I'm suppose to just place it on the URL and hit enter but only for Chrome, Firefox and Opera. It won't work on IE. How can I make a notepad on IE?

More info: Im using a work pc and I can't access any website nor programs. No file explorer, right click context menu, only has IE.

like image 543
user3504902 Avatar asked Jun 07 '14 20:06

user3504902


1 Answers

You can try using the javascript engine to create a similar execution.


From the URL bar:

javascript:window.document.write('<body contenteditable style="font: 2em/1.5 monospace;max-width:60em;margin:0 auto;padding:4em;">');

If you copy and paste you will need to manually type javascript: in front of it since the browser trims that part of on paste.


If you want to execute a new window as an editor then try this:

<script>
    function myFunction() {
        var myWindow = window.open("", "MyEditorWindow");
        myWindow.document.write("<body contenteditable style=\"font: 2em/1.5 monospace;padding:40px;\">");
}
</script>

Check out this jsFiddle example

like image 72
Luis Avatar answered Oct 19 '22 05:10

Luis