Skip to content

Commit

Permalink
Add documentation to printing module
Browse files Browse the repository at this point in the history
  • Loading branch information
saulshanabrook committed Jan 9, 2019
1 parent d7cb863 commit 708e465
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions packages/apputils/src/printing.ts
@@ -1,3 +1,19 @@
/**
* Any object is printable if it implements the `IPrintable` interface.
*
* If you have a custom widget and would like to make it printable, then you
* should fulfil that interface on that widget by adding a `[printSymbol]` method.
*
* One way of printing is to use the `printd` function, which creates a hidden iframe
* and copies the DOM nodes from your widget to that iframe and printing just that iframe.
*
* To use this method in your widget, set the `[printSymbol]` method to `printd`.
* You can also provide custom args to that function, including CSS text to apply
* when printing.
*
* See https://github.com/joseluisq/printd#print
*/

import { Printd, PrintdCallback } from 'printd';
import { Widget } from '@phosphor/widgets';

Expand Down

0 comments on commit 708e465

Please sign in to comment.