Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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: 2 months ago
JSON representation

Web Components which renders markdown using marked.

Awesome Lists containing this project

README

        

# x-marked [![test](https://github.com/1000ch/x-marked/actions/workflows/test.yml/badge.svg)](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)