Tags:
create new tag
view all tags

Question

How can I set the editing form to use a monospace font (e.g., Courier)?

Environment

TWiki version: TWikiRelease01Feb2003
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS: FreeBSD 4.7
Web server: Apache 1.3.27
Perl version: v5.6.1
Client OS: Mac OS X 10.2.6
Web Browser: Safari 1.0 (v85)

-- RichMorin - 01 Sep 2003

Answer

Usually the font in the textarea box in the edit mode is monospaced. If yours is not, it might be caused by either:

  • your browser's default font settings (Tools|Options in IE, or Edit|Preferences in Mozilla);
  • a CSS setting in the skin you're using - the default TWiki skin does not do this;
  • some font settings set by your operating system.

-- TorbenGB - 02 Sep 2003

In Safari, my "Fixed-width font" is set to "Courier 13".

I tried using Internet Explorer (5.2 for Mac) to edit the Sandbox page on TWiki.org. It also showed proportional font. Its "Monospace" font is set to "Courier New".

My system-wide "Fixed pitch Font" is set to "Monaco, 10 pt." in TinkerTool.

I suspect that there may be a font incompatibility in the OS, somewhere. I tried editing the Sandbox on twiki.org, using IE and Safari on a freshly-installed Mac OS X 10.2.6 system (no TinkerTool). Same problem...

I'm not using CSS or any special skins, AFAIK.

Looking at a "View Source" of a TestTopic1 page, I see no indication that TWiki is asking for a monospace font. What I see is

...
<textarea name="text" wrap="virtual" rows="17" cols="70" style="width: 99%">


-- Main.RichMorin - 02 Sep 2003
</textarea>
...

-- RichMorin - 01 Sep 2003

You can edit the file CVS:templates/edit.tmpl to change the HTML around the textarea - not sure how to do that, but if the browser supports this getting the HTML changed isn't a problem.

-- RichardDonkin - 03 Sep 2003

I tried this. Adding font tags around the textarea tags doesn't seem to do anything. Putting them between the textarea tags makes them show up as text(!). I'm out of my depth here. Should I file a bug report?

-- RichMorin - 06 Sep 2003

Check a good HTML guide site and see if there's an option to control the fonts of text areas - this may not be possible in HTML. Either way, this isn't a TWiki bug, could be a feature request if HTML allows it.

-- RichardDonkin - 12 Sep 2003

You can use the EDITBOXSTYLE preferences setting (site and user level) to set the preferred font family of the edit box:

  • Set EDITBOXSTYLE = width: 99%; font-family: courier, monospace

-- PeterThoeny - 12 Sep 2003

I have changed EDITBOXSTYLE as you suggested and it indeed gives me monospace font in the edit box. Is there a way to ask for the point size to be larger (for some reason, the monospace edit text is quite a bit smaller than the text on the resulting page).

- RichMorin - 08 Oct 2003

just add font-size:{some value} to the end of the editboxstyle var, e.g: Set EDITBOXSTYLE = width: 99%; font-family: courier, monospace;font-size: 110%; For more info see css-discuss wiki on FontSize.

-- MattWilkie - 10 Oct 2003

Edit | Attach | Watch | Print version | History: r11 < r10 < r9 < r8 < r7 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r11 - 2003-10-10 - MattWilkie
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.