Skip to content
Open
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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>

If you want to read the code, check out [index.html](https://github.com/umpox/TinyEditor/blob/master/index.html)
data:text/html,<style>body{margin:0}[id]{width:33.33%;height:50%}#i{width: 100%}</style><body oninput="i.srcdoc=h.value+'<style>'+c.value+'</style><script>'+j.value+'</script>'"><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/ZweiZhao/TinyEditor/blob/master/index.html)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not make it relative? [index.html](./index.html)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

`./index.html is not 404 page?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thx, i have fixed.

16 changes: 4 additions & 12 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
<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>
<style>body{margin:0}[id]{width:33.33%;height:50%}#i{width: 100%}</style>
<body oninput="i.srcdoc=h.value+'<style>'+c.value+'</style><script>'+j.value+'</script>'">
<textarea placeholder=HTML id=h></textarea><textarea placeholder=CSS id=c></textarea><textarea placeholder=JS id=j></textarea>
<iframe id=i>