Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
latoilescoute-dev
embed-hackmd
Commits
982ecdbf
Commit
982ecdbf
authored
Apr 14, 2016
by
Bernhard Fürst
Browse files
Add plugin code.
parent
4d0a2343
Changes
1
Show whitespace changes
Inline
Side-by-side
plugin.rb
0 → 100644
View file @
982ecdbf
# name: embed-etherpad-lite
# about: Embed Etherpad Lite pads using Onebox.
# version: 1.0
# authors: Bernhard Fürst
# url: https://dev.fuerstnet.de/discourse-onebox/embed-etherpad-lite
class
Onebox::Engine::EtherpadLiteOnebox
include
Onebox
::
Engine
# Try to guess Etherpad Lite links like http(s)://domain.tld/p/pad-id
matches_regexp
/^https?:\/\/[^\/]+\/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
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment