Commit ef795fda authored by François-Xavier's avatar François-Xavier
Browse files

Update plugin.rb

parent 937cb604
# name: embed-etherpad-lite # name: embed-hackmd
# about: Embed Etherpad Lite pads using Onebox. # about: Embed HackMD pads using Onebox.
# version: 1.0 # version: 1.0
# authors: Bernhard Fürst # authors: Bernhard Fürst
# url: https://github.com/fuerst/embed-etherpad-lite # url: https://github.com/fuerst/embed-etherpad-lite
class Onebox::Engine::EtherpadLiteOnebox class Onebox::Engine::HackMdOnebox
include Onebox::Engine include Onebox::Engine
# Try to guess Etherpad Lite links like http(s)://domain.tld:port/p/pad-id matches_regexp /https:\/\/note.latoilescoute.net\/.+/
matches_regexp /\/p\/[^\/]+$/
# See https://github.com/ether/etherpad-lite/wiki/Embed-Parameters # See https://github.com/ether/etherpad-lite/wiki/Embed-Parameters
def to_html def to_html
"<iframe name='embed_readwrite' src='#{@url}?showControls=true&showChat=true&showLineNumbers=true&useMonospaceFont=false' style='border-width:0' frameborder='0' scrolling='no' width='100%' height=600></iframe><br><a href='#{@url}' target='_blank'>Goto this EtherPad</a>" "<iframe name='embed_readwrite' src='#{@url}?both' style='border-width:0' frameborder='0' scrolling='no' width='100%' height=800></iframe><br><a href='#{@url}' target='_blank'>Aller à la note</a>"
end end
end end
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment