0.3.0 • Published 3 months ago

richmd-react v0.3.0

Weekly downloads
-
License
MIT
Repository
github
Last release
3 months ago

Richmd React

NPM npm NPM

Install

yarn add richmd richmd-react

Usage

It use Richmd component`.

import React, { useState } from 'react';
import { render } from 'react-dom';
import { Richmd } from "richmd-react";
import 'richmd/richmd.css';

const Editor = () => {
  const [text, setMarkdown] = useState('');

  return (
    <>
      <form id="post-form">
        <div id="editor">
          <textarea className="textField" spellCheck="false" onChange={(e) => setMarkdown(e.target.value)}></textarea>
        </div>
        <div id="preview">
          <Richmd className="preview" text={text} />
        </div>
      </form>
    </>
  )
}

render(<Editor />, document.getElementById('root'))

Props

NameDescription
textTo parse HTML set Markdown text.
idIt set id.
classNameIt set ClassName.

License

MIT

0.3.0

3 months ago

0.2.5

7 months ago

0.2.1

2 years ago

0.2.0

2 years ago

0.2.3

2 years ago

0.2.2

2 years ago

0.2.4

2 years ago

0.1.0

2 years ago

0.0.1

2 years ago