https://github.com/1000ch/x-marked
Web Components which renders markdown using marked.
https://github.com/1000ch/x-marked
markdown marked web-components
Last synced: about 1 year ago
JSON representation
Web Components which renders markdown using marked.
- Host: GitHub
- URL: https://github.com/1000ch/x-marked
- Owner: 1000ch
- License: mit
- Created: 2020-01-02T00:29:51.000Z (over 6 years ago)
- Default Branch: main
- Last Pushed: 2024-09-01T08:35:02.000Z (almost 2 years ago)
- Last Synced: 2025-03-14T16:05:41.669Z (over 1 year ago)
- Topics: markdown, marked, web-components
- Language: TypeScript
- Homepage: https://1000ch.github.io/x-marked/
- Size: 569 KB
- Stars: 7
- Watchers: 2
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
README
# x-marked [](https://github.com/1000ch/x-marked/actions/workflows/test.yml)
> Web Components which renders markdown using [marked](https://github.com/markedjs/marked).
## Install
Using [npm](https://www.npmjs.org/package/x-marked):
```sh
$ npm install x-marked
```
## Usage
Import `XMarked` and register it as a custom element.
```html
import XMarked from 'https://unpkg.com/x-marked';
customElements.define('x-marked', XMarked);
```
Put ``.
```html
# x-marked
Web Components which renders markdown using [marked](https://github.com/markedjs/marked).
```
## API
### `highlight` attribute/property
Boolean attribute/property to enable highlight.
### `highlight-theme`/`highlightTheme` attribute/property
String attribute/property to specify the theme of syntax highlight. you can specify it by choosing from [PrismJS/prism-themes](https://github.com/PrismJS/prism-themes/tree/master/themes) without `.css` extension.
## License
[MIT](https://1000ch.mit-license.org) © [Shogo Sensui](https://github.com/1000ch)