Skip navigation.

一点笔记

简洁不等于简陋

在Opera中实现带格式复制

很多人都抱怨opera只能复制纯文本,不能复制网页图片和格式,不过现在已经有了一个解决方案。

先上一张效果图:


实现方法:
1.下载htm2clip.exe
2.Ctrl+F12->高级->下载->添加,MIME类型填text/cwf,选择"用其他应用程序打开",填入htm2clip.exe的路径
3.编辑菜单文件,在[Hotclick Popup Menu]下添加:
Platform Windows, Item, "Copy text with formatting"="Go to Page, "javascript:(function(){var html_selection=document.createElement('div'); html_selection.appendChild(window.getSelection().getRangeAt(0).cloneContents());var lnks = html_selection.getElementsByTagName('*'); for(var i=0, li; li=lnks[i]; i++){if(li.href)li.href=li.href;if(li.src)li.src=li.src};var fr=document.createElement('iframe'); fr.setAttribute('id', 'tr_dummy');fr.setAttribute('frameborder', '0');fr.setAttribute('style', 'width:0px;height:0px;visibility:hidden;position:absolute;left:-999em;');fr.setAttribute('src', 'data:text/cwf;charset=UTF-8,'+encodeURIComponent('SourceURL:'+document.location+'\r\n\r\n<html><head><meta http-equiv=Content-Type content=\'text/html; charset=utf-8\'></head><body><!--StartFragment-->'+html_selection.innerHTML+'<!--EndFragment--></body></html>'));document.documentElement.appendChild(fr); var tr=document.getElementById('tr_dummy');tr.parentNode.removeChild(tr);})()",,,"Copy""

4.enjoy it!:cheers:


附:


&#x6211;&#x8981;&#x5566;&#x514D;&#x8D39;&#x7EDF;&#x8BA1;

Opera FAQTPY图片下载器

Comments

cheney 28. April 2007, 09:26

应该很少会用得上吧

Csineneo 28. April 2007, 11:13

還是經常會用到的~~

Jack 2. May 2007, 13:26

不错不错

How to use Quote function:

  1. Select some text
  2. Click on the Quote link

Write a comment

Comment
(BBcode and HTML is turned off for anonymous user comments.)

If you can't read the words, press the small reload icon.


Smilies