| View previous topic :: View next topic |
| Author |
Message |
Boo Valued Contributor


Joined: 31 Oct 2003 Posts: 599 Location: Gulf Breeze, Florida USA
|
Posted: Mon Dec 19, 2005 6:54 pm Post subject: RTF/HTML in Clipboard? |
|
|
Hi All,
Let's say an enduser copies either Rich Text or HTML code into the Windows clipboard. Is there a way to determine which format it is (i.e. RTF or HTML)? As you know, the @clipbrd() function only retrieves plain text--not formatted text.
Thanks,
- Boo |
|
| Back to top |
|
 |
Serge Professional Member


Joined: 04 Mar 2002 Posts: 1480 Location: Australia
|
Posted: Tue Dec 20, 2005 12:53 am Post subject: |
|
|
not sure about rtf but if the clipboard contains text with html tags, then it would be html eg. <b>, <u>, <li>, <br> ... likewise look for rtf 'code' ... that's the way i would do it
serge _________________
|
|
| Back to top |
|
 |
Boo Valued Contributor


Joined: 31 Oct 2003 Posts: 599 Location: Gulf Breeze, Florida USA
|
Posted: Tue Dec 20, 2005 1:12 am Post subject: |
|
|
Hi Serge,
Yep, I tried that, but formatted text cannot be captured with @clipbrd(). That is, if you copy--for example--text directly from your Web browser into the clipboard. You an only retrieve the plain text. However, if you paste the clipboard contents directly into a WYSIWYG editor, it retains the HTML formatting...
Thanks,
- Boo |
|
| Back to top |
|
 |
Serge Professional Member


Joined: 04 Mar 2002 Posts: 1480 Location: Australia
|
Posted: Tue Dec 20, 2005 1:17 am Post subject: |
|
|
hi boo,
how about copying the contents to a rich text edit box using vdsobj.dll to test for the presence of html tags? you can hide that box behind another element which is what i do sometimes
serge _________________
|
|
| Back to top |
|
 |
Boo Valued Contributor


Joined: 31 Oct 2003 Posts: 599 Location: Gulf Breeze, Florida USA
|
Posted: Tue Dec 20, 2005 2:07 am Post subject: |
|
|
Hmmmm,
I'll give it a shot. I tried that using a non-VDS RTF editor, but the text was converted to HTML.
Thanks. |
|
| Back to top |
|
 |
Serge Professional Member


Joined: 04 Mar 2002 Posts: 1480 Location: Australia
|
Posted: Tue Dec 20, 2005 2:29 am Post subject: |
|
|
you could also use the browser element, paste from the clipboard there, save to a temp file, open the temp file into a list to see if there are any html <.> code
serge _________________
|
|
| Back to top |
|
 |
Boo Valued Contributor


Joined: 31 Oct 2003 Posts: 599 Location: Gulf Breeze, Florida USA
|
Posted: Thu Dec 22, 2005 3:05 pm Post subject: |
|
|
Hi Serge,
Just to let you know, I tried all of your suggestions, but still to no avail. However, thanks anyway.
Happy Holidays!
Cheers,
- Boo |
|
| Back to top |
|
 |
Serge Professional Member


Joined: 04 Mar 2002 Posts: 1480 Location: Australia
|
Posted: Thu Dec 22, 2005 3:17 pm Post subject: |
|
|
sorry i could not help
serge _________________
|
|
| Back to top |
|
 |
|