forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


RTF/HTML in Clipboard?

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
Boo
Valued Contributor
Valued Contributor


Joined: 31 Oct 2003
Posts: 599
Location: Gulf Breeze, Florida USA

PostPosted: Mon Dec 19, 2005 6:54 pm    Post subject: RTF/HTML in Clipboard? Reply with quote

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
View user's profile Send private message
Serge
Professional Member
Professional Member


Joined: 04 Mar 2002
Posts: 1480
Location: Australia

PostPosted: Tue Dec 20, 2005 12:53 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website MSN Messenger
Boo
Valued Contributor
Valued Contributor


Joined: 31 Oct 2003
Posts: 599
Location: Gulf Breeze, Florida USA

PostPosted: Tue Dec 20, 2005 1:12 am    Post subject: Reply with quote

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
View user's profile Send private message
Serge
Professional Member
Professional Member


Joined: 04 Mar 2002
Posts: 1480
Location: Australia

PostPosted: Tue Dec 20, 2005 1:17 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website MSN Messenger
Boo
Valued Contributor
Valued Contributor


Joined: 31 Oct 2003
Posts: 599
Location: Gulf Breeze, Florida USA

PostPosted: Tue Dec 20, 2005 2:07 am    Post subject: Reply with quote

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
View user's profile Send private message
Serge
Professional Member
Professional Member


Joined: 04 Mar 2002
Posts: 1480
Location: Australia

PostPosted: Tue Dec 20, 2005 2:29 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website MSN Messenger
Boo
Valued Contributor
Valued Contributor


Joined: 31 Oct 2003
Posts: 599
Location: Gulf Breeze, Florida USA

PostPosted: Thu Dec 22, 2005 3:05 pm    Post subject: Reply with quote

Hi Serge,

Just to let you know, I tried all of your suggestions, but still to no avail. However, thanks anyway. Smile

Happy Holidays!

Cheers,

- Boo
Back to top
View user's profile Send private message
Serge
Professional Member
Professional Member


Joined: 04 Mar 2002
Posts: 1480
Location: Australia

PostPosted: Thu Dec 22, 2005 3:17 pm    Post subject: Reply with quote

sorry i could not help Crying or Very sad Crying or Very sad Crying or Very sad

serge

_________________
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group