From: galactic on
On Mar 25, 12:28 pm, Antony Scriven <adscri...(a)gmail.com> wrote:
> On Mar 25, 4:07 pm, galactic wrote:
>
>  > I just need to know if you know what format to place
>  > instead of "Text"
>  >
>  >   window.clipboardData.setData("Text", rng.htmlText);
>  >
>  > I need it to show up in the clipboard as Rich Text only.
>
> Look up clipboardData on msdn. --Antony

Thanks, but I have. It does not give accurate information for
javascript. It will for aspx...

I'm trying to get this done in javascript, and the acceptable datatype
is "Rtf" according to the MSDN website - but this does not work for
me... any ideas?

-galactic
From: Antony Scriven on
On Mar 25, 6:28 pm, galactic wrote:

> On Mar 25, 12:28 pm, Antony Scriven <adscri...(a)gmail.com>
> wrote:
>
> > On Mar 25, 4:07 pm, galactic wrote:
>
> > > I just need to know if you know what format to place
> > > instead of "Text"
> > >
> > >   window.clipboardData.setData("Text", rng.htmlText);
> > >
> > > I need it to show up in the clipboard as Rich Text only.
>
> > Look up clipboardData on msdn. --Antony
>
> Thanks, but I have. It does not give accurate information
> for javascript. It will for aspx...

It's a host object specific to IE.

> I'm trying to get this done in javascript, and the
> acceptable datatype is "Rtf" according to the MSDN
> website - but this does not work for me... any ideas?

I don't know where you got that from. From MSDN:

| Parameters
| sDataFormat Required. A String that specifies the format
| of the data to be transferred, using one of
| the following values.
|
| Text Transfers data formatted as text.
| URL Transfers data formatted as a URL.
From: Bwig Zomberi on
Dr J R Stockton wrote:
> In comp.lang.javascript message<ho9s6p$c46$1(a)speranza.aioe.org>, Tue,
> 23 Mar 2010 13:26:48, Bwig Zomberi<zomberiMAPSONNOSPAM(a)gmail.com>
> posted:
>
>> Not sure what you mean by RTF format.
>
> Wikipedia knows :<http://en.wikipedia.org/wiki/RTF> #1.
>

Thanks. But, RTF could mean the Word processing format from Microsoft,
which is coded in text. What Galactic mean was probably rich text or
formatted web page content.

--
Bwig Zomberi
From: Bwig Zomberi on
galactic wrote:
>
> Thank you BWig,
>
> I just need to know if you know what format to place instead of "Text"
>
> window.clipboardData.setData("Text", rng.htmlText);
>
> I need it to show up in the clipboard as Rich Text only.
>

Suppose you have a paragraph in a web page (in IE of course) and want
to copy the para with all its formatting as rich text. First, create a
range out of paragraph element with CreateRange. Then use the method
execCommand("Copy") on that range. This will copy the paragraph rich
text to the clipboard.

*You do not have to get your hands dirty with window.clipboardData.*

After you do this, the copied paragraph is available for programs that
can handle rich text in the clipboard. For example, you can open a New
Message window in Outlook or a Word document and do a Paste command.

execCommand will work on a document, range or selection.

BTW, I hope by Rich Text you meant formatted web page content, not
Microsoft Word RTF. MS' RTF is also coded in text and can possibly be
done in JavaScript but your brain will melt.


--
Bwig Zomberi
From: galactic on
On Mar 26, 1:32 am, Bwig Zomberi <zomberiMAPSONNOS...(a)gmail.com>
wrote:
> galactic wrote:
>
> > Thank you BWig,
>
> > I just need to know if you know what format to place instead of "Text"
>
> >    window.clipboardData.setData("Text", rng.htmlText);
>
> > I need it to show up in the clipboard as Rich Text only.
>
> Suppose you have a paragraph in a web page (in IE of course) and want
> to copy the para with all its formatting as rich text. First, create a
> range out of paragraph element with CreateRange. Then use the method
> execCommand("Copy") on that range. This will copy the paragraph rich
> text to the clipboard.
>
> *You do not have to get your hands dirty with window.clipboardData.*
>
> After you do this, the copied paragraph is available for programs that
> can handle rich text in the clipboard. For example, you can open a New
> Message window in Outlook or a Word document and do a Paste command.
>
> execCommand will work on a document, range or selection.
>
> BTW, I hope by Rich Text you meant formatted web page content, not
> Microsoft Word RTF. MS' RTF is also coded in text and can possibly be
> done in JavaScript but your brain will melt.
>
> --
>   Bwig Zomberi

Bwig,

Yes I believe the format is the Microsoft RTF - specifically I need to
be able to paste a ready made URL - complete with hidden A tag - into
Outlooks Signature box. The Outlook Signature interface (outlook
version 2003 11.8) will only accept a url as a Microsoft RTF Piece!
(Tools->Options->tabMailFormat->Signiatures.
It will not accept - say an "A" tag.. any HTML just get's copied as
"shown" HTML tags... but It will accept a Microsoft Document copied
URL from Excel or Word.. My business requirements are to be able to
leverage this type of copy straight from a web page...
I learned a little Rtf language, but need to tell the copy mechanism
this is the type of format I'm using...

Thanks for really trying to understand. I appreciate any help you can
suggest more than you know.

-William