aboutsummaryrefslogtreecommitdiff
path: root/plugin.rb
diff options
context:
space:
mode:
Diffstat (limited to 'plugin.rb')
-rw-r--r--plugin.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/plugin.rb b/plugin.rb
new file mode 100644
index 0000000..e0cbd8d
--- /dev/null
+++ b/plugin.rb
@@ -0,0 +1,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 /pad.libreho.st/
+
+ 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'>Goto this Pad</a>"
+ end
+end