New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@bgoodman/syntax-highlight

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bgoodman/syntax-highlight

Cusom element for displaying code with syntax highlighting using Prism.

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

syntax-highlight

Cusom element for displaying code with syntax highlighting using Prism.

Installation

npm install @bgoodman/syntax-highlight

yarn add @bgoodman/syntax-highlight

Usage

<html>

<head>
    <script type="module" src="./dist/index.js"></script>
</head>

<body>

    <syntax-highlight class="language-css">
        <pre><code class="language-css">p { color: red }</code></pre>
    </syntax-highlight>

    <syntax-highlight class="language-html" font-family="monospace" font-size="18px">
        <pre><code class="language-html">&lt;syntax-highlight
    class="language-html"
    font-family="monospace"
    font-size="18px"&gt;
&lt;/syntax-highlight&gt;</code></pre>
    </syntax-highlight>

</body>

</html>

Attrbiutes

font-family

Pass any valid css value for font-family to the element.

font-size

Pass any valid css value for font-size to the element.

Keywords

FAQs

Package last updated on 19 Nov 2019

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