I can't even get perspective to recognize "Ctrl + v" event.
Thanks, this explains why all online app, wants a keyboard "Ctrl+v".
I tried, but this is outside my power.
Will need a JS and Python developer.
I can't even get perspective to recognize "Ctrl + v" event.
Thanks, this explains why all online app, wants a keyboard "Ctrl+v".
I tried, but this is outside my power.
Will need a JS and Python developer.
Wasn't too hard, 0.5.2 is available here.
Why would you want to target a textArea?
Are you trying to store the image and a text together?
Anyways i tried to push the files from the paste event to an ondrop event on the fileupload component but didnt have much luck yet.
I dont really know how the component works, and if it has something targetable for this to trigger its onfilerecieved event.
Edit, another way:
Def notperfect, but you should be able to do something with this. i wouldnt really use this, but i dont have time to look for something else atm.
pasteimg.zip (6.2 KB)
code = """<img style='display:none' src='/favicon.ico' onload=\"
const view = [...window.__client.page.views._data.values()].find(view => view.value.mountPath == this.parentNode.parentNode.parentNode.getAttributeNode('data-component-path').value.split('.')[0]).value;
window.addEventListener('paste', e => {
console.log(e.clipboardData.files);
const buffer = e.clipboardData.files[0].arrayBuffer();
buffer.then((x) => {
console.log(x);
let byteArray = btoa(String.fromCharCode(...new Uint8Array(x)));
console.log( byteArray);
view.custom.write('bites',byteArray);
});
});
\"></img>""".replace("\n", "").replace("\t", "")
return code