Highlighting text

Discussion in 'ASP .Net' started by JemPower, Oct 31, 2003.

  1. JemPower

    JemPower Guest

    Hi All,

    I'm trying to create a VERY simple text editing page, using a textbox that
    the user can type, and some buttons to make the selected text bold, italic,
    underline, etc, etc.

    I've seen a few example that use the DIV and CONTENTEDITABLE, and the
    "ExecCommand" however I have 2 problems with this. Firstly, whilst it
    works, the VS.NET IDE underlines this words as an invalid command. The
    second problem (and more serious), is that some of our customers are Mac
    users, and this doesn't work at all.

    Therefore, I thought if I could revert to standard controls, it should be
    compatable with PC and Mac.

    However I'm stuck at the first hurdle, I simply can't see anywhere that I
    can modify what text is highlighted in the textbox!!

    Does anyone have any ideas over this, it's really driving me mad...!

    TIA
     
    JemPower, Oct 31, 2003
    #1
    1. Advertising

  2. JemPower

    Natty Gur Guest

    Hi,

    You can achieve it (and much more) using TextRange select method.
    (Client side DHTML)

    Natty Gur[MVP]
    Phone Numbers:
    Office: +972-(0)9-7740261
    Fax: +972-(0)9-7740261
    Mobile: +972-(0)58-888377


    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
     
    Natty Gur, Nov 2, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Alan Cantor

    Code Text Highlighting Question

    Alan Cantor, Oct 7, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    478
    Alan Cantor
    Oct 7, 2003
  2. Xavier Bourguignon

    input text highlighting problem

    Xavier Bourguignon, Oct 29, 2003, in forum: HTML
    Replies:
    7
    Views:
    983
  3. Ed
    Replies:
    1
    Views:
    388
    John Hosking
    May 16, 2007
  4. Replies:
    0
    Views:
    396
  5. Aria
    Replies:
    3
    Views:
    107
    Janwillem Borleffs
    Oct 13, 2005
Loading...

Share This Page