diff --git a/examples/viewer.html b/examples/viewer.html new file mode 100644 index 0000000000000000000000000000000000000000..f197528f4e82b18de068088bd16c36a5649cb66d --- /dev/null +++ b/examples/viewer.html @@ -0,0 +1,90 @@ + + + + + + + Pagedjs Viewer + + + + + + + + + + + + + + diff --git a/package-lock.json b/package-lock.json index 7af295179ae373802d043957bc8322201f26e5fe..eb067936d0614cbe30f39853a69fde1be3ae2f95 100755 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "pagedjs", - "version": "0.1.10", + "version": "0.1.13", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/src/polyfill/previewer.js b/src/polyfill/previewer.js index 41c61c21997de35e114457e56709a949b99d9dbf..3151e29b5f9cc3fae5c13c9d423fef8641e2dcb1 100644 --- a/src/polyfill/previewer.js +++ b/src/polyfill/previewer.js @@ -18,8 +18,6 @@ class Previewer { // Hooks this.hooks = {}; - this.hooks.beforePolishing = new Hook(this); - this.hooks.beforeChunking = new Hook(this); // default size this.size = { @@ -116,6 +114,7 @@ class Previewer { } async preview(content, stylesheets, renderTo) { + if (!content) { content = this.wrapContent(); }