Question
How can I set the editing form to use a monospace font (e.g., Courier)?
Environment
--
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