Skip to content
This repository has been archived by the owner on Mar 8, 2019. It is now read-only.

Added html config option to specify HTML markup in sandboxed iframe #309

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/dom/sandbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,10 +153,10 @@
iframeWindow = iframe.contentWindow,
iframeDocument = iframe.contentWindow.document,
charset = doc.characterSet || doc.charset || "utf-8",
sandboxHtml = this._getHtml({
charset: charset,
stylesheets: this.config.stylesheets
});
sandboxHtml = this.config.html || this._getHtml({
charset: charset,
stylesheets: this.config.stylesheets
});

// Create the basic dom tree including proper DOCTYPE and charset
iframeDocument.open("text/html", "replace");
Expand Down
3 changes: 2 additions & 1 deletion src/views/composer.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,8 @@
this.sandbox = new dom.Sandbox(function() {
that._create();
}, {
stylesheets: this.config.stylesheets
stylesheets: this.config.stylesheets,
html: this.config.html
});
this.iframe = this.sandbox.getIframe();

Expand Down