Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 1,000,000+ packages pre-installed, including mozaik-ext-embed with all npm packages installed. Try it out:

require("mozaik/package.json"); // mozaik is a peer dependency. require("react/package.json"); // react is a peer dependency. var mozaikExtEmbed = require("mozaik-ext-embed")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

mozaik-ext-embed v0.2.1

Mozaik extension for embedding things like HTML in widget

mozaik-ext-embed

Embded content like HTML markup into widget. Handy to adding ambiguous content like raw HTML (iframe, html video etc.)

Setup

  1. Navigate into dashboard directory
  2. Install dependencies
npm i -S mozaik-ext-embed
  1. Register widget: ./src/App.jsx
import embed from 'mozaik-ext-embed';

Mozaik.Registry.addExtensions({ embed });
  1. Build dashboard
gulp build
  1. Restart dashboard
npm start

Widgets

Markup (embed.markup)

Show custom markup in widget

https://raw.githubusercontent.com/juhamust/mozaik-ext-embed/master/preview.png

parameters

keyrequireddescription
contentyeshtml content
titlenowidget title value

usage

{
  type: 'embed.markup',
  title: 'Live feed',
  content: '<iframe src="http://livefeed.com/"></iframe>',
  columns: 1, rows: 1, x: 0, y: 0
}

Development

Link peer dependencies (wherever you have 'em):

npm link ../mozaik
npm link ../mozaik/node_modules/react

license

MIT

Metadata

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free