Special Paste

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Special Paste

charles61
I having been trying to implement Paste and Match Style found on Pages app and also on Word, which is called Paste Special, where the text contents of the clipboard are pasted into a document that matches the existing font and font style in the document.  

I searched the Rev and LC archives and could not find any examples.  Does anyone have a script for this?



Charles Szasz
[hidden email]




_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Special Paste

Bob Sneidar-2
I believe there is the clipboardData ["html"] and clipboardData ["rtf"].

Bob S


> On Oct 24, 2016, at 12:29 , Charles Szasz <[hidden email]> wrote:
>
> I having been trying to implement Paste and Match Style found on Pages app and also on Word, which is called Paste Special, where the text contents of the clipboard are pasted into a document that matches the existing font and font style in the document.  
>
> I searched the Rev and LC archives and could not find any examples.  Does anyone have a script for this?
>
>
>
> Charles Szasz
> [hidden email]
>
>
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
hh
Reply | Threaded
Open this post in threaded view
|

Re: Special Paste

hh
In reply to this post by charles61
@Bob.
After your answer I read Charles' question again. Probably he asks
for the other way: how to match the styled text of the 'paste-target'
*in LC*?

@Charles. If this is correct, then you could try to insert the
clipboardData["text"] or use menu Edit > Paste Unformatted.
This has no style and thus inherits the style of the current
paste-location (that may be also inherited).

If you use or need *Unicode* for pasting you could use a plain-text-key
of the rawClipboardData. This requires LC 8 or later and is dependent
of the current OS (see dictionary entry to rawClipboardData).



_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Special Paste

Stephen Barncard-4
In reply to this post by Bob Sneidar-2
I've updated my clipboard data exploring stack to include RAW clipboard
data.
There's suddenly a lot of data in the clip.   A good test is a Pages, Web
or Word document text copied..

version 8  (legacy!)  version
 go URL "http://fulton.barncard.com/stax/clipboardTest(8).livecode"
version 9
go URL "http://fulton.barncard.com/stax/clipboardTest(9.0).livecode"

I hope this helps you in your quest.

sqb


Stephen Barncard - Sebastopol Ca. USA -
mixstream.org

On Mon, Oct 24, 2016 at 4:01 PM, Bob Sneidar <[hidden email]>
wrote:

> I believe there is the clipboardData ["html"] and clipboardData ["rtf"].
>
> Bob S
>
>
> > On Oct 24, 2016, at 12:29 , Charles Szasz <[hidden email]> wrote:
> >
> > I having been trying to implement Paste and Match Style found on Pages
> app and also on Word, which is called Paste Special, where the text
> contents of the clipboard are pasted into a document that matches the
> existing font and font style in the document.
> >
> > I searched the Rev and LC archives and could not find any examples.
> Does anyone have a script for this?
> >
> >
> >
> > Charles Szasz
> > [hidden email]
> >
> >
> >
> >
> > _______________________________________________
> > use-livecode mailing list
> > [hidden email]
> > Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-livecode
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
hh
Reply | Threaded
Open this post in threaded view
|

Re: Special Paste

hh
In reply to this post by charles61
@Stephen.
This is really a great stack. TMHO, it should become a 'standard'
plugin for LC 8/9 (the 'old' clipboardData-version for LC 6/7).
In the meantime, please upload it to "Sample Stacks" (livecodeshare)?

> Stephen B. wrote:

> I've updated my clipboard data exploring stack to include RAW clipboard
> data. There's suddenly a lot of data in the clip. A good test is a Pages,
> Web or Word document text copied.
> version 8 (legacy!) version
>  go URL "http://fulton.barncard.com/stax/clipboardTest(8).livecode"
> version 9
>  go URL "http://fulton.barncard.com/stax/clipboardTest(9.0).livecode"


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Special Paste

Bob Sneidar-2
In reply to this post by hh
Oh right got it backwards.

Bob S


> On Oct 24, 2016, at 18:41 , hh <[hidden email]> wrote:
>
> @Bob.
> After your answer I read Charles' question again. Probably he asks
> for the other way: how to match the styled text of the 'paste-target'
> *in LC*?
>
> @Charles. If this is correct, then you could try to insert the
> clipboardData["text"] or use menu Edit > Paste Unformatted.
> This has no style and thus inherits the style of the current
> paste-location (that may be also inherited).
>
> If you use or need *Unicode* for pasting you could use a plain-text-key
> of the rawClipboardData. This requires LC 8 or later and is dependent
> of the current OS (see dictionary entry to rawClipboardData).
>
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode