react-markdown-render
v1.1.3
Published
it is simple markdown renderer
Downloads
8
Maintainers
Readme
React-Markdown-Render
시작하기
설치
npm을 사용하여 설치:
npm i react-markdown-render
Yarn을 사용하여 설치:
yarn add react-markdown-render
사용법
customSyntax 매개변수에 객체 형태의 배열을 전달하여 사용합니다.
- wrapper: 마크다운 문법에서 감싸줄 기호를 지정합니다.
- effect: 해당 기호 대신 들어갈 HTML 태그를 작성합니다.
- children: 실제 화면에 표시될 텍스트를 작성합니다.
슬래시(/) 기호를 사용하여 wrapper에 있는 기호 또한 렌더링 가능합니다.
예제
<Markdown
customSyntax={[
{ wrapper: '*', effect: 'strong' },
{ wrapper: '-', effect: 'i' },
]}>
Hello *world* -everyone- /*
</Markdown>
위 예제에 대한 실제 이미지