Skip to content
This repository was archived by the owner on Mar 22, 2025. It is now read-only.

richmd/richmd-react

Repository files navigation

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

Name Description
text To parse HTML set Markdown text.
id It set id.
className It set ClassName.

License

MIT

About

No description or website provided.

Topics

Resources

License

Stars

0 stars

Watchers

1 watching

Forks

Packages

 
 
 

Contributors