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
ef795fda
Commit
ef795fda
authored
Mar 14, 2018
by
François-Xavier
Browse files
Update plugin.rb
parent
937cb604
Changes
1
Hide whitespace changes
Inline
Side-by-side
plugin.rb
View file @
ef795fda
# 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
# authors: Bernhard Fürst
# url: https://github.com/fuerst/embed-etherpad-lite
class
Onebox::Engine::
EtherpadLite
Onebox
class
Onebox::Engine::
HackMd
Onebox
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=
6
00></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=
8
00></iframe><br><a href='
#{
@url
}
' target='_blank'>
Aller à la note
</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