Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Code outlining in a textarea

Reply
Thread Tools

Code outlining in a textarea

 
 
sdragolov@gmail.com
Guest
Posts: n/a
 
      02-22-2008
I would like to achieve an effect similar to the code outlining in
vs.net (where you can expand and collapse sections of code) inside of
a textarea in a web form.

the code outlining would be available on encountering certain reserve
words and have expand/collapse ability (just like in an IDE).

any suggestions of how to do this? would it require a different
"control" (i.e. not text area), specially if I wanted to add +/- signs?
 
Reply With Quote
 
 
 
 
GArlington
Guest
Posts: n/a
 
      02-22-2008
On Feb 22, 10:32 am, sdrago...@gmail.com wrote:
> I would like to achieve an effect similar to the code outlining in
> vs.net (where you can expand and collapse sections of code) inside of
> a textarea in a web form.
>
> the code outlining would be available on encountering certain reserve
> words and have expand/collapse ability (just like in an IDE).
>
> any suggestions of how to do this? would it require a different
> "control" (i.e. not text area), specially if I wanted to add +/- signs?


I suspect (did not try it myself) that you can achieve similar effect
by changing the number of rows for your text area (or div) with no
overflow.
 
Reply With Quote
 
 
 
 
GArlington
Guest
Posts: n/a
 
      02-22-2008
On Feb 22, 10:32 am, sdrago...@gmail.com wrote:
> I would like to achieve an effect similar to the code outlining in
> vs.net (where you can expand and collapse sections of code) inside of
> a textarea in a web form.
>
> the code outlining would be available on encountering certain reserve
> words and have expand/collapse ability (just like in an IDE).
>
> any suggestions of how to do this? would it require a different
> "control" (i.e. not text area), specially if I wanted to add +/- signs?


I do NOT think however that you can do it for PART of the text area
though...
 
Reply With Quote
 
Dean Arnold
Guest
Posts: n/a
 
      02-22-2008
wrote:
> I would like to achieve an effect similar to the code outlining in
> vs.net (where you can expand and collapse sections of code) inside of
> a textarea in a web form.
>
> the code outlining would be available on encountering certain reserve
> words and have expand/collapse ability (just like in an IDE).
>
> any suggestions of how to do this? would it require a different
> "control" (i.e. not text area), specially if I wanted to add +/- signs?


I think you mean code folding ? I've done this for Perl, but it required
span'ing everything (which was needed for syntax hilighting anyway).

I've tried using the list trick in the past, but large linecounts
caused some odd behaviors in (IIRC) FF 1.5 (or maybe IE6 ?). I've also
considered hacking a table, and adding/removing rows.

Anyway, for an example, see www.presicient.com/ppicf/CodeFolder.html.

(Note the line number alignment still has some issues on some browsers).

Regards,
Dean Arnold
Presicient Corp.
 
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
Protecting a worksheet but still allowing Outlining/Grouping? Joe Schmoe ASP .Net 0 09-02-2005 06:28 PM
Outlining jjf XML 3 04-11-2005 10:10 PM
TABLE, DIV, SPAN outlining hell! Who can make sence out of this? Michel HTML 1 06-17-2004 04:30 PM
ANN: Leo 4.0 beta 3 outlining editor Edward K. Ream Python 0 10-09-2003 12:20 PM
ANN: Leo 4.0 beta 2 outlining editor Edward K. Ream Python 0 10-03-2003 07:53 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57