OscarGodson / EpicEditor

EpicEditor is an embeddable JavaScript Markdown editor with split fullscreen editing, live previewing, automatic draft saving, offline support, and more. For developers, it offers a robust API, can be easily themed, and allows you to swap out the bundled Markdown parser with anything you throw at it.
http://epiceditor.com
MIT License
4.25k stars 338 forks source link

EpicEditor.prototype.unload fails in an iframe #400

Open tansongyang opened 8 years ago

tansongyang commented 8 years ago
  1. Create a page that uses EpicEditor. Make sure you call unload.
  2. Load that page in an iframe.

You will get an error because of this line:

editor = window.parent.document.getElementById(self._instanceId);

This seems like a bug. Is there any reason to be calling window.parent here? Even in the first commit, this line was there, yet there were no other calls to window.parent. Everything works fine with just window.