# j-ClipboardImage

> Acest component captează automat imagini în Clipboard.

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

Acest component captează automat imagini în Clipboard.


__Configurarea__:

- `quality {Number}` Calitatea JPEG (defaultă) `90`)
- `maxwidth {Number}` o lățime maximă (default: `1024`)
- `maxheight {Number}` o înălțime maximă (defață: `768`)
- `exec {String}` un link pentru a executa metoda dacă imaginea este obținută
- `disabled {Boolean}` poate dezactiva acest component
- Tipul de ieșire `type {String}`, susține `png` sau `jpg` (default)
- __NEW__ `output {String}` tip de ieșire `base64` (default) sau `file`

__Cum să captăm datele?__

```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) {
	});
});
```

Utilizați-l cu `<ui-component name="clipboardimage">`Când componenta nu este încă încărcată, jComponent Descărcați-l la prima utilizare de la adresa `DEF.fallback` (în cazul Componentator Autor: Peter Širka. sursă: Componentator Componente de stocare, MIT licență.

```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>
```
