npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

laxar-markdown-display-widget

v3.0.2

Published

The laxar-markdown-display-widget converts [Markdown]-formatted text to HTML content and displays it.

Downloads

3

Readme

laxar-markdown-display-widget Build Status

The laxar-markdown-display-widget converts Markdown-formatted text to HTML content and displays it.

Content

Appearance

Illustration of the laxar-markdown-display-widget

A laxar-markdown-display-widget displaying a part of this document.

Usage

Installation

For use with Laxar 2 projects:

npm install laxar-markdown-display-widget

Configuration example

{
   "widget": "laxar-markdown-display-widget",
   "features": {
      "markdown": {
         "parameter": "anchor",
         "resource": "markdownResource",
         "attribute": "markdownText"
      }
   }
}

Use this configuration on a page to get an laxar-markdown-display-widget instance. The value of parameter is used to generate internal anchors, and has to be the same as defined in the flow definition. For more information how to configure the flow and places with parameters visit the LaxarJS flow documentation.

The widget gets the Markdown-formatted text from the resource markdownResource. The widget expects the source under the relation markdownText and transforms it to HTML content and displays the result.

For full configuration options refer to the widget.json.

Features

1. Display Markdown-formatted text (markdown)

R1.1 The widget MUST require the configuration of a place parameter to support the ability to bookmark a section by using an anchor.

R1.2 The widget MUST allow configuration of an URL which ends with .md and refers to a Markdown-formatted text.

R1.3 The widget MUST allow configuration of a resource with Markdown-formatted text. It MUST act as a slave of the resource according to the master/slave pattern.

R1.4 The widget MUST allow configuration of a resource with a URL. It MUST act as a slave of the resource according to the master/slave pattern. The widget MUST expect the URL in the object _links and the relation markdown according to HAL. The URL MUST end with .md and refer to a Markdown-formatted text.

R1.5 The widget MUST allow configuration of an attribute which refers to the Markdown-formatted text in the resource. If no attribute is configured, the widget MUST expect a URL in the resource according to the requirement 1.4.

R1.6 The widget MUST convert the Markdown-formatted text to HTML content and MUST display it.

R1.7 The widget SHOULD display images with relative paths.

R1.8 The widget SHOULD resolve hyperlinks with relative paths.

R1.9 The widget MUST resolves links to anchors of headings.

R1.10 If a resource and a URL are configured, the widget MUST display the content loaded from the URL until a resource with a Markdown-formatted text or an URL to a Markdown-formatted text is published.

Integration

Patterns

The widget supports the following event patterns as specified by the LaxarJS Patterns document.

Resources

  • Resource: markdown.resource
    • Role: Slave
    • Access: Read
    • Description: Contains the Markdown-formatted text or a URL which refers to a Markdown-formatted text.

References

The following resources are useful or necessary for the understanding of this document. The links refer to the latest version of the documentation. Refer to the bower.json for the specific version that is normative for this document.