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

.load() triggers a document.write function on an iframe. #397

Closed samkelleher closed 3 years ago

samkelleher commented 8 years ago

I guess it's not a fault but I'm gonna drop this comment in incase it affects someone else who is considering using EpicEditor - which is Epic! 👏

Calling load() on an instance of an editor seems to create an iframe, which in turn has a write() method called on it, equivalent do document.write().

In some strict execution environments this isn't allowed and throws an exceptions. I.e. to prevent an errant program document.writing something bad and executable. In my situation this is a Google Chrome Packaged App.

document.write() is not available in packaged apps.

I guess this is something to consider in any future updates to EpicEditor, so that document.write could be avoided.