
React marked highlight
This article was originally published on bmf-tech.com . I created a markdown editor using React instead of a WYSIWYG editor. Most of the source code was referenced from React入門 . Here's a rough gif sample (:3」∠) Environment React marked( github ) - Markdown parser highlight.js( highlightjs.org ) - Syntax highlighting bower - Used for managing all the above packages Preparation Install marked and highlight.js using bower bower install marked bower install highlightjs Please install each in your environment and set the paths. It's highlightjs, not bower install highlight. They seem to be different, and I got stuck for about an hour because I made this mistake... (cry) Implementation The HTML looks like this: index.html <!DOCTYPE html> <html> <head> <meta charset= "UTF-8" /> <title> Hello React! </title> <link href= "//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel= "stylesheet" > <link href= "path/to/monokai.css" rel= "stylesheet" > <link href= "path/to/style.css" r
Continue reading on Dev.to React
Opens in a new tab

