Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@ebot7/marked

Package Overview
Dependencies
Maintainers
7
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ebot7/marked

The package includes a custom renderer for the most popular JavaScript Markdown library marked.js, so that it outputs Edem components like `<ed-paragraph>` rather than standard HTML tags like ``.

  • 0.1.1
  • Source
  • npm
  • Socket score

Version published
Maintainers
7
Created
Source

E-Bot7 Marked

The package includes a custom renderer for the most popular JavaScript Markdown library marked.js, so that it outputs Edem components like <ed-paragraph> rather than standard HTML tags like <p>.

Installation

As the first step, you will want to install Marked.js and Edem’s Markdown package. To do so, run the following commands in your terminal:

npm install marked
npm install @ebot7/marked

Usage

import marked from "marked";
import { createEdemMarkedRenderer } from "@ebot7/marked";

const renderer = createEdemMarkedRenderer();
marked.use({ renderer });

console.log(marked("# Welcome to Edem!"));

Optionally, you can supply an object which includes renderer methods like code, image, paragraph. Visit Marked.js to get more information.

Example

If you have followed along with the above, then the following input:

# Hello world

This is a paragraph containing [a link](https://e-bot7.com/).

## Sub-heading

* Here
* Is
* A
* List

1. Here
1. Is
1. An
1. Ordered
1. List

Should result in the following output:

<ed-text variant="h700" component="h1">Hello world</ed-text>
<ed-paragraph>
  This is a paragraph containing
  <a href="https://e-bot7.com/">a link</a>.
</ed-paragraph>
<ed-text variant="h600" component="h2">Sub-heading</ed-text>
<ul>
  <li><ed-text>Here</ed-text></li>
  <li><ed-text>Is</ed-text></li>
  <li><ed-text>A</ed-text></li>
  <li><ed-text>List</ed-text></li>
</ul>
<ol>
  <li><ed-text>Here</ed-text></li>
  <li><ed-text>Is</ed-text></li>
  <li><ed-text>An</ed-text></li>
  <li><ed-text>Ordered</ed-text></li>
  <li><ed-text>List</ed-text></li>
</ol>

FAQs

Package last updated on 19 Jul 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc