# Embed Etherpad Lite pads into Discourse

**URL:** https://meta.discourse.org/t/embed-etherpad-lite-pads-into-discourse/42594
**Category:** Plugin
**Created:** [4월 15, 2016, 6:49오전 UTC](https://meta.discourse.org/t/embed-etherpad-lite-pads-into-discourse/42594 "2016-04-15T06:49:11Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![fuerst](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fuerst/32/120729_2.png) [@fuerst](https://meta.discourse.org/u/fuerst)
#### Post date: [4월 15, 2016, 6:49오전 UTC](https://meta.discourse.org/t/embed-etherpad-lite-pads-into-discourse/42594/1 "2016-04-15T06:49:11Z")

</div>

I created a plugin to embed [Etherpad Lite](https://github.com/ether/etherpad-lite/) pads into Discourse posts using the Onebox mechanism. Would be glad if you give it a try:

## Usage

After installation just insert Etherpad Lite links like [https://beta.etherpad.org/p/embed-me-into-discourse](https://beta.etherpad.org/p/embed-me-into-discourse) 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.

## Installation

Read [Install a Plugin](https://meta.discourse.org/t/install-a-plugin/19157) at [meta.discourse.org](http://meta.discourse.org).

The configuration line you have to add to your container’s app.yml file looks like:

```plaintext
- git clone https://github.com/fuerst/embed-etherpad-lite.git

```

## 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/p/pad-id` into HTML code like `<iframe src='http(s)://domain.tld/p/pad-id'></iframe>`.

That means it also changes your non-Etherpad URL’s which looks just like Etherpad Lite links. Please drop me a note if you got a better idea about how to avoid this.

---

<div class="post-metadata">

### Author: ![downey](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/downey/32/166878_2.png) [@downey](https://meta.discourse.org/u/downey)
#### Post date: [4월 15, 2016, 1:02오후 UTC](https://meta.discourse.org/t/embed-etherpad-lite-pads-into-discourse/42594/2 "2016-04-15T13:02:29Z")

</div>

Interesting idea.

Do you have any screenshots of how this looks in practice? I’m not sure I fully understand the description?

As with other Oneboxes, does it take a one-time capture of the Etherpad document content and insert that as (static) content into the post? (i.e., if the pad changes or goes away, the onebox content stays?) Or is it more like the Google Doc UI, where it shows the actual “live” document?

---

<div class="post-metadata">

### Author: ![fuerst](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fuerst/32/120729_2.png) [@fuerst](https://meta.discourse.org/u/fuerst)
#### Post date: [4월 15, 2016, 8:22오후 UTC](https://meta.discourse.org/t/embed-etherpad-lite-pads-into-discourse/42594/3 "2016-04-15T20:22:17Z")

</div>

It’s the “live” and editable document (pad). As I understand Onebox it not only capture a “moment” of a web page. For instance the [lazyYT](https://github.com/discourse/discourse/tree/master/plugins/lazyYT) plugin is converting a Youtube link into a video player which you can use to watch the video. Even the [Onebox readme](https://github.com/discourse/onebox) is refering to that kind of application.

Here is how it looks like:

 ![](https://global.discourse-cdn.com/meta/original/3X/2/2/22292fa42922f9c9465aa53cd50c4fa40652b423.png)

---

<div class="post-metadata">

### Author: ![nicop91](https://avatars.discourse-cdn.com/v4/letter/n/7ea924/32.png) [@nicop91](https://meta.discourse.org/u/nicop91)
#### Post date: [8월 22, 2017, 10:08오전 UTC](https://meta.discourse.org/t/embed-etherpad-lite-pads-into-discourse/42594/4 "2017-08-22T10:08:53Z")

</div>

This plugin is great, however I have a small issue : links from my etherpad instances are not detected as pads.

Inserting the example link works great (link on [beta.etherpad.org](http://beta.etherpad.org)), but my links are not replaced by the iframe…

My links have the following format :  
[https://sub.composed-domain.fr/p/xo0MvCGYhB](https://sub.composed-domain.fr/p/xo0MvCGYhB)

Going directly to the URL shows that the pad is working normally.

Could this be related to the “-” character in the domain name ? Would you have the regexp used to detect the link ?

Thank you for your work !  
Nicolas

---

<div class="post-metadata">

### Author: ![fuerst](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fuerst/32/120729_2.png) [@fuerst](https://meta.discourse.org/u/fuerst)
#### Post date: [8월 22, 2017, 10:33오전 UTC](https://meta.discourse.org/t/embed-etherpad-lite-pads-into-discourse/42594/5 "2017-08-22T10:33:17Z")

</div>

The regex checks for the path like _/p/xo0MvCGYhB1_ only. The part before doesn’t matter.

May be it is a cross-domain related issue?

---

<div class="post-metadata">

### Author: ![nicop91](https://avatars.discourse-cdn.com/v4/letter/n/7ea924/32.png) [@nicop91](https://meta.discourse.org/u/nicop91)
#### Post date: [8월 22, 2017, 10:49오전 UTC](https://meta.discourse.org/t/embed-etherpad-lite-pads-into-discourse/42594/6 "2017-08-22T10:49:46Z")

</div>

And does it blindly replaces this URL with an iFrame or does it checks if there is a running pad ?  
Maybe it is the detection of my etherpad instance that does not work…

Also the discourse instance is on something.my-domain.tld and the etherpad instance is on somethingelse.my-domain.tld.  
Could the fact that they are both subdomains of the same domain have any impact ?

Would you have any hint to check for cross domain issues ?

Edit : ah ! I have a 404 network call when inserting my link (from the preview screen I guess), on the following URL :  
[mydiscourseURL]/onebox?url=[myEtherpadURL]&refresh=false&user\_id=2  
Strange… As it works for other links, and following the complete link that is in params works fine…

It looks like the onebox call is used to check if there is something behind the URL to replace the link with a onebox or not. So it would not detect my pad as a working pad… While going to the URL loads my pad exactly like these other platforms…

EDIT : ping @fuerst, would you have any insight ?

---

<div class="post-metadata">

### Author: ![nicop91](https://avatars.discourse-cdn.com/v4/letter/n/7ea924/32.png) [@nicop91](https://meta.discourse.org/u/nicop91)
#### Post date: [9월 1, 2017, 11:05오후 UTC](https://meta.discourse.org/t/embed-etherpad-lite-pads-into-discourse/42594/7 "2017-09-01T23:05:58Z")

</div>

Up ? @fuerst maybe ?

---

<div class="post-metadata">

### Author: ![fuerst](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fuerst/32/120729_2.png) [@fuerst](https://meta.discourse.org/u/fuerst)
#### Post date: [9월 5, 2017, 10:15오전 UTC](https://meta.discourse.org/t/embed-etherpad-lite-pads-into-discourse/42594/8 "2017-09-05T10:15:36Z")

</div>

Insight to the Onebox behaviour? No, not exactly.

---

<div class="post-metadata">

### Author: ![nicop91](https://avatars.discourse-cdn.com/v4/letter/n/7ea924/32.png) [@nicop91](https://meta.discourse.org/u/nicop91)
#### Post date: [9월 5, 2017, 11:49오전 UTC](https://meta.discourse.org/t/embed-etherpad-lite-pads-into-discourse/42594/9 "2017-09-05T11:49:10Z")

</div>

Thank you for your answer Bernhard.  
That is quite weird, but I actually just tried again, and it works now… So problem seems to be fixed !

The only config change I did to my server was providing the fullchain certificate for https instead of basic cert. No idea how this could have any impact…

---

<div class="post-metadata">

### Author: ![sunjam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sunjam/32/175682_2.png) [@sunjam](https://meta.discourse.org/u/sunjam)
#### Post date: [3월 25, 2020, 3:22오후 UTC](https://meta.discourse.org/t/embed-etherpad-lite-pads-into-discourse/42594/10 "2020-03-25T15:22:58Z")

</div>

이 플러그인을 설치했는데 패드 이름에 따라 임베딩이 제대로 작동하지 않는 문제가 있습니다:

> **[nbmeeting | Riseup Pad](https://pad.riseup.net/p/nbmeeting)**
>
> A collaborative document that everyone can edit in real time.

**임베딩이 작동하지 않습니다.** 그리고 이 URL이 제가 필요한 것입니다.

> **[nbmeetin | Riseup Pad](https://pad.riseup.net/p/nbmeetin)**
>
> A collaborative document that everyone can edit in real time.

**작동합니다**

> **[nbmeetingg | Riseup Pad](https://pad.riseup.net/p/nbmeetingg)**
>
> A collaborative document that everyone can edit in real time.

**작동합니다**
