blob: c8c1a18701f8bc21f67664298e9a921f3cf0095c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
# name: embed-codimd
# about: Embed codimd pads using Onebox. Based on https://github.com/fuerst/embed-etherpad-lite
# version: 0.1
# author: realitygaps
# url: https://lab.libreho.st/librehosters/embed-codimd
class Onebox::Engine::CodimdOnebox
include Onebox::Engine
# we only want to match for a specific codimd domain
matches_regexp %r{\Ahttps://pad\.public\.cat/}
def to_html
"<iframe name='embed_readwrite' src='#{@url}' style='border-width:0' frameborder='0' scrolling='no' width='100%' height=600></iframe><br><a href='#{@url}' target='_blank'>Go to this Pad</a>"
end
end
|