All Projects → jrm2k6 → React Markdown Editor

jrm2k6 / React Markdown Editor

Licence: mit
A markdown editor using React/Reflux

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to React Markdown Editor

Tslide
Terminal SlideDeck, supporting markdown.
Stars: ✭ 198 (-5.26%)
Mutual labels:  markdown
Vditor
♏ 一款浏览器端的 Markdown 编辑器,支持所见即所得(富文本)、即时渲染(类似 Typora)和分屏预览模式。An In-browser Markdown editor, support WYSIWYG (Rich Text), Instant Rendering (Typora-like) and Split View modes.
Stars: ✭ 3,773 (+1705.26%)
Mutual labels:  markdown
Scroll
Static publishing software with a newspaper feel built on Tree Notation. Scroll is public domain software.
Stars: ✭ 206 (-1.44%)
Mutual labels:  markdown
Bullets.vim
🔫 Bullets.vim is a Vim/NeoVim plugin for automated bullet lists.
Stars: ✭ 199 (-4.78%)
Mutual labels:  markdown
Portfolioexamples
(Resource List) - Portolio sites for inspiration and comparison
Stars: ✭ 201 (-3.83%)
Mutual labels:  markdown
Symphony
🎶 一款用 Java 实现的现代化社区(论坛/BBS/社交网络/博客)平台。
Stars: ✭ 13,080 (+6158.37%)
Mutual labels:  markdown
Database
EhTagTranslation 项目的翻译数据。
Stars: ✭ 197 (-5.74%)
Mutual labels:  markdown
Markdown Css
🗒️ A style sheet for Markdown
Stars: ✭ 206 (-1.44%)
Mutual labels:  markdown
Reveal Ck
Create slides with ruby (and usually in markdown)
Stars: ✭ 202 (-3.35%)
Mutual labels:  markdown
Kobito Oss
Markdown Processor built on Electron based on kobito-for-windows
Stars: ✭ 205 (-1.91%)
Mutual labels:  markdown
Markdown Link Check
checks that all of the hyperlinks in a markdown text to determine if they are alive or dead
Stars: ✭ 198 (-5.26%)
Mutual labels:  markdown
Jekyll Spaceship
🚀 A Jekyll plugin to provide powerful supports for table, mathjax, plantuml, mermaid, emoji, video, audio, youtube, vimeo, dailymotion, soundcloud, spotify, etc.
Stars: ✭ 196 (-6.22%)
Mutual labels:  markdown
Solo
🎸 一款小而美的博客系统,专为程序员设计。
Stars: ✭ 13,245 (+6237.32%)
Mutual labels:  markdown
Swagger2markup
A Swagger to AsciiDoc or Markdown converter to simplify the generation of an up-to-date RESTful API documentation by combining documentation that’s been hand-written with auto-generated API documentation.
Stars: ✭ 2,330 (+1014.83%)
Mutual labels:  markdown
Remove Markdown
Strip Markdown stuff from text
Stars: ✭ 206 (-1.44%)
Mutual labels:  markdown
Evernote2md
Convert Evernote .enex files to Markdown
Stars: ✭ 193 (-7.66%)
Mutual labels:  markdown
Codebraid
Live code in Pandoc Markdown
Stars: ✭ 204 (-2.39%)
Mutual labels:  markdown
Vue Blog
🎉 基于vue全家桶 + element-ui 构建的一个后台管理集成解决方案
Stars: ✭ 208 (-0.48%)
Mutual labels:  markdown
Markdownui
Render Markdown text in SwiftUI
Stars: ✭ 207 (-0.96%)
Mutual labels:  markdown
Parsedown
Better Markdown Parser in PHP
Stars: ✭ 13,959 (+6578.95%)
Mutual labels:  markdown

react-markdown-editor

A markdown editor using React/Reflux.

Build Status Code Climate License Latest Version Total Downloads

##TLDR Demo here: http://jrm2k6.github.io/react-markdown-editor/

Installation

npm install --save react-markdown-editor or yarn add react-markdown-editor

Features

From the UI:

  • Bold
  • Italic
  • Header
  • Subheader
  • Link
  • Unordered List
  • Inline Images

Of course it is a regular markdown editor (using the nice markdown-js library), so you are not limited to the UI.

Usage

To render the component:

var React = require('react');
var MarkdownEditor = require('react-markdown-editor').MarkdownEditor;

var TestComponent = React.createClass({
	render: function() {
		return (
			<MarkdownEditor initialContent="Test" iconsSet="font-awesome"/>
		);
	}
});

React.render(<TestComponent />, document.getElementById('content'));

<MarkdownEditor /> takes two required props:

- initialContent which is the text you want the textarea to contain on initialization.
- iconsSet which is the icons provider you want to use. It can either be font-awesome or materialize-ui

Optional props:

  • onContentChange, function to be called on each content change, getting the new content as an argument (as the property name says!)
  • styles, see Styling below

You can also listen to content changes on the editor. If you are using Reflux, by listening to the changes on MarkdownEditorContentStore. To be able to do so, just require('react-markdown-editor').MarkdownEditorContentStore;

Dependencies

You can modify the styles directly by modifying the styles declared in dist/MarkdownEditor.js. The pre-existing styles assume that you are using Bootstrap and Font Awesome.

Styling

<MarkdownEditor /> is styled using React's inline styling and can be styled by supplying a styles prop. The following keys are used to style each component, below are their default values:

- styleMarkdownEditorHeader : 
	- display: 'flex'
	- flexDirection: 'column'
	- borderBottom: '1px solid #ddd'
	- marginLeft: '0px'
	- marginRight: '0px'
	- minHeight: '50px'
	- justifyContent: 'center'
	- position: 'relative'
- styleMarkdownEditorContainer :
	- display: 'flex'
	- flexDirection: 'column'
	- marginTop: '2px'
	- paddingTop: '10px'
	- border: '1px solid #ddd'
	- backgroundColor: '#f7f7f7'
- styleMarkdownMenu :
	- margin: '5px 0'
	- flex: '1'
	- display: 'flex'
	- position: 'absolute'
	- right: '20px'
	- top: '10px'
- styleMarkdownTextArea : 
	- height: '90%'
	- width: '100%'
	- padding: '30px 10px'
	- border: 'none'
- styleMarkdownPreviewArea : 
	- height: '90%'
	- width: '100%'
	- padding: '30px 10px'
	- backgroundColor: '#fff'
	- border: 'none'
- styleMarkdownEditorTabs : 
	- border: 'none'
	- display: 'flex'
	- justifyContent: 'flex-start'
- styleTab :
	- padding: '0px 20px'
	- cursor: 'pointer'
	- display: 'flex'
	- justifyContent: 'center'
	- alignItems: 'center'
	- height: '50px'
- styleActiveTab :
	- padding: '0px 20px'
	- cursor: 'pointer'
	- display: 'flex'
	- justifyContent: 'center'
	- alignItems: 'center'
	- height: '50px'
	- borderLeft: '1px solid #ddd'
	- borderRight: '1px solid #ddd'
	- borderTop: '1px solid #ddd'
	- backgroundColor: '#fff'
	- borderRadius: '3px'

TODO

  • [ ] Cross-browsers testing
  • [ ] Move to Redux

Example

cd Example
npm install
webpack
open index.html

Issues/Contribution

You can open an issue on the github repo, or contact me directly by email.

Help

Please, if you are using this package, let me know. I am interested to know what you think of it, even if it was on a tiny side-project.

Screenshots

Editing tab Editing tab with custom styles Preview tab

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].