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

Update plugin.rb

parent 937cb604
# name: embed-etherpad-lite
# about: Embed Etherpad Lite pads using Onebox.
# name: embed-hackmd
# about: Embed HackMD pads using Onebox.
# version: 1.0
# authors: Bernhard Fürst
# url: https://github.com/fuerst/embed-etherpad-lite
class Onebox::Engine::EtherpadLiteOnebox
class Onebox::Engine::HackMdOnebox
include Onebox::Engine
# Try to guess Etherpad Lite links like http(s)://domain.tld:port/p/pad-id
matches_regexp /\/p\/[^\/]+$/
matches_regexp /https:\/\/note.latoilescoute.net\/.+/
# See https://github.com/ether/etherpad-lite/wiki/Embed-Parameters
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
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