所见即所得的图像复制/粘贴 [英] Wysiwyg with image copy/paste

查看:28
本文介绍了所见即所得的图像复制/粘贴的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

首先,我知道图像不能从本地机器复制"到网站.我知道它必须上传.我是一名网络程序员,熟悉常用的网络所见即所得工具,如TinyMCE和FCKEditor.我的问题是,是否存在程序或网络模块或类似的东西,可以为所见即所得自动上传图像.我有一个客户经常抱怨无法将带有图像的文档从 MS Word 复制/粘贴到所见即所得中以在他们的网站上创建内容.

First, I understand that an image cannot be "copied" from a local machine into a website. I understand that it must be uploaded. I am a web programmer, and am familiar with common web wysiwyg tools such as TinyMCE and FCKEditor. My question is if there exists a program or web module or something of the sort that works will perform an automatic upload of images for a wysiwyg. I have a client that is constantly complaining about not being able to copy/paste documents with images from MS Word into a wysiwyg to create content on their website.

我研究了 TX Text Control (http://labs.textcontrol.com/) 并且是调查可能的闪光所见即所得,可以在幕后自动上传文件.我不知道这是否存在,而且 google 对我的搜索没有太大帮助,所以我想我会问其他编码员.

I have looked into TX Text Control (http://labs.textcontrol.com/) and was looking into a possibly flash wysiwyg that could upload the file automatically behind the scenes. I don't know if this exists, and google did not much help me in my search, so I thought I would ask other coders.

我对任何类型的服务器技术或浏览器要求持开放态度.我正在寻找一些基于浏览器的工具,而不是 Dreamweaver 或其他应用程序工具.

I am open to any sort of server technology, or browser requirements. I am looking for some browser based tool instead of an application tool such as Dreamweaver or otherwise.

如果问题没有好的解决方案,我现在愿意接受.

If no good solution to the problem exists, I am willing to accept that at this point.

注意:这是一个客户的要求,对我来说似乎很不合理.我决定收集社区建议,而不是仅仅告诉客户不",这里的选项在提出可能的解决方案方面非常有帮助和信息量.

Note: This was a request from a client, and to me it seemed rather unreasonable. I decided to gather community advice instead of just tell the client 'No' and the options here have been extremely helpful and informative in presenting possible solutions.

推荐答案

您可能会从 中找到灵感截图我.

基本上你需要不同的部分:

Basically you need different parts:

  • 将图像从剪贴板中取出并将其上传到网络的东西:这可以是 java 小程序、flash 或 firefox 扩展.Flash 或 Java 具有跨浏览器的优势
  • 然后使用 <canvas> 标签显示上传后的图像(使用 explorercanvascanvas 带到 Internet Explorer)
  • something that takes the image out of the clipboard and uploads it to the web: this could be a java applet, flash or firefox extensions. Flash or Java would have the advantage of being cross browser
  • then you use the <canvas> tag to display the image once it has been uploaded (use explorercanvas to bring canvas to Internet Explorer)

正如我在评论中指出的那样,谷歌正在停止支持 HTML5 的齿轮,看看 7 用户交互 - HTML 5.

As I pointed out in my comment, Google is discontinuing gears in favor of HTML5, have a look at 7 User Interaction - HTML 5.

HTML5 在实现时应该与系统的剪贴板进行交互.我想以下场景会起作用:

HTML5 when implemented is supposed to interact with the system's clipboard. I imagine the following scenario would work:

  • paste the image data from clipboard to canvas
  • get the canvas pixel data back as an image using toDataURL(): see Canvas2Image
  • upload the image to server when submitting: see Saving canvas image with PHP

在实施 HTML5 复制/粘贴拖放之前,您将不得不依赖 Flash 或(签名的)Java 小程序 与剪贴板交互.

Until HTML5 copy/paste drag&drop is implemented, you'll have to rely on Flash or a (signed) Java applet to interact with the clipboard.

这篇关于所见即所得的图像复制/粘贴的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆