1.7.0 • Published 6 days ago

@nance/nance-editor v1.7.0

Weekly downloads
-
License
MIT
Repository
github
Last release
6 days ago

Install

yarn add @nance/nance-editor

or

npm install @nance/nance-editor

Usage

import { MarkdownEditor } from '@nance/nance-editor';
import "@nance/nance-editor/lib/editor.css";

function App() {
  return (
    <div className="App">
      <p>NANCE-EDITOR DEMO</p>
      <MarkdownEditor
        onEditorChange={(md) => console.log(md)}
      />
    </div>
  );
}

export default App;

Optionally, pass in IPFS gateway and Infura projectId and projectSecret as props to the MarkdownEditor component. This allows the editor to upload images that are dropped into editor or ctrl-v'ed and .pdf's that are dropped into the editor to your IPFS gateway.

import { MarkdownEditor } from "@nance/nance-editor";
import "@nance/nance-editor/lib/editor.css";

function App() {
  const fileUploadIPFS = {
    gateway: "https://ipfs.io/ipfs/",
    projectId: "yourInfuraProjectId",
    projectSecret: "yourInfuraProjectSecret"
  };

  return (
    <div className="App">
      <p>NANCE-EDITOR DEMO</p>
      <MarkdownEditor fileUploadIPFS={fileUploadIPFS}/>
    </div>
  );
}

export default App;

see uploadBlob.ts for more details on upload to IPFS

and dropHandler.ts for more details on handling file drops

Development

yarn build

bundled by rollup

see rollup.config.js

1.6.2

7 days ago

1.7.0

6 days ago

1.6.1

7 days ago

1.6.0

7 days ago

1.5.0

10 days ago

1.4.0

2 months ago

1.3.0

2 months ago

1.2.0

2 months ago

1.1.0

2 months ago

1.0.0

7 months ago