jquery-zclip icon indicating copy to clipboard operation
jquery-zclip copied to clipboard

Formatted text cannot be copy and paste.

Open Mazzzy opened this issue 11 years ago • 5 comments

The zclip plugin for copying text to clipboard works fine for plain text but not for formatted text.

I am having div with html as

<div id="formattedDiv">
  <b>Copied Text </b>
</div>

and when I apply zclip on some button to copy formmattedDiv text as

$("a#copyCustombtn").on('click', function (e) { e.preventDefault(); }).zclip({ path: 'http://www.steamdev.com/zclip/js/ZeroClipboard.swf', copy: function () { return $("#formattedDiv").html() } }); It copies entire html as <b>Copied Text </b>

When I try to paste, it pastes exactly <b>Copied Text </b>

but not formatted text as "Copied Text " - (in bold form)

Mazzzy avatar Oct 07 '14 09:10 Mazzzy

Hmm for me that would mean it works as expected and to be honest, I'm not sure how to implement this for your use case.

I'll have to give this some thought, if anyone has a good idea on how to solve this, suggestions are welcome :)

patricklodder avatar Oct 08 '14 19:10 patricklodder

That will be great !!! Because it will work like in MS Word, in which we copy html from any site and paste to Doc. :) I am excited for such functionality to be implemented. :+1:

Mazzzy avatar Oct 09 '14 04:10 Mazzzy

Hi

I see they are doing it at http://www.grandpublic.se/mailfooter/ using zclip. After filling out some informatin and clicking the textbox I can paste it formated into Word, Outlook and other applications. How did they solve it?

benjick avatar Mar 17 '15 10:03 benjick

Did you ever find a way to tackle this?

onegreenspider avatar Mar 17 '16 20:03 onegreenspider

I am using a different approach on creating the actual signature but the method to copy the finished design is the same although for some reason I am not getting the results I want. Part of the design is not being copied.
http://www.statustrucks.com/signature/index.php

Any suggestions?

Thanks in advance

onegreenspider avatar Mar 17 '16 21:03 onegreenspider