0.2.11-alpha • Published 2 years ago
@f-ui/markdown v0.2.11-alpha
Fabric-UI Markdown
A Markdown processor built from scratch to work with React.
Installation
// with npm
npm i @f-ui/markdown
// with yarn
yarn add @f-ui/markdown
Usage
You can send any Markdown string text to the useMarkdown hook. In this example the useGithubFile is being used to fetch a github-hosted MD file.
import React from 'react';
import ReactDOM from 'react-dom';
import {Markdown, useGithubFile, useMarkdown} from "@f-ui/markdown"
function App() {
const markdownText = useGithubFile({
user: 'myself',
repo: 'myRepo',
branch: 'myBranch',
filePath: '/path/to/file.md'
})
const mdHook = useMarkdown(markdownText)
return (
<Markdown hook={mdHook}/>
);
}
ReactDOM.render(<App/>, document.querySelector('#app'));
Dependencies
Package | Version | NPM | Github |
---|---|---|---|
prop-types | ^15.7.2 | npm i prop-types | https://github.com/facebook/prop-types |
@f-ui/core | latest | npm i @f-ui/core | https://github.com/fabric-ui/fabric-ui |
Documentation and examples
Coming soon.
Roadmap
- Bug fixes.
- Support for more languages on the code-block.
- Support for all the basic and extended MD syntax.
0.2.1-alpha
2 years ago
0.2.11-alpha
2 years ago
0.2.0-alpha
2 years ago
0.1.1-alpha
2 years ago
0.1.11-alpha
2 years ago
0.1.2-alpha
2 years ago
0.1.0-alpha
2 years ago
0.0.1-alpha
2 years ago