Mark Down Previewer

Developer
Size
3,062 Kb
Views
6,072

How do I make an mark down previewer?

What is a mark down previewer? How do you make a mark down previewer? This script and codes were developed by Jimmy Lin on 11 December 2022, Sunday.

Mark Down Previewer Previews

Mark Down Previewer - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Mark Down Previewer</title> <meta name="viewport" content="device-width, initial-scale=1"> <link rel='stylesheet prefetch' href='https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css'> <link rel="stylesheet" href="css/style.css">
</head>
<body> <body> <div class="container"> <div class="render-target"></div> </div>
</body> <script src='https://cdnjs.cloudflare.com/ajax/libs/react/15.3.1/react.min.js'></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/react/15.3.1/react-dom.min.js'></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/marked/0.3.6/marked.min.js'></script> <script src="js/index.js"></script>
</body>
</html>

Mark Down Previewer - Script Codes CSS Codes

body { margin: 20px;
}

Mark Down Previewer - Script Codes JS Codes

"use strict";
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var App = function (_React$Component) { _inherits(App, _React$Component); function App(props) { _classCallCheck(this, App); var _this = _possibleConstructorReturn(this, _React$Component.call(this, props)); _this.state = { markdown: "" }; return _this; } App.prototype.handleChange = function handleChange(event) { this.setState({ markdown: event.target.value }); }; App.prototype.render = function render() { return React.createElement( "div", { className: "row" }, React.createElement( "div", { className: "col-xs-6" }, React.createElement( "h1", null, " Markdown " ), React.createElement("textarea", { onChange: this.handleChange.bind(this), value: this.state.markdown, rows: "10", style: { width: "300" } }) ), React.createElement( "div", { className: "col-xs-6" }, React.createElement( "h1", null, " Preview " ), React.createElement("div", { dangerouslySetInnerHTML: { __html: marked(this.state.markdown) } }) ) ); }; return App;
}(React.Component);
ReactDOM.render(React.createElement(App, null), document.querySelector('.render-target'));
Mark Down Previewer - Script Codes
Mark Down Previewer - Script Codes
Home Page Home
Developer Jimmy Lin
Username odylic
Uploaded December 11, 2022
Rating 3
Size 3,062 Kb
Views 6,072
Do you need developer help for Mark Down Previewer?

Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!

Jimmy Lin (odylic) Script Codes
Create amazing marketing copy with AI!

Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!