Sha256: b47399835b27d4a75d43d7ccd7c159beab8d77b9dce4117437c3ab2d1459ca1a
Contents?: true
Size: 830 Bytes
Versions: 21
Compression:
Stored size: 830 Bytes
Contents
# frozen_string_literal: true module Onebox module Engine class SlidesOnebox include Engine include StandardEmbed matches_regexp(/^https?:\/\/slides\.com\/[\p{Alnum}_\-]+\/[\p{Alnum}_\-]+$/) requires_iframe_origins "https://slides.com" def to_html <<-HTML <iframe src="https://slides.com#{uri.path}/embed?style=light" width="576" height="420" scrolling="no" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen> </iframe> HTML end def placeholder_html escaped_src = ::Onebox::Helpers.normalize_url_for_output(raw[:image]) "<img src='#{escaped_src}'>" end end end end
Version data entries
21 entries across 21 versions & 1 rubygems
Version | Path |
---|---|
onebox-2.1.0 | lib/onebox/engine/slides_onebox.rb |