Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@uiw/react-md-editor

Package Overview
Dependencies
Maintainers
1
Versions
206
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@uiw/react-md-editor

A markdown editor with preview, implemented with React.js and TypeScript.

  • 1.2.5
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
94K
decreased by-14.31%
Maintainers
1
Weekly downloads
 
Created
Source

A markdown editor with preview, implemented with React.js and TypeScript.

Install

npm i @uiw/react-md-editor

Using

import React from "react";
import ReactDOM from "react-dom";
import MEDitor from '@uiw/react-md-editor';

export default function App() {
  const [value, setValue] = React.useState("**Hello world!!!**");
  return (
    <div className="container">
      <MEDitor
        value={value}
        onChange={setValue}
      />
    </div>
  );
}

Props

  • value: string: The Markdown value.
  • onChange?: (value: string): Event handler for the onChange event.
  • commands?: ICommand[]: An array of ICommand, which, each one, contain a commands property. If no commands are specified, the default will be used. Commands are explained in more details below.
  • autoFocus?: number=true: Can be used to make Markdown Editor focus itself on initialization.
  • previewOptions?: ReactMarkdown.ReactMarkdownProps: This is reset react-markdown settings.
  • height?: number=200: The height of the editor.
  • visiableDragbar?: boolean=true: Show drag and drop tool. Set the height of the editor.
  • fullscreen?: boolean=false: Show markdown preview.
  • preview?: boolean=true: Show markdown preview.
  • maxHeight?: number=1200: Maximum drag height. The visiableDragbar=true value is valid.
  • minHeights?: number=100: Minimum drag height. The visiableDragbar=true value is valid.

Development

npm run watch # Listen compile .tsx files.
npm run build # compile .tsx files.

npm run doc

License

Licensed under the MIT License.

FAQs

Package last updated on 20 Aug 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc