@loomhq/loom-embed
TypeScript icon, indicating that this package has built-in type declarations

1.7.0 • Public • Published

npm version CircleCI codecov

Installing

npm package

npm install @loomhq/loom-embed

Script tag

<script type="module"> import * as loom from "https://www.unpkg.com/@loomhq/loom-embed@1.2.4/dist/esm/index.js?module"; </script>

See documentation for installation and usage.

Usage

import * as loom from '@loomhq/loom-embed';

Methods

.linkReplace(selector, [options], target)

Replaces any loom links at the nodes matching the selector with the embedded video. Replacement occurs on the entire document, or on the optional target DOM element.

.textReplace(textString, [options])

Takes a string and replaces any Loom URLs with the embed html

-> returns a promise

.oembed(videoUrl, [options])

oembed metadata from the given video url

-> returns a promise

Options

The embed code is responsive by default. Only set the width/height values if you require your embed code to be a fixed size

width - [Number] value specifying the max pixel width

height - [Number] value specifying the max pixel height

Readme

Keywords

Package Sidebar

Install

npm i @loomhq/loom-embed

Weekly Downloads

24,345

Version

1.7.0

License

ISC

Unpacked Size

38.6 kB

Total Files

16

Last publish

Collaborators

  • gkurrella
  • tdavis5
  • alau400
  • pj.perger
  • stellaloomnpm
  • kpatel2
  • michael-loom
  • seanseth-atlassian
  • kanjaria-atlassian
  • liezelanne9
  • kkim6
  • ahirsch-loom
  • atlassianartifactteam
  • lleggieri-atlassian
  • ammiewang
  • skitakis
  • cxu-atlas
  • eagarwal-23
  • chrisschnaars
  • iamjwc
  • zachwaugh
  • waymondo
  • dconnorsears
  • scottjg
  • mwu3
  • jaslin8
  • emmaxtung
  • cmcgee-atlassian
  • sagarrao6
  • akrishnaswamy
  • ncooley
  • woodne-loom
  • lliu4
  • skywalkerloom
  • imartinezmorales
  • mlasater-atlassian
  • jlmx_atlassian
  • jartin_atlassian
  • kreganatlassian
  • bmasonatl
  • pribera
  • jestrada-atlassian
  • gregchan-loom
  • naraygowraj82
  • gps-2024
  • kwang5atlassian
  • cfletcheratlassian
  • stevenzimmeratlassian
  • njain-loominati
  • jose-aleman
  • samc-atla
  • josecarlosatloom
  • maitrishah
  • victorlee134
  • rbutler-loom
  • ploom
  • sjhsieh.loom
  • loomit
  • rekharameshloom
  • daniel.semmel
  • yiming-loom
  • mgranmoe
  • ayushgr.loom
  • romaindejean58
  • harrisonnovak
  • steveatloom
  • dainguyendo-loom
  • complicated-cog
  • swac-loom
  • yoannloom
  • avanikaloom
  • loom-infra-robot
  • lingrino
  • ilyalavrenov
  • stuti43
  • gkim795
  • laurabarrera
  • wmiller112
  • sadebrowne
  • joeyma22
  • yoichi
  • pjang-loom
  • dkim96
  • btuttle
  • brian-nguyen-loom
  • maitri.shah
  • jose.medina
  • ben.lo
  • sergioloom
  • dainguyendo
  • tatiana_loom
  • thefriendlyghost
  • loom.embed-sdk
  • nymerias
  • ydep
  • luis.loom
  • premaloom
  • vladloom
  • rodrigoloom
  • juliannaroenloom
  • cndreisbach
  • dj_haile
  • catherinelin
  • erinbyerly
  • aditya_singla
  • jiaweiou
  • vishalsantoshi
  • wilbertthelam