Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Highlighting text

Reply
Thread Tools

Highlighting text

 
 
JemPower
Guest
Posts: n/a
 
      10-31-2003
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


 
Reply With Quote
 
 
 
 
Natty Gur
Guest
Posts: n/a
 
      11-02-2003
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!
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Syntax Highlighting (Swing) Text Panel macdonag@googlemail.com Java 0 05-22-2007 04:11 PM
Highlighting text with jpg background. Ed HTML 1 05-16-2007 03:14 PM
Highlighting part of the text in a text box Aria Javascript 3 10-13-2005 12:30 PM
input text highlighting problem Xavier Bourguignon HTML 7 10-30-2003 10:01 AM
Code Text Highlighting Question Alan Cantor ASP .Net 0 10-07-2003 08:08 PM



Advertisments