New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

react-split-mde

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-split-mde

![](https://github.com/steelydylan/react-split-mde/workflows/Node%20CI/badge.svg) [![npm version](https://badge.fury.io/js/react-split-mde.svg)](https://badge.fury.io/js/react-split-mde) [![npm download](http://img.shields.io/npm/dm/react-split-mde.svg)](

latest
npmnpm
Version
0.3.5
Version published
Maintainers
1
Created
Source

React Split MDE

npm version npm download GitHub license Tweet

React Split MDE is a Markdown Editor which enables you to write contents smoothly even with a large amount of content.

Firefox
Firefox
Chrome
Chrome
Safari
Safari
iOS Safari
iOS Safari

ScreenShot

Not Yet

Features

  • Fully customizable
  • Synced scroll position across the contents and the preview
  • No stress writing even with a large amount of content

Install

You should also import zenn-markdown-html as peer dependencies

$ npm install react-split-mde zenn-markdown-html --save

Usage

import React, { useCallback, useState } from 'react';
import { render } from 'react-dom';
import { Editor, useProvider } from 'react-split-mde';
import { parser } from 'react-split-mde/lib/parser';
import 'react-split-mde/css/index.css';

const MDE = () => {
  const [markdown, setMarkdown] = useState('')
  const handleValueChange = useCallback((newValue: string) => {
    setMarkdown(newValue);
  }, []);

  return (
    <Editor
      parser={parser}
      value={markdown}
      onChange={handleValueChange}
    />
  )
}

render(<MDE />, document.getElementById("app"));

Try it on CodeSandbox

Not yet...

Props

PropsDescriptionTypeDefault
commandskey bindsRecord< string, Command>;
previewClassNameclass name to be applied to preview area"znc"
previewCallbackmorphdom callbacks to be applied to preview areaRecord<string, Function>{}
parsermarkdown parser function( text : string ) => Promise <string>
valuemarkdownstring""
onChangecallback when markdown changed( value : string ) => void
psudoModehighlight markdown area with highlight.jsbooleanfalse
debounceTimedebounced time to apply markdown result to preview areanumber3000

Download

Download ZIP

Github

https://github.com/steelydylan/react-split-mde

Contributor

@steelydylan

License

Code and documentation copyright 2020 by steelydylan, Inc. Code released under the MIT License.

FAQs

Package last updated on 07 Jul 2021

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