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

misojs-markdown-component

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

misojs-markdown-component

A markdown component for use in misojs, also works with mithril through browserify

  • 0.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

misojs-markdown-component

This component allows rendering of markdown in misojs.

installation

In your main misojs application directory:

npm install misojs-markdown-component --save

Usage

Acceess the component in your mvc entities like so:

var Markdown = require('misojs-markdown-component')();

In your controller, you might set a value like so:

this.markdownValue = [
	"## Markdown",
	"The mark-up that likes to get down!",
	"* Amazing!",
	"* Awesome!"].join("\n");

And in your view:

m.component(Markdown, {
	value: ctrl.markdownValue
}),

This will render the markdown.

Controlling the render

By default the misojs markdown component will render both client and server side, however in miso you are able to serve static markdown on the client side, by simply including the file manually like so:

var Markdown = require('../node_modules/misojs-markdown-component/markdown.component.js')({});

This works because miso can compile separate server and client versions of the code automatically, and any directly referenced files will be included. See markdown.component.client.js for details on how the client side implementation works, and if it is suitable for your use.

Keywords

FAQs

Package last updated on 06 Aug 2015

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