PHP and Input Box

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
quadoc
Forum Contributor
Posts: 137
Joined: Fri Jul 01, 2005 5:33 pm
Location: Atlanta, GA

PHP and Input Box

Post 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... :?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post 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.
User avatar
quadoc
Forum Contributor
Posts: 137
Joined: Fri Jul 01, 2005 5:33 pm
Location: Atlanta, GA

Post 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?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post 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.
User avatar
quadoc
Forum Contributor
Posts: 137
Joined: Fri Jul 01, 2005 5:33 pm
Location: Atlanta, GA

Post by quadoc »

I guess I've to try some other methods. Thanks for the tips... :D
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post 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.
Post Reply