Skip to content
Snippets Groups Projects
Commit aa3032f1 authored by how's avatar how
Browse files

v0.1.0

parent f96eb344
No related branches found
No related tags found
No related merge requests found
# Change Log
## [UNRELEASED]
(nothing yet)
## 0.1.0 -- 2018-11-14
- Limit pad URL to `https://pad.libreho.st/*`
- Put in production at https://talk.libreho.st
## 0.0.1 -- 2018-11-12
- Fork from https://github.com/fuerst/embed-etherpad-lite
- Point to https://pad.libreho.st/
[unreleased]: /../compare/v0.1.0...HEAD
# Embed codimd pads into Discourse for libreho.st
This allows you to embed libreho.st pads into discourse. Its based on https://github.com/fuerst/embed-etherpad-lite which embeds pads into posts using the Onebox mechanism.
This allows you to embed libreho.st pads into discourse. It is based on https://github.com/fuerst/embed-etherpad-lite which embeds pads into posts using the Onebox mechanism.
# Usage
After installation just insert codimd links into your Discourse posts or comments. The Etherpad will be embedded using the famous and beloved [IFRAME](https://en.wikipedia.org/wiki/HTML_element#Frames) tag and is fully operational.
**This is meant to use with <https://talk.libreho.st>. You need to fork and adapt to your case.**
After installation just insert codimd links into your Discourse posts or comments. The pad will be embedded using the famous and beloved [IFRAME](https://en.wikipedia.org/wiki/HTML_element#Frames) tag and is fully operational.
# Installation
......@@ -18,5 +20,4 @@ The configuration line you have to add to your container's app.yml file looks li
# Details
The plugin uses the ["Brand new plugin interface"](https://meta.discourse.org/t/brand-new-plugin-interface/8793/88) to change URL's like `http(s)://domain.tld/pad-id` into HTML code like `<iframe src='http(s)://domain.tld/pad-id'></iframe>`.
The plugin uses the ["Brand new plugin interface"](https://meta.discourse.org/t/brand-new-plugin-interface/8793/88) to change URL's like `http(s)://domain.example/pad-id` into HTML code like `<iframe src='http(s)://domain.example/pad-id'></iframe>`.
......@@ -6,8 +6,8 @@
class Onebox::Engine::CodimdOnebox
include Onebox::Engine
#we only want to match for a specific codimd domain
matches_regexp /pad.libreho.st/
# we only want to match for a specific codimd domain
matches_regexp %r{\Ahttps://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>"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment