From a8e8f9cf3b5600c49b59aa4343024a09c577a70a Mon Sep 17 00:00:00 2001 From: LoganDark <logandarklock@gmail.com> Date: Mon, 13 Aug 2018 15:04:26 -0700 Subject: [PATCH 1/2] Use template string --- index.html | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/index.html b/index.html index 7c6b509..53ffce7 100644 --- a/index.html +++ b/index.html @@ -1,6 +1,5 @@ <body - oninput="i.srcdoc=h.value+'<style>'+c.value+ - '</style><script>'+j.value+'<\/script>'"> + oninput="i.srcdoc=`{h.value}<style>{c.value}</style><script>{j.value}</script>`"> <style> textarea,iframe{width:100%;height:50%} body{margin:0} @@ -9,4 +8,4 @@ <textarea placeholder=HTML id=h></textarea> <textarea placeholder=CSS id=c></textarea> <textarea placeholder=JS id=j></textarea> - <iframe id=i> \ No newline at end of file + <iframe id=i> From 4f216e74851ab36037de089bd096896151ca22bc Mon Sep 17 00:00:00 2001 From: LoganDark <logandarklock@gmail.com> Date: Mon, 13 Aug 2018 15:05:11 -0700 Subject: [PATCH 2/2] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 388387c..a726b35 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,6 @@ Paste the following code into your browser address bar: - data:text/html,<body oninput="i.srcdoc=h.value+'<style>'+c.value+'</style><script>'+j.value+'</script>'"><style>textarea,iframe{width:100%;height:50%}body{margin:0}textarea{width:33.33%;font-size:18}</style><textarea placeholder=HTML id=h></textarea><textarea placeholder=CSS id=c></textarea><textarea placeholder=JS id=j></textarea><iframe id=i> + data:text/html,<body oninput="i.srcdoc=`{h.value}<style>{c.value}</style><script>{j.value}</script>`"><style>textarea,iframe{width:100%;height:50%}body{margin:0}textarea{width:33.33%;font-size:18}</style><textarea placeholder=HTML id=h></textarea><textarea placeholder=CSS id=c></textarea><textarea placeholder=JS id=j></textarea><iframe id=i> If you want to read the code, check out [index.html](https://github.com/umpox/TinyEditor/blob/master/index.html)