codetoad.com
  ASP Shopping Cart, Forum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  Javascript create line selection  Archive Import (Andy) at 08:07 on Friday, July 11, 2003
 

Hi,

I am building an editor for the web in Javascript. I need to force an action on a selection. This selectin may not have been made though e.g. you can select indent on highlighted code and just that gets highlighted, but if u press indent and no code is highlighted it should still ident the entire line. I need to be able to create a selection of the whole line iof there currently is no selection. i have managed to determine there is no selection, but i dont know how to then go and create a selection of the line we are currently on.

Anyone got any ideas?

Cheers

  Re: Javascript create line selection - HTMLarea  Troy Wolf at 12:51 on Tuesday, July 15, 2003
 

Well, I`ve done some things like this, and always ran into complicated cross-browser issues..however, I can recommend a source that can give you a lot of advanced code techniques to do what you want. In fact, this free tool may even be the web-editor tool you want to create anyway! I was building a tool for my clients to edit their web pages myself, until I found this sweet tool! It is called HTMLarea (no I have no affiliation whatsoever). Go to the website and check out the demo. I`m using this--there are no components to install. Just one big javascript include and a couple support HTML files.

http://www.interactivetools.com/products/htmlarea/
Troy Wolf: site expert
SnippetEdit Website Editor


  Re: Javascript create line selection  Archive Import (Andy Perkins) at 12:57 on Tuesday, July 15, 2003
 

Cheers, but funnily enough - its htmlArea3 that i am developing further

Andy

  Re: Javascript create line selection  Troy Wolf at 13:19 on Tuesday, July 15, 2003
 

That`s funny! By the time you work out your code to work the way you want, the darn browser object model will change! ARGH! Well, good luck!

This whole Internet thing is just a phase anyway. I`m going to quit programming and open a taco stand. Who`s with me?! Anyone?! Anyone?!
Troy Wolf: site expert
SnippetEdit Website Editor









CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums








Recent Forum Threads
•  matrix addition
•  Re: Storing data from HTML to Excel or TXT
•  Re: function within loop problem
•  Re: Ô‡´ò¥¯¥é¥Ö¤Ã� ¥Æ©`¥é©`¥á¥¤¥É£ò£±£±¥¢¥¤¥¢¥ó ¤Î£··¬ ¤Ç¤¹
•  Re: Replace
•  Re: タイトリスト AP2アイアン 712ã�®æƒ…å �
•  Re: SMS from Perl using HTTP request
•  Re: Charl Schwartzel
•  Re: Adhyayan - Annual Student Conference and Online Coding Festival


Recent Articles
ASP GetTempName
Decode and Encode UTF-8
ASP GetFile
ASP FolderExists
ASP FileExists
ASP OpenTextFile
ASP FilesystemObject
ASP CreateFolder
ASP CreateTextFile
Javascript Get Selected Text


© Copyright codetoad.com 2001-2013