Sha256: 2997963f61befcc3040189eba605e412aba7486f3f11b66441129e1ec88e6f82

Contents?: true

Size: 773 Bytes

Versions: 49

Compression:

Stored size: 773 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}_\-]+$/)

      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

49 entries across 49 versions & 1 rubygems

Version Path
onebox-2.0.2 lib/onebox/engine/slides_onebox.rb
onebox-2.0.1 lib/onebox/engine/slides_onebox.rb
onebox-2.0.0 lib/onebox/engine/slides_onebox.rb
onebox-1.9.30 lib/onebox/engine/slides_onebox.rb
onebox-1.9.29 lib/onebox/engine/slides_onebox.rb
onebox-1.9.28.4 lib/onebox/engine/slides_onebox.rb
onebox-1.9.28.3 lib/onebox/engine/slides_onebox.rb
onebox-1.9.28.2 lib/onebox/engine/slides_onebox.rb
onebox-1.9.28.1 lib/onebox/engine/slides_onebox.rb
onebox-1.9.28 lib/onebox/engine/slides_onebox.rb
onebox-1.9.27.2 lib/onebox/engine/slides_onebox.rb
onebox-1.9.27.1 lib/onebox/engine/slides_onebox.rb
onebox-1.9.26 lib/onebox/engine/slides_onebox.rb
onebox-1.9.25 lib/onebox/engine/slides_onebox.rb
onebox-1.9.24 lib/onebox/engine/slides_onebox.rb
onebox-1.9.23 lib/onebox/engine/slides_onebox.rb
onebox-1.9.22 lib/onebox/engine/slides_onebox.rb
onebox-1.9.21 lib/onebox/engine/slides_onebox.rb
onebox-1.9.20 lib/onebox/engine/slides_onebox.rb
onebox-1.9.19 lib/onebox/engine/slides_onebox.rb