@davidilie/markdown-editor
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

Markdown Editor

yarn add @davidilie/markdown-editor

Info

This is an extended project on top of https://github.com/nijat13/rich-markdown-editor which is extended on top of https://github.com/outline/rich-markdown-editor and is in my opinion the perfect markdown editor for projects.

What I changed

Most functionalities are the same, I just modified some margins and type errors so that it works well with my different projects.

Usage

You can see the storybook here or see a basic example below:

Next.JS

import dynamic from "next/dynamic";
import React, { useState, Suspense } from "react";

const Editor = dynamic(() => import("@davidilie/markdown-editor"), {
   ssr: false,
});

const Component: React.FC = () => {
   const [val, setVal] = useState("Hello World!");
   return (
      <Suspense fallback={<p>Loading...</p>}>
         <Editor
            defaultValue={val}
            onChange={(markdown) => setVal(markdown())}
         />
      </Suspense>
   );
};

export default Component;

create-react-app

import React, { useState } from "react";

import Editor from "@davidilie/markdown-editor";

const Component: React.FC = () => {
   const [val, setVal] = useState("Hello World!");
   return (
      <Editor defaultValue={val} onChange={(markdown) => setVal(markdown())} />
   );
};

export default Component;

Readme

Keywords

Package Sidebar

Install

npm i @davidilie/markdown-editor

Weekly Downloads

0

Version

1.0.3

License

ISC

Unpacked Size

769 kB

Total Files

500

Last publish

Collaborators

  • davidilie