npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@sonwonjae/react-markdownarea

v1.1.1

Published

react markdownarea

Downloads

1

Readme

react-markdownarea

Getting Started

npm i @sonwonjae/react-markdownarea

Adding Markdownarea

import { Markdownarea } from '@sonwonjae/react-markdownarea';

export default function Component() {
	const [value, setValue] = useState('');

	return (
		<Markdownarea
			value={value}
			onChange={(e) => {
				setValue(e.target.value);
			}}
			onKeyDown={(e) => {
				setValue(e.currentTarget.value);
			}}
		/>
	);
}

What is Markdownarea?

Markdownarea is just textarea.

but you can use textarea with markdown syntax

This is the syntax supported by Markdownarea.

Element Markdown Syntax

| Element | Markdown Syntax | Shortcut | | :-------------- | :------------------------------- | :----------- | | Heading 1 | # H1 | - | | Heading 2 | ## H2 | - | | Heading 3 | ### H3 | - | | Bold | **bold text** | CMD/CTRL + B | | Italic | *italicized text* | CMD/CTRL + I | | Bold-Italic | ***bold italicized text*** | - | | Blockquote | > blockquote | - | | Ordered List | 1. First item | - | | Unordered List | - First item | - | | Code | code | CMD/CTRL + E | | Horizontal Rule | --- | - | | Link | title | CMD/CTRL + K | | Image | empty image | - |

Extended Syntax

| Element | Markdown Syntax | Shortcut | | :------------ | :-------------------------- | :----------- | | Code Block | ``` ... ``` | - | | Strikethrough | ~~strike through text~~ | CMD/CTRL + D | | Task List | - [ ] task item | - | | Highlight | ==highlight text== | - |

ref: Markdown Guide

Special Action

Blockquote

  • tab

    // 1. make blockquote
    > content
    
    // 2. press tab key
    >> content
    
    // 3. press tab key
    >>> content
  • shift tab

    // 1. make blockquote
    >> content
    
    // 2. press shift+tab key
    > content
    
    // 3. press shift+tab key
    // The shift+tab only works until only one blockquote remains.
    > content
  • enter with blockquote has content

    // 1. make blockquote
    > content
    
    // 2. press enter key
    // If you press Enter when you have content, a blockquote will be created at the bottom.
    > content
    >
  • enter with blockquote has not content

    // 1. make blockquote
    > content
    
    // 2. press enter key
    // If you press Enter when you have content, a blockquote will be created at the bottom.
    > content
    >
    
    // 3. press enter key
    // If you press Enter when you have not content, remove the blockquote from the current row.
    > content
    

Ordered List

Markdownarea provides the automatic ordering function of the order list.

  • tab

    // 1. make ordered list
    1. content 1
    2. content 2
    3. content 3
    
    // 2. press tab key with second row
    1. content 1
        1. content 2
    2. content 3
    
    // 3. press tab key with third row
    1. content 1
        1. content 2
        2. content 3
  • shift tab

    // 1. make ordered list
    1. content 1
        1. content 2
        2. content 3
    
    // 2. press shift+tab key with second row
    1. content 1
    2. content 2
        1. content 3
    
    // 3. press tab key with third row
    1. content 1
    2. content 2
    3. content 3
  • enter with order list has content

    // 1. make ordered list
    1. content 1
    
    // 2. press enter key
    1. content 1
    2. content 2
    
    // 3. press enter key
    1. content 1
    2. content 2
    3. content 3
    
    // 4. press tab key
    1. content 1
    2. content 2
        1. content 3
    
    // 5. press enter key
    1. content 1
    2. content 2
        1. content 3
        2. content 4
    
    // 6. press enter key
    1. content 1
    2. content 2
        1. content 3
    3. content 4
    
    // 7. press enter key
    1. content 1
    2. content 2
        1. content 3
    3. content 4
    4. content 5
  • enter with order list has not content

    // 1. make ordered list
    1. content 1
    
    // 2. press enter key
    1. content 1
    2.
    
    // 3. press enter key
    // If you press Enter when you have not content, remove the order list from the current row.
    1. content 1
    

Unordered List

An Unordered List behaves similarly to an Ordered List.

  • tab

    // 1. make ordered list
    - content 1
    - content 2
    - content 3
    
    // 2. press tab key with second row
    - content 1
        - content 2
    - content 3
    
    // 3. press tab key with third row
    - content 1
        - content 2
        - content 3
  • shift tab

    // 1. make ordered list
    - content 1
        - content 2
        - content 3
    
    // 2. press shift+tab key with second row
    - content 1
    - content 2
        - content 3
    
    // 3. press tab key with third row
    - content 1
    - content 2
    - content 3
  • enter with order list has content

    // 1. make ordered list
    - content 1
    
    // 2. press enter key
    - content 1
    - content 2
    
    // 3. press enter key
    - content 1
    - content 2
    - content 3
    
    // 4. press tab key
    - content 1
    - content 2
        - content 3
    
    // 5. press enter key
    - content 1
    - content 2
        - content 3
        - content 4
    
    // 6. press enter key
    - content 1
    - content 2
        - content 3
    - content 4
    
    // 7. press enter key
    - content 1
    - content 2
        - content 3
    - content 4
    - content 5
  • enter with order list has not content

    // 1. make ordered list
    - content 1
    
    // 2. press enter key
    - content 1
    -
    
    // 3. press enter key
    // If you press Enter when you have not content, remove the order list from the current row.
    - content 1
    

Task List

An Task List behaves similarly to an Unordered list.

  • tab

    // 1. make ordered list
    - [ ] content 1
    - [ ] content 2
    - [ ] content 3
    
    // 2. press tab key with second row
    - [ ] content 1
        - [ ] content 2
    - [ ] content 3
    
    // 3. press tab key with third row
    - [ ] content 1
        - [ ] content 2
        - [ ] content 3
  • shift tab

    // 1. make ordered list
    - [ ] content 1
        - [ ] content 2
        - [ ] content 3
    
    // 2. press shift+tab key with second row
    - [ ] content 1
    - [ ] content 2
        - [ ] content 3
    
    // 3. press tab key with third row
    - [ ] content 1
    - [ ] content 2
    - [ ] content 3
  • enter with order list has content

    // 1. make ordered list
    - [ ] content 1
    
    // 2. press enter key
    - [ ] content 1
    - [ ] content 2
    
    // 3. press enter key
    - [ ] content 1
    - [ ] content 2
    - [ ] content 3
    
    // 4. press tab key
    - [ ] content 1
    - [ ] content 2
        - [ ] content 3
    
    // 5. press enter key
    - [ ] content 1
    - [ ] content 2
        - [ ] content 3
        - [ ] content 4
    
    // 6. press enter key
    - [ ] content 1
    - [ ] content 2
        - [ ] content 3
    - [ ] content 4
    
    // 7. press enter key
    - [ ] content 1
    - [ ] content 2
        - [ ] content 3
    - [ ] content 4
    - [ ] content 5
  • enter with order list has not content

    // 1. make ordered list
    - [ ] content 1
    
    // 2. press enter key
    - [ ] content 1
    - [ ]
    
    // 3. press enter key
    // If you press Enter when you have not content, remove the order list from the current row.
    - [ ] content 1
    

License

Licensed under the MIT license.