Sha256: d2807f607aa1f10673727fe5e6b46c9d1f198e31a0c15c8488da9d960ccbef7e

Contents?: true

Size: 742 Bytes

Versions: 94

Compression:

Stored size: 742 Bytes

Contents

module Onebox
  module Engine
    class SlidesOnebox
      include Engine
      include StandardEmbed

      matches_regexp(/^https?:\/\/slides\.com\/[\p{Alnum}_\-]+\/[\p{Alnum}_\-]+$/)

      def to_html
        <<-HTML
          <iframe src="//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

94 entries across 94 versions & 1 rubygems

Version Path
onebox-1.8.89 lib/onebox/engine/slides_onebox.rb
onebox-1.8.88 lib/onebox/engine/slides_onebox.rb
onebox-1.8.87 lib/onebox/engine/slides_onebox.rb
onebox-1.8.86 lib/onebox/engine/slides_onebox.rb
onebox-1.8.85 lib/onebox/engine/slides_onebox.rb
onebox-1.8.84 lib/onebox/engine/slides_onebox.rb
onebox-1.8.83 lib/onebox/engine/slides_onebox.rb
onebox-1.8.82 lib/onebox/engine/slides_onebox.rb
onebox-1.8.81 lib/onebox/engine/slides_onebox.rb
onebox-1.8.80 lib/onebox/engine/slides_onebox.rb
onebox-1.8.79 lib/onebox/engine/slides_onebox.rb
onebox-1.8.78 lib/onebox/engine/slides_onebox.rb
onebox-1.8.77 lib/onebox/engine/slides_onebox.rb
onebox-1.8.76 lib/onebox/engine/slides_onebox.rb
onebox-1.8.75 lib/onebox/engine/slides_onebox.rb
onebox-1.8.74 lib/onebox/engine/slides_onebox.rb
onebox-1.8.73 lib/onebox/engine/slides_onebox.rb
onebox-1.8.72 lib/onebox/engine/slides_onebox.rb
onebox-1.8.71 lib/onebox/engine/slides_onebox.rb
onebox-1.8.70 lib/onebox/engine/slides_onebox.rb