woo-email-editor
Advanced tools
Comparing version 1.0.2 to 1.0.3
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports["default"] = void 0; | ||
var _WooEmailEditor = _interopRequireDefault(require("./WooEmailEditor")); | ||
@@ -12,4 +7,2 @@ | ||
window.WooEmailEditor = _WooEmailEditor["default"]; | ||
var _default = _WooEmailEditor["default"]; | ||
exports["default"] = _default; | ||
window.WooEmailEditor = _WooEmailEditor["default"]; |
@@ -43,3 +43,6 @@ "use strict"; | ||
this.$iframe.onload = function () { | ||
_this.$iframe.contentWindow.postMessage(option.json, "*"); | ||
_this.$iframe.contentWindow.postMessage({ | ||
type: "init", | ||
json: option.json | ||
}, "*"); | ||
}; | ||
@@ -52,2 +55,10 @@ | ||
}, { | ||
key: "updateContent", | ||
value: function updateContent(json) { | ||
this.$iframe.contentWindow.postMessage({ | ||
type: "update", | ||
json: json | ||
}, "*"); | ||
} | ||
}, { | ||
key: "save", | ||
@@ -54,0 +65,0 @@ value: function save() { |
{ | ||
"name": "woo-email-editor", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "./src/index.js", |
import WooEmailEditor from "./WooEmailEditor"; | ||
window.WooEmailEditor = WooEmailEditor; | ||
export default WooEmailEditor; |
@@ -17,3 +17,6 @@ export default class WooEmailEditor { | ||
this.$iframe.onload = ()=>{ | ||
this.$iframe.contentWindow.postMessage(option.json,"*"); | ||
this.$iframe.contentWindow.postMessage({ | ||
type:"init", | ||
json:option.json | ||
},"*"); | ||
}; | ||
@@ -26,2 +29,8 @@ window.onmessage = (e)=>{ | ||
updateContent(json){ | ||
this.$iframe.contentWindow.postMessage({ | ||
type:"update", | ||
json:json | ||
},"*"); | ||
} | ||
save(){ | ||
@@ -28,0 +37,0 @@ return this.easyEmailMap; |
@@ -12,3 +12,4 @@ const {CleanWebpackPlugin} = require("clean-webpack-plugin"); | ||
xlPdf: './src/xlPdf.js', | ||
xlEmailBuild: './src/WooEmailEditor.js' | ||
xlEmailBuild: './src/WooEmailEditor.js', | ||
index:'./src/index.js', | ||
}, | ||
@@ -56,3 +57,3 @@ output: { | ||
template: "./public/index.html", | ||
chunks: ["xlPdf","xlEmailBuild"] | ||
chunks: ["xlPdf","xlEmailBuild","index"] | ||
}), | ||
@@ -59,0 +60,0 @@ new CleanWebpackPlugin(), |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
15628
339