diff --git a/package.json b/package.json index bf4d858..a90732f 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "print-js", "homepage": "http://printjs.crabbly.com", "description": "A tiny javascript library to help printing from the web.", - "version": "1.0.44", + "version": "1.0.45", "main": "dist/print.js", "repository": "https://github.com/crabbly/Print.js", "license": "MIT", diff --git a/test.html b/test.html index c31c2f1..329ac12 100644 --- a/test.html +++ b/test.html @@ -41,6 +41,36 @@ } function printJson() { + let data = [ + { + test1: 'Test1 string', + test2: 'Test2 string' + }, + { + test1: 'more Test1 string', + test2: 'more Test2 string' + } + ] + + printJS({printable: data, properties: ['test1', 'test2'], type: 'json'}) + } + + function printStyledJson() { + let data = [ + { + test1: 'Test1 string', + test2: 'Test2 string' + }, + { + test1: 'more Test1 string', + test2: 'more Test2 string' + } + ] + + printJS({printable: data, properties: ['test1', 'test2'], type: 'json', gridStyle: 'border: 2px solid #3971A5;', gridHeaderStyle: 'color: red; border: 2px solid #3971A5;'}) + } + + function printNestedJson() { let data = [ { test1: 'Test1 string', @@ -85,6 +115,12 @@