# j-ClipboardImage

> Ten element automatycznie rejestruje obrazy w Clipboard.

Framework: jcomponent20
Product: jComponent 20 (jcomponent@20)
Language: pl
Content-SHA256: f335315968dc6482f2e496379e60fdd2aead02d29decff1ec67ca219b12f1337
Snapshot: c0700e321579725c5cf4f5ace1ad7d2866d1b4f93c24a63c0b41b6b7998e976c
Sources: components@910ed1a86f6e72b4f031d3ad0dc7844f9fc5cb8e
Review: not-recorded

Ten element automatycznie rejestruje obrazy w Clipboard.


__Konfiguracja__:

- Jakość `quality {Number}` JPEG (default: `90`)
- `maxwidth {Number}` maksymalna szerokość (default: `1024`)
- Maksymalna wysokość `maxheight {Number}` (default: `768`)
- `exec {String}` link do wykonania metody, jeśli obraz jest uzyskany
- `disabled {Boolean}` może wyłączyć ten składnik
- Typ wyjścia `type {String}`, obsługuje `png` lub `jpg` (default)
- __NEW__ `output {String}` rodzaj wyjścia `base64` (default) lub `file`

__Jak złapać dane?__

```javascript
// Attach event
ON('clipboardimage', function(base64) {
	// We have to send data on the server in Base64 format
	AJAX('POST /upload/', { file: base64 }, function(response) {
	});
});
```

Użyj go z `<ui-component name="clipboardimage">`Gdy element nie jest jeszcze ładowany, jComponent Pobierz go po pierwszym użyciu z adresu `DEF.fallback` (Wydaje się Componentator Autor: Peter Širka Źródło: Componentator Zestaw składników, licencja MIT.

```html example.html
<ui-component name="clipboardimage" config="quality:90"></ui-component>
<div>Create a screenshot into the clipboard and press shortcuts CMD+V or CTRL+V into the iFrame (iFrame has to be focused).</div>
<br />
<div id="output"></div>

<script>
	ON('clipboardimage', function(base64) {
		var img = new Image();
		img.src = base64;
		$('#output').empty().append(img);
	});
</script>
```
