ForgeComponents
en

Components

j-Printer

jComponent 20 · jcomponent@20 component Example loaded with jComponent 20

The component can print a HTML content.

  • singleton

Configuration:

  • delay {Number} a delay for evaluating of printer (default: 500)
  • delayprint {Number} a delay for printing (default: 500)
  • delayclose {Number} a delay for closing window (default: 1000)

Methods:

// SETTER('printer/print', [title], html, test);

SETTER('printer/print', '<h1>Total.js Platform</h1>');

// Shows test window
SETTER('printer/print', '<h1>Total.js Platform</h1>', true);

Use it with <ui-component name="printer">. When the component is not loaded yet, jComponent downloads it on first use from the address in DEF.fallback (the Componentator CDN by default). Author: Peter Širka. Source: the Componentator components repository, MIT license.

example.html
<style>
	body { background-color: #D0D0D0; }
</style>

<ui-component name="printer"></ui-component>

<script>

	ON('ready', function() {
		SETTER('printer/print', '<h1>Total.js Platform</h1>');
	});

</script>