Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
variable-width fonts can make code hard to read, this small CSS change adds font-family: monospace to the execute PHP form.
Comment | File | Size | Author |
---|---|---|---|
#6 | devel-execute-form-monospace-751902-6.patch | 748 bytes | jacob.embree |
| |||
php_monospace.patch | 1.15 KB | grendzy | |
Comments
Comment #1
moshe weitzman CreditAttribution: moshe weitzman commentedIs there a class in core drupal we should use for this? If not, should there be (for d7)
Comment #2
grendzy CreditAttribution: grendzy commentedgrepping 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).
Comment #3
drewish CreditAttribution: drewish commentedLooks good to me. Committed to 6.x-1.x. Should this go into 7.x?
Comment #4
drewish CreditAttribution: drewish commentedComment #5
willzyx CreditAttribution: willzyx commentedClosing for lack of activity. Feel free to reopen if the issue still exists
Comment #6
jacob.embree CreditAttribution: jacob.embree at St. Louis Integration commentedHere it is for Drupal 7.
Comment #7
solideogloria CreditAttribution: solideogloria commentedThe 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.
Comment #9
salvisWow, a ten-year-old issue finally fixed.
Thank you jacob.embree and solideogloria!