如何使用jquery编码进行剪切,复制,粘贴? [英] how to do the cut, copy, paste using jquery coding?

查看:90
本文介绍了如何使用jquery编码进行剪切,复制,粘贴?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试在execCommand()的帮助下使用jQuery创建RichText编辑器。



但是以下代码:



 execCommand('  cut',< span class =code-keyword> false , null );,execCommand('  copy' false  null ); ,execCommand('  paste' false  null ); 



无法在Mozilla Firefox,Google Chrome和其他浏览器中使用。



是否有可能使用execCommand()执行剪切,复制和粘贴操作,或者还有其他方法可以在我的RichText编辑器中执行剪切,复制和粘贴操作?

解决方案例

参考:复制,剪切和粘贴文本在一个WYSIWYG [ ^ ]

I tried to create a RichText Editor using jQuery with the help of execCommand().

But the following code:

execCommand ('cut',false,null);, execCommand ('copy',false,null);, execCommand ('paste',false,null);


Is not working in Mozilla Firefox, Google Chrome and some other browsers.

Are there any possibilities to do the Cut, Copy and Paste actions using execCommand() or there is any other method to do the Cut, Copy and Paste actions in my RichText Editor?

解决方案

Refer: Copy, Cut and Paste text within a WYSIWYG[^]


这篇关于如何使用jquery编码进行剪切,复制,粘贴?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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