logo

demo

Unnamed repository; edit this file 'description' to name the repository. git clone https://hacktivis.me/git/demo.git

index.html (1081B)


  1. <!DOCTYPE html>
  2. <html lang=en>
  3. <head>
  4. <meta charset="utf-8"/>
  5. <title>Vanilla Editor — Web demos</title>
  6. <link rel="stylesheet" href="../common.css"/>
  7. <link rel="stylesheet" href="./vanilla-editor.css"/>
  8. </head>
  9. <body>
  10. <header title="I hope there is not actually that much dead code online…">
  11. <pre><strong>BORN TO DIE()</strong>
  12. WORLD IS A `FSCK`
  13. 鬼神 Kill Em All 1989
  14. I am trash main()
  15. 410,757,864,530 DEAD CODES</pre>
  16. </header>
  17. <nav><a rel="up" href="..">Demos Homepage</a></nav>
  18. <main>
  19. <h1>Vanilla Editor</h1>
  20. <h2>Source-code edition mode</h2>
  21. <textarea id="content_source" placeholder="HTML code goes here" width="100%"></textarea>
  22. <h2>Rich-text edition mode</h2>
  23. <div contenteditable="true" id="content_view" autofocus="true"></div>
  24. <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>
  25. <script src="./vanilla-editor.js"></script>
  26. </main>
  27. </style>
  28. </body>