Page 1 of 1

PHP and Input Box

Posted: Thu Sep 01, 2005 12:40 pm
by quadoc
I'm trying to create a input box to let the user cut and paste text, graphics, etc... Could someone tells me is there anything out there? Please post some tips. Thanks... :?

Posted: Thu Sep 01, 2005 12:46 pm
by feyd
pasting graphics.. exactly what form of "pasting" are we talking here? Like I copied an image from my machine and I paste it, thus showing the image? That I know of, that's not exactly possible. The problem is, how does the clipboard know what to give you? The location of the image? The image data itself? That's pretty browser and system specific... Text is far easier.

Now, if you wanted instead dragging and dropping an image onto the page, that may be possible, at least in IE.

It sounds like you are making an RTE.

Posted: Thu Sep 01, 2005 12:54 pm
by quadoc
Yes, sounds like I need a "RTF". What I'm trying to do is to have an input box where user can paste a screen capture. Is it possible?

Posted: Thu Sep 01, 2005 12:58 pm
by feyd
I'm not aware of any way, because as I said, the browser (at the least) would have to know how to paste it into the browser. Since it's a screen capture, the raw image data is stored in the clipboard. An ActiveX could act as a helping agent to mitigate the translation, an extension with Firefox would also be needed if you wanted compatibility, I'd imagine. Firefox, by itself has no idea how to paste such a context.

Posted: Thu Sep 01, 2005 1:05 pm
by quadoc
I guess I've to try some other methods. Thanks for the tips... :D

Posted: Thu Sep 01, 2005 1:14 pm
by feyd
most RTE editors I believe use things like dynamically created file upload fields to attach images to an edit, and also have their own server-side image sets that can be viewed and selected from. But a file would be needed no matter what with those.