UNPKG

medium-draft

Version:

A medium like rich text editor built upon draft-js with an emphasis on eliminating mouse usage by adding relevant keyboard shortcuts

65 lines (62 loc) 1.56 kB
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Rendered Content | medium-draft</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <style> body { font-family: CustomSerif,Georgia,Cambria,'Times New Roman',serif; margin: 0; padding: 0; font-size: 16px; } .content { max-width: 600px; margin: 0 auto; } </style> </head> <body> <div id="content" class="content"> <p> Open this page by clicking the <strong>Render HTML</strong> button. </p> </div> <script src="/static/common.js"></script> <script src="/static/vendor-react.js"></script> <script src="/static/basic.js"></script> <script> function getScript() { var script = document.createElement('script'); script.async = 1; script.src = '//cdn.embedly.com/widgets/platform.js'; script.onload = () => { window.embedly(); }; document.body.appendChild(script); } window.addEventListener('message', function(e) { if (typeof e.data === 'object') { return; } if (typeof e.data === 'string') { try { JSON.parse(e.data); return; } catch (ex) { if (e.data.indexOf('webpackHot') === 0) { return; } document.getElementById('content').innerHTML = e.data; if (window.embedly) { window.embedly(); } else { getScript(); } } } }); </script> </body> </html>