Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

Code Display Methods

by Kozz (Friar)
on Jun 22, 2000 at 06:25 UTC ( #19386=monkdiscuss: print w/ replies, xml ) Need Help??

I'm concerned that this might not be possible, but it's worth a try, perhaps.
Could monks who post code be allowed to post them in two methods? The first one would be the normal way with the CODE tags, but perhaps there'd be another way that would allow them to put the code within TEXTAREA tags, so a monk could scroll horizontally/vertically to see the code, instead of allowing the code to screw up the formatting?

Comment on Code Display Methods
RE: Code Display Methods
by Ovid (Cardinal) on Jun 22, 2000 at 07:02 UTC
    <TEXTAREA COLS="12" ROWS="2" NAME="Not a good idea" WRAP=PHYSICAL>Bad idea. Call it a hunch, but I suspect that many people would quickly get irritated by that. We are having enough trouble just getting people to use <CODE> tags. Just imagine the fiasco with all sorts of randomly sized textareas showing up (COLS="300" anyone?) </TEXTAREA>

    Update: For those confused by the replies below, this node used to be in a tiny, tiny textarea (2 rows and 12 columns). The HTML is still there, but apparently the Everything engine now strips it out.

      *chuckles* You make a good point, Ovid.

      I was thinking more along the lines of a perlmonks-specific tag (such as the brackets used for node-linking) which vroom's code would allow a particular ROWS & COLS, perhaps based on user preferences. Of course this would only be convenient for those of us with accounts.

      Update: Another thought would be an IFRAME, if only it was universally supported... :-(
      <textarea rows=10 cols=60> hehehe Point well made. Now, to be fair, you *did* make the thing tiny and forbade the horizontal scrollbar (with "wrap=physical"). I understand the actual idea as: allow the *viewer* to control the size of the box, not the poster. I must admit, though...even while defending the idea, I would probably not choose to utilize the feature. Perhaps if the code would automagically use a textarea when a monk has submitted code wider than a certain threshold? Russ </textarea>
RE: Code Display Methods
by BigJoe (Curate) on Jun 22, 2000 at 07:10 UTC
    I have to agree with Ovid on this one. I would have to go more with nuance's post about chopping long lines.


Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: monkdiscuss [id://19386]
Approved by root
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (6)
As of 2014-09-02 23:54 GMT
Find Nodes?
    Voting Booth?

    My favorite cookbook is:

    Results (34 votes), past polls