React Markdown Previewer
How do I make an react markdown previewer?
What is a react markdown previewer? How do you make a react markdown previewer? This script and codes were developed by Codoer on 07 December 2022, Wednesday.
React Markdown Previewer - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>React Markdown Previewer</title> <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> <div class="container-fluid" id='app'></div> <script src='https://cdnjs.cloudflare.com/ajax/libs/marked/0.3.6/marked.min.js'></script>
<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/jquery/3.1.0/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
React Markdown Previewer - Script Codes CSS Codes
body { padding: 4%;
}
.row textarea { height: 100%; width: 100%; resize: both;
}
React Markdown Previewer - Script Codes JS Codes
'use strict';
var Markdown = React.createClass({ displayName: 'Markdown', getInitialState: function getInitialState() { var original = '# Markdown Previewer\n\n## Sub-heading\n\n### Another deeper heading\n\nTwo spaces at the end of a line leave a line break.\n\nText attributes _italic_, *italic*, __bold__, **bold**, `monospace`, ~~strikethrough~~ .\n\nHorizontal rule:\n\n---\n\nBullet list:\n\n * item1\n * item2\n * item3\n\nNumbered list:\n\n 1. item1\n 2. item2\n 3. item3\n\nA [link](http://example.com).'; return { text: original }; }, loadMark: function loadMark() { var mark = marked(this.state.text); return { __html: mark }; }, handleChange: function handleChange(e) { var change = e.target.value; this.setState({ text: change }); }, render: function render() { return React.createElement( 'div', { className: 'row' }, React.createElement( 'div', { className: 'col-md-6', id: 'left' }, React.createElement( 'textarea', { rows: '30', onChange: this.handleChange }, this.state.text ) ), React.createElement( 'div', { className: 'col-md-6', id: 'right' }, React.createElement('div', { dangerouslySetInnerHTML: this.loadMark() }) ) ); }
});
ReactDOM.render(React.createElement(Markdown, null), document.getElementById('app'));
Developer | Codoer |
Username | c0d0er |
Uploaded | December 07, 2022 |
Rating | 3 |
Size | 3,190 Kb |
Views | 8,096 |
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!
Name | Size |
Calculator | 3,530 Kb |
Visualize Data with a Scatterplot Graph | 6,834 Kb |
Nikola Tesla Tribute Page | 3,263 Kb |
Visualize Data with a Heat Map | 6,445 Kb |
Visualize National Contiguity with a Force Directed Graph | 5,906 Kb |
React photo carousel | 2,500 Kb |
Pomodoro positions | 2,182 Kb |
Random Quote Machine | 2,411 Kb |
Perseverance Portfolio | 2,756 Kb |
React Recipe Box | 8,637 Kb |
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!
Name | Username | Size |
Flat buttons for Eliassen.com | Kdooley89 | 1,737 Kb |
Formations | Cantelope | 5,731 Kb |
Fading gradient button | Insprd | 1,713 Kb |
Social.svg.min | Larsenwork | 13,849 Kb |
CSS Tooltips | Darylldoyle | 2,599 Kb |
Material design - button rainbow circle | Kunukn | 3,652 Kb |
Page Transitions in Backbone | Mikefowler | 3,691 Kb |
Personal Logo Animation | Lloydwheeler | 3,795 Kb |
Starfield old school style | Bolloxim | 5,214 Kb |
Snow collision | Wojtek1150 | 3,542 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!