Projets
Voir sur GitHub 

acdlite/react-remarkable
À propos
Un composant React pour afficher du Markdown avec remarkable
Design et médiasProgression mesurée des étoiles
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- Historique en cours
Variations nettes sur des périodes qui se chevauchent, pas des totaux quotidiens. Les mesures absentes restent vides. Les étoiles indiquent l’intérêt, pas la qualité.
README.md
Originalreact-remarkable
A React component for rendering Markdown with remarkable.
npm install --save react-remarkable
Usage
var React = require('react');
var Markdown = require('react-remarkable');
var MyComponent = React.createClass({
render() {
return (
<div>
{/* Pass Markdown source to the `source` prop */}
<Markdown source="**Markdown is awesome!**" />
{/* Or pass it as children */}
{/* You can nest React components, too */}
<Markdown>{`
## Reasons React is great
1. Server-side rendering
2. This totally works:
<SomeOtherAmazingComponent />
Pretty neat!
`}</Markdown>
</div>
);
}
});
Available props:
options- Hash of Remarkable optionssource- Markdown source. You can also pass the source as children, which allows you to mix React components and Markdown.container- Element to use as container. Defaults todiv.
Syntax Highlighting
Atom
You can enable syntax highlighting in Atom using the following steps:
Go to Settings > Packages > language-babel Settings > Enter this for JavaScript Tagged Literal Grammar Extensions:
"(?<=<Markdown>{)":source.gfm

Shortly you'll see that markdown syntax highlighting is enabled.

License
MIT
Explorer des projets similaires
Chargement…