English 中文(简体)
我能否把图像数据与贾瓦文联系起来? [复制]
原标题:Can I paste image data with JavaScript? [duplicate]

我们如何用javascript从纸板上抹去图像,使之成为习惯丰富的文字编辑? (ctrl+c and ctrl+v or a snapshot).

是否有任何人使用Ajax丰富的文字编辑? 是否将图像从剪辑到Ajax RTE工作?

问题回答

由于这个问题经常出现在谷歌搜索结果中,我要指出,今天在所有现代浏览器(2018年)中,至少在谷歌·

Gmail和谷歌12+的剪辑功能中的过去形象如何?

To help others, I ll leave the link here with the answer made by Nick Rattalack

// window.addEventListener( paste , ... or
document.onpaste = function(event){
  var items = (event.clipboardData || event.originalEvent.clipboardData).items;
  console.log(JSON.stringify(items)); // will give you the mime types
  for (index in items) {
    var item = items[index];
    if (item.kind ===  file ) {
      var blob = item.getAsFile();
      var reader = new FileReader();
      reader.onload = function(event){
        console.log(event.target.result)}; // data url!
      reader.readAsDataURL(blob);
    }
  }
}

Gmail和谷歌12+的剪辑功能中的过去形象如何?

不幸的是, 不可能从您的剪辑板上传承一个形象。

如果你照像Microsoft Word这样的台式镜像复制一幅镜像和一些文字,那么图像将变成一个破碎的参考资料(尽管比例将正确),文本将正确贴出(格式将丢失)。

唯一可能的事情是复制教育、科学和技术部内部的形象,并在教育、科学和技术部内部重印。





相关问题
selected text in iframe

How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.

How to fire event handlers on the link using javascript

I would like to click a link in my page using javascript. I would like to Fire event handlers on the link without navigating. How can this be done? This has to work both in firefox and Internet ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Clipboard access using Javascript - sans Flash?

Is there a reliable way to access the client machine s clipboard using Javascript? I continue to run into permissions issues when attempting to do this. How does Google Docs do this? Do they use ...

javascript debugging question

I have a large javascript which I didn t write but I need to use it and I m slowely going trough it trying to figure out what does it do and how, I m using alert to print out what it does but now I ...

Parsing date like twitter

I ve made a little forum and I want parse the date on newest posts like twitter, you know "posted 40 minutes ago ","posted 1 hour ago"... What s the best way ? Thanx.

热门标签