Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the possibility to pass a string to add attributes to the <html> #29

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
4 changes: 3 additions & 1 deletion js/jquery.printarea.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* {OPTIONS} | [type] | (default), values | Explanation
* --------- | --------- | ---------------------- | -----------
* @mode | [string] | (iframe),popup | printable window is either iframe or browser popup
* @html | [string] | ('') | attribute for the html balise (like moznomarginboxes mozdisallowselectionprint to remove header and footer on the page)
* @popHt | [number] | (500) | popup window height
* @popWd | [number] | (400) | popup window width
* @popX | [number] | (500) | popup window screen X position
Expand All @@ -40,6 +41,7 @@
popClose : false,
extraCss : '',
extraHead : '',
html : '',
retainAttr : ["id","class","style"] };

var settings = {};//global settings
Expand Down Expand Up @@ -77,7 +79,7 @@
},
write : function ( PADocument, $ele ) {
PADocument.open();
PADocument.write( PrintArea.docType() + "<html>" + PrintArea.getHead() + PrintArea.getBody( $ele ) + "</html>" );
PADocument.write( PrintArea.docType() + "<html " + settings.html + ">" + PrintArea.getHead() + PrintArea.getBody( $ele ) + "</html>" );
PADocument.close();
},
docType : function() {
Expand Down