dcsimg
www.webdeveloper.com
Results 1 to 15 of 15

Thread: Image instead of a letter.

  1. #1
    Join Date
    Aug 2010
    Posts
    32

    Image instead of a letter.

    Hello, all! I had a few quick questions...and then some, perhaps.

    Is it possible to make it so that when someone presses a certain key, or sequence of keys, on their keyboard a picture is posted instead of a letter? As in, if I type shift+c in a textarea or input box could an image be placed inside the textarea or input box instead of a "C"? If so, how can that be accomplished? Thanks!

    - Lono

  2. #2
    Join Date
    Dec 2005
    Location
    FL
    Posts
    7,440

    Lightbulb Something to consider ...

    I'm pretty sure you cannot post an image to a textarea or textbox region.

    You might consider looking at the key entered and:
    1. post an image to one or several <div> backgrounds
    2. or possibly have the images hidden and display them when the key is received.

    Might be pretty slow unless the images are pre-loaded.

  3. #3
    Join Date
    Aug 2010
    Posts
    32

    What about in email boxes?

    You can put images in email boxes...so why not a regular textarea or input box? It just seems like this would have been done a long time ago simply because it's been a feature on yahoo email and gmail for years and years. That's odd. If anyone wants to give it shot I'm sure we'd all like to see it.

    - Lono

  4. #4
    Join Date
    Dec 2005
    Location
    FL
    Posts
    7,440

    Exclamation

    Quote Originally Posted by lonoman View Post
    You can put images in email boxes...so why not a regular textarea or input box? It just seems like this would have been done a long time ago simply because it's been a feature on yahoo email and gmail for years and years. That's odd. If anyone wants to give it shot I'm sure we'd all like to see it.

    - Lono
    I don't think that section of yahoo and email boxes are written in javascript.
    You might try looking into some server-side code.

  5. #5
    Join Date
    Jul 2010
    Posts
    22
    from what i know, an iframe with designMode = 'On'; works as an editable area where you can insert whatever tickles your fancy.
    i haven't tried it myself, so i can't recommend it, but it looks like something you might find useful

  6. #6
    Join Date
    Aug 2010
    Posts
    32
    That definitely looks like an option. However, how could I make it so that the user could type a message just like a textarea? If that can be solved then that idea really seems to be perfect. Thanks for that!

    - Lono

  7. #7
    Join Date
    Dec 2005
    Location
    FL
    Posts
    7,440
    Why bother with a one browser only solution?

  8. #8
    Join Date
    Aug 2010
    Posts
    32
    Why is that only a one browser solution? I really only need it to be a two browser solution...IE and Firefox. It's just for a little personal site. If that won't work in both browsers, do you have any better suggestions? Thanks, to you both!

    - Lono

  9. #9
    Join Date
    Jan 2009
    Posts
    3,346
    You might look at how other WYSIWYG (what you see is what you get) editors handle this issue. Most of them either recreate a container element and toggle between allowing the rendered source to be viewed and a regular text component showing the source...or they use an iframe (or similar concept) with much the same effect.

  10. #10
    Join Date
    Aug 2010
    Posts
    32
    What do you mean by WYSIWYG editors? Do you mean like Dreamweaver and HomeSite? I'm not using any editors. I used to make websites professionally, but I used freelance JavaScript writers for that. Now I'm just doing a little personal site for my mom.

    Anyway, is there anyway to put a transparent object directly over a textarea (and I mean like the textarea is basically a background for the object) so that the text typed in the textarea is printed on the object in realtime? I think someone mentioned a similar idea in another thread a few days ago. Is that something that can be done to simulate a textarea containing an image? Thanks!

    - Lono

  11. #11
    Join Date
    Jan 2009
    Posts
    3,346
    What do you mean by WYSIWYG editors?
    I mean like what you are typing in here to post on this forum (or if you write emails in a webmail service).

  12. #12
    Join Date
    Aug 2007
    Posts
    3,767
    You are looking for a Rich Text Editor. A google search will turn up plenty of examples (TinyMCE springs to mind). They normally use an iFrame to display the content. Some, like TinyMCE I think, work with JavaScript disabled by defaulting to a textarea, others just fail completely if JavaScript is disabled.

  13. #13
    Join Date
    Dec 2005
    Location
    FL
    Posts
    7,440

    Talking

    Quote Originally Posted by lonoman View Post
    What do you mean by WYSIWYG editors? ...
    - Lono
    What You See Is What You Get - WYSIWYG - pronounced "Wiz-E-Wig"

  14. #14
    Join Date
    Aug 2010
    Posts
    32
    Quote Originally Posted by JMRKER View Post
    What You See Is What You Get - WYSIWYG - pronounced "Wiz-E-Wig"
    I knew what it stood for. Criterion9 spelled it out in his post. Thanks, though.

  15. #15
    Join Date
    Dec 2005
    Location
    FL
    Posts
    7,440

    Arrow

    Short post ... I missed it.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles