Text highlighting in iPhone's Safari?

Discussion in 'Jailbreaks and iOS Hacks' started by tmiw, Jun 26, 2007.

  1. tmiw macrumors 68000

    Joined:
    Jun 26, 2007
    Location:
    San Diego, CA
    #1
    I'm working on an application in my spare time that relies pretty heavily on highlighting text. I've already fixed some obvious rendering issues using Safari on my MacBook Pro (along with some testing with iPhoney), but what about the actual act of highlighting? From what I've watched of the demo videos, that doesn't seem to be very intuitive to do, assuming it's even possible. Alternatively, is there a way to mark certain places in the page using mouse clicks and then create a selection from that?

    Thanks!
     
  2. Justinerator macrumors 6502

    Justinerator

    Joined:
    Jun 26, 2007
    Location:
    Redondo Beach, CA
    #2
    that's a good question. I'd like to know that too...
     
  3. diabolic macrumors 68000

    Joined:
    Jun 13, 2007
    Location:
    Austin, Texas
    #3
    One of the first reviews mentioned there was no way to select/cut/paste on the iPhone. I still find that hard to believe.
     
  4. Icebird macrumors member

    Joined:
    Jun 25, 2007
    #4
    It's very possible. Apple is selling this as a phone that doesn't have any menu's in any of the programs because it's supposed to be so intuitive that you only need a "tap, flick, or pinch" on all applications to perform all tasks.
    I don't see how you would use those 3 motions to perform a cut/paste command. But hopefully they'll be able to update the phone with the ability to do it in the future.
    It's all about having those hidden commands like on a mac where "shift+command+3" is taking a screen shot for instance. That's all they really need is some command sequence.
     
  5. fishkorp macrumors 68020

    fishkorp

    Joined:
    Apr 10, 2006
    Location:
    Ellicott City, MD
    #5
    yes, using javascript events you can get the position of a mouse click, etc. it's usually a real pain in the ass to deal with because different browsers handle it differently. the plus side is that you only have one browser to worry about. the minus side is that most of those types of scripts available in tutorials don't work in Safari.

    usually things like highlighting words or underlining words is done by first converting the text area into a div, then finding the text you want to highlight and wrap it in a span tag that has a CSS class doing the stuff like setting the background color.
     
  6. peterrosen macrumors newbie

    peterrosen

    Joined:
    Jul 3, 2007
    #6
    Seeking Iphone App to search Text

    I find that most notepad apps and the notes app do not allow searching for text within a note entry and THEN HIGHLIGHTING IT. Some will get to the note because 1300 characters in the discovered the string you were searching for, but none that I CAN FIND (please help) allow for the target word of phrase to be highlighted upon discovery, i.e. the app will not only find the note with the desired word, it will scroll down to that word, phrase, etc.

    Is there something that does a word level search and then HIGHLIGHTS the desired word?

    thanks in advance,
    Peter
     
  7. thep33t macrumors regular

    Joined:
    Jun 18, 2009

Share This Page