variable-width fonts can make code hard to read, this small CSS change adds font-family: monospace to the execute PHP form.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

moshe weitzman’s picture

Is there a class in core drupal we should use for this? If not, should there be (for d7)

grendzy’s picture

grepping D6 for "monospace" turns up nothing, so I don't think there is a class we can use.

D7 is the same, though there is the '#text_format' key.
#414424: Introduce Form API #type 'text_format'
I don't really understand what it does, since that key also doesn't appear in a core grep. For some reason I was under the impression it was there to support wysiwyg.
'#text_format' => 'php' would be nice though, assuming it added a class you could style easily, and contrib could even add a syntax highlighting module. (Not that we want to encourage people to write code in the browser any more than absolutely necessary).

drewish’s picture

Status: Needs review » Fixed

Looks good to me. Committed to 6.x-1.x. Should this go into 7.x?

drewish’s picture

Version: 6.x-1.x-dev » 7.x-1.x-dev
Status: Fixed » Needs work
willzyx’s picture

Issue summary: View changes
Status: Needs work » Closed (outdated)

Closing for lack of activity. Feel free to reopen if the issue still exists

jacob.embree’s picture

Status: Closed (outdated) » Needs review
FileSize
748 bytes

Here it is for Drupal 7.

solideogloria’s picture

Status: Needs review » Reviewed & tested by the community

The patch in #6 is simple and it works for me. I had been using something similar See #3100726: Devel code textarea monospace, and this patch works the same way.

  • salvis committed 2d5d5c9 on 7.x-1.x
    Issue #751902 by jacob.embree: use monospace font for PHP execute block.
    
salvis’s picture

Status: Reviewed & tested by the community » Fixed

Wow, a ten-year-old issue finally fixed.

Thank you jacob.embree and solideogloria!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.