index.html (1081B)
- <!DOCTYPE html>
- <html lang=en>
- <head>
- <meta charset="utf-8"/>
- <title>Vanilla Editor — Web demos</title>
- <link rel="stylesheet" href="../common.css"/>
- <link rel="stylesheet" href="./vanilla-editor.css"/>
- </head>
- <body>
- <header title="I hope there is not actually that much dead code online…">
- <pre><strong>BORN TO DIE()</strong>
- WORLD IS A `FSCK`
- 鬼神 Kill Em All 1989
- I am trash main()
- 410,757,864,530 DEAD CODES</pre>
- </header>
- <nav><a rel="up" href="..">Demos Homepage</a></nav>
- <main>
- <h1>Vanilla Editor</h1>
- <h2>Source-code edition mode</h2>
- <textarea id="content_source" placeholder="HTML code goes here" width="100%"></textarea>
- <h2>Rich-text edition mode</h2>
- <div contenteditable="true" id="content_view" autofocus="true"></div>
- <p><a href="./vanilla-editor.js">JavaScript code used for this</a>, the trick is to use the HTML <code>contenteditable</code> attribute. I would recommend keeping <code>textarea</code> not only for advanced editions but also as a fallback.</p>
- <script src="./vanilla-editor.js"></script>
- </main>
- </style>
- </body>