forked from fuerst/embed-etherpad-lite
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplugin.rb
More file actions
16 lines (14 loc) · 716 Bytes
/
plugin.rb
File metadata and controls
16 lines (14 loc) · 716 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# name: embed-etherpad-lite
# about: Embed Etherpad Lite pads using Onebox.
# version: 1.0
# authors: Bernhard Fürst
# url: https://github.com/fuerst/embed-etherpad-lite
class Onebox::Engine::EtherpadLiteOnebox
include Onebox::Engine
# Try to guess Etherpad Lite links like http(s)://domain.tld:port/p/pad-id
matches_regexp /\/p\/[^\/]+$/
# 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>"
end
end