Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

react-textarea-markdown

Chenjiayuan19571ISC1.1.3

a markdown with textarea editor for react

react, react-markdown, react-textarea, react-textarea-markdown, react-markdown-textarea, react-markdown-editor

readme

react-textarea-markdown

A simpler react-markdown

Install

npm i react-textarea-markdown

For example

import React, { Component } from "react";
import Markdown from "react-textarea-markdown";
class App extends Component {
  render () {
    return (
      <div className="App">
    <Markdown textarea={true} customWidth={[50,50]} callback={func} source={value}/>
      </div>
    );
  }
}

Support property

property type effect
textarea bool Display is built into textarea
source string External to data sources
callback func Get the value of the real time return of the internal textarea
customWidth array Customize the width of textarea and markdown, of which 0 represents markdown 1 for textarea

Support grammar

  • <input checked="" disabled="" type="checkbox"> Title
  • <input checked="" disabled="" type="checkbox"> Checkbox
  • <input checked="" disabled="" type="checkbox"> Table
  • <input checked="" disabled="" type="checkbox"> Code
  • <input checked="" disabled="" type="checkbox"> List
  • <input checked="" disabled="" type="checkbox"> Font Style
  • <input checked="" disabled="" type="checkbox"> Quote
  • <input checked="" disabled="" type="checkbox"> Segmenting line
  • <input checked="" disabled="" type="checkbox"> Image
  • <input checked="" disabled="" type="checkbox"> Hyperlink

Why do you choose it?

  • Can be used to render markdown alone
  • Bring the textarea editor
  • A more flexible layout
  • Real-time Preview
  • Closer to the encoding style of vscode
  • Real time back propagation of internal textarea data
  • Easy to use