oembed-replacer

1.0.3 • Public • Published

Oembed replacer

This module replaces oembed tags with iframe elements

Instructions:

  1. install with npm npm install oembed-replacer

  2. import module import OembedReplacer from "oembed-replacer/oembedReplacer"

  3. create instance

new OembedReplacer(options)

options : {
   width: <string> -- defines elements width,
   height: <string> -- defines elements height,
   ids: <array> -- if provided elements with ids will be replaced
   cssClass: <string> -- if provided elements with class will be replaced
   sourceAttribute: <string> -- if provided source of media will be searched in attribute of element,
                                 else innerHTML is used to provide source
}

Keywords

none

Install

DownloadsWeekly Downloads

1

Version

1.0.3

License

ISC

Unpacked Size

2.19 kB

Total Files

3

Last publish

Collaborators

  • anny.dee
  • denfedweb
  • nicolaegirbu