New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

pure-print

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pure-print

print element on a page without any dependence

latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

PurePrint

Base on PrintThis, but not depend on jQuery

usage

  import PrintThis from 'pure-print'
  const printThisDefaults = {
    debug: false, // show the iframe for debugging
    importCSS: true, // import parent page css
    importStyle: true, // import style tags
    printContainer: true, // print outer container/$.selector
    loadCSS: '', // load an additional css file - load multiple stylesheets with an array []
    pageTitle: '', // add title to print page
    removeInline: false, // remove all inline styles
    printDelay: 333, // variable print delay
    header: null, // prefix to html
    footer: null, // postfix to html
    formValues: true, // preserve input/form values
    canvas: false, // copy canvas content (experimental)
    base: false, // preserve the BASE tag, or accept a string for the URL
    doctypeString: '<!DOCTYPE html>', // html doctype
    removeScripts: false, // remove script tags before appending
    copyTagClasses: false // copy classes from the html & body tag
  }
  PrintThis('#id', printThisDefaults)

types

export declare type PrintThisProp = {
    debug?: boolean;
    importCSS?: boolean;
    importStyle?: boolean;
    printContainer?: boolean;
    loadCSS?: string | string[];
    pageTitle?: string;
    removeInline?: boolean;
    printDelay?: number;
    header?: string;
    footer?: string;
    formValues?: boolean;
    canvas?: boolean;
    base?: boolean;
    doctypeString?: string;
    removeScripts?: boolean;
    copyTagClasses?: boolean | 'b' | 'h' | 'bh';
};
export default function printThis(element: HTMLElement | string, options?: PrintThisProp): void;

Keywords

print

FAQs

Package last updated on 21 Nov 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts