Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore.

15 St Margarets, NY 10033
(+381) 11 123 4567



Copy Rich Text As Markdown In React

An easy React hook that enables you to copy the selected rich text as markdown. Based on the turndown JavaScript library.

How to use it:

1. Install and import the react hook.

# Yarn
$ yarn add @cnakazawa/copy-as-markdown

$ npm i @cnakazawa/copy-as-markdown
import useCopyAsMarkdown from '@cnakazawa/copy-as-markdown';

2. Basic usage.

export default function MyComponent() {
  const setRef = useCopyAsMarkdown();
  return (
    <div ref={setRef}>
      <h1>Select To Copy</h1>

3. Customize the list marker and strong delimiter.

const setRef = useCopyAsMarkdown({
      bulletListMarker: '-',
      strongDelimiter: '__',


Copy Rich Text As Markdown In React

Download Details:

Author: cpojer

Live Demo: View The Demo

Download Link: Download The Source Code

Official Website: https://github.com/cpojer/copy-as-markdown

License: MIT

Credit: Source link

Previous Next
Test Caption
Test Description goes like this