Q: Making editor monospaced

172 views
Skip to first unread message

D. R. Evans

unread,
Oct 19, 2006, 10:25:45 AM10/19/06
to Tiddl...@googlegroups.com
I have an old note from a TW on a Windows box that this is the way to
make the editor pane use a monospaced font:

-----

In StyleSheet add:

.editor {
font-family: Courier;
}

-----

But that doesn't seem to work any more. What is the right way to do this?

(Or it could be that the "Courier" font family isn't available on my
new Kubuntu system, I suppose. How do I find out what are allowed
values for font-family?)

Simon Baird

unread,
Oct 19, 2006, 10:47:16 AM10/19/06
to Tiddl...@googlegroups.com
try font-family: monospace;


On 10/20/06, D. R. Evans <doc....@gmail.com> wrote:

I have an old note from a TW on a Windows box that this is the way to
make the editor pane use a monospaced font:

-----

In StyleSheet add:

.editor {
font-family: Courier;
}

-----

But that doesn't seem to work any more. What is the right way to do this?




--
Simon Baird <simon...@gmail.com>

D. R. Evans

unread,
Oct 19, 2006, 11:00:19 AM10/19/06
to Tiddl...@googlegroups.com
On 19/10/06, Simon Baird <simon...@gmail.com> wrote:
> try font-family: monospace;

nope :-(

(I don't mean: "no I won't try it"; I mean: "I tried that and it
didn't work" :-) )

Jon Scully

unread,
Oct 19, 2006, 11:09:53 AM10/19/06
to Tiddl...@googlegroups.com
Add this to your StyleSheet tiddler:
.editor textarea { font-family: courier; }

Or if you want all fields to be Courier:

.editor input, .editor textarea { font-family: courier; }

D. R. Evans

unread,
Oct 19, 2006, 1:16:13 PM10/19/06
to Tiddl...@googlegroups.com
On 19/10/06, Jon Scully <jons...@gmail.com> wrote:
> Add this to your StyleSheet tiddler:
> .editor textarea { font-family: courier; }
>
> Or if you want all fields to be Courier:
>
> .editor input, .editor textarea { font-family: courier; }
>

Still nope :-(

Here is my entire StyleSheet toddler:

.tablecenter { text-align: center; }
.tablecenter table { margin-left: auto; margin-right: auto; text-align: left; }


.editor input, .editor textarea { font-family: courier; }

The first two commands are working, so I know that the tiddler is being used.

Daniel Baird

unread,
Oct 19, 2006, 5:07:22 PM10/19/06
to Tiddl...@googlegroups.com
On 10/20/06, D. R. Evans <doc....@gmail.com> wrote:
> Still nope :-(
>
> Here is my entire StyleSheet toddler:
>
> .tablecenter { text-align: center; }
> .tablecenter table { margin-left: auto; margin-right: auto; text-align: left; }
> .editor input, .editor textarea { font-family: courier; }
>

using monospace instead of courier should work, monospace is supposed
to be a "magic" css name for whatever font your browser uses for fixed
width stuff.

Possibly you have some other CSS loading that specifies the font using
a more specific CSS selector. It's something of a curse for things
like TiddlyWiki where the CSS can come from a lot of different places.

Try making the rule:

#tiddlerDisplay .editor textarea { font-family: monospace; }

and seeing if that works.

;D


--
Daniel Baird
http://tiddlyspot.com (free, effortless TiddlyWiki hosting)
http://danielbaird.com (TiddlyW;nks! :: Whiteboard Koala :: Blog ::
Things That Suck)

D. R. Evans

unread,
Oct 19, 2006, 6:01:43 PM10/19/06
to Tiddl...@googlegroups.com
On 19/10/06, Daniel Baird <danie...@gmail.com> wrote:
>
> On 10/20/06, D. R. Evans <doc....@gmail.com> wrote:
> > Still nope :-(
> >
> > Here is my entire StyleSheet toddler:
> >
> > .tablecenter { text-align: center; }
> > .tablecenter table { margin-left: auto; margin-right: auto; text-align: left; }
> > .editor input, .editor textarea { font-family: courier; }
> >
>
> using monospace instead of courier should work, monospace is supposed
> to be a "magic" css name for whatever font your browser uses for fixed
> width stuff.

changing "courier" to "monospace" didn't make any difference.

>
> Possibly you have some other CSS loading that specifies the font using
> a more specific CSS selector. It's something of a curse for things
> like TiddlyWiki where the CSS can come from a lot of different places.
>

I don't think there's any other css coming from anywhere. This is a
brand new TW, created yesterday, directly by download from
www.tiddlywiki.com.

If there is css coming from elsewhere, it ought to be happening for
everyone who downloads the current incarnation of TW.

> Try making the rule:
>
> #tiddlerDisplay .editor textarea { font-family: monospace; }
>
> and seeing if that works.
>

Nope.

There must be something silly and obvious that I'm doing wrong.
Does the StyleSheet tiddler need to have one or particular tags for
any of these to work? That's the only thing I can think of.

Jon Scully

unread,
Oct 19, 2006, 6:15:17 PM10/19/06
to Tiddl...@googlegroups.com
"Does the StyleSheet tiddler need to have one or particular tags for
any of these to work?" -- you said the tablecenter class is working, no?

More likely it's a browser setting.  In your Control Panel, look for the section that controls fonts for your browser (if it's Konqueror) and see if "Monospace" is set to something like "Sans" or "Serif" (instead of "Courier").  If so, simply change it.

If you're using FF on Kubuntu, then  edit Options..., select Content tab, then at the bottom there should be Fonts & Colors, click Advanced... and make sure Monospace: is set to Courier or Courier New.

Clint Checketts

unread,
Oct 19, 2006, 9:37:22 PM10/19/06
to Tiddl...@googlegroups.com
This is working for me with Firefox Ubuntu.

.editor textarea {font-family: "Monospace font handling in Firefox is braindead", monospace;}

Why the weird primary font? Info here: http://virtuelvis.com/archives/2005/02/monospace-firefox-braindeath


-Clint

D. R. Evans

unread,
Oct 20, 2006, 10:53:40 AM10/20/06
to Tiddl...@googlegroups.com
On 19/10/06, Jon Scully <jons...@gmail.com> wrote:
> "Does the StyleSheet tiddler need to have one or particular tags for
> any of these to work?" -- you said the tablecenter class is working, no?
>

Right; that is working. I was just wondering out loud whether some
special tags were needed in order for the StyleSheet to work
everywhere.

> More likely it's a browser setting. In your Control Panel, look for the
> section that controls fonts for your browser (if it's Konqueror) and see if
> "Monospace" is set to something like "Sans" or "Serif" (instead of
> "Courier"). If so, simply change it.
>
> If you're using FF on Kubuntu, then edit Options..., select Content tab,
> then at the bottom there should be Fonts & Colors, click Advanced... and
> make sure Monospace: is set to Courier or Courier New.
>

It is set to Courier.

D. R. Evans

unread,
Oct 20, 2006, 10:58:37 AM10/20/06
to Tiddl...@googlegroups.com
On 19/10/06, Clint Checketts <chec...@gmail.com> wrote:
> This is working for me with Firefox Ubuntu.
>
> .editor textarea {font-family: "Monospace font handling in Firefox is
> braindead", monospace;}
>

I just cut-and-pasted that into my StyleSheet.

You get one guess. Right. No change.

What on Earth can I possibly be doing wrong? This is crazy.

(Incidentally, using {{{}}} does result in monospaced text in
tiddlers, so it's not that I somehow don't have a monospaced font
available.)

Jon Scully

unread,
Oct 20, 2006, 11:18:49 AM10/20/06
to Tiddl...@googlegroups.com
Add to StyleSheet:
.editor { border: 1px solid red }

Click 'done', then 'edit' again.  If you don't see red, perhaps a plugin is hyjacking that style(?)  Or, if you do see red, perhaps you don't have a font called 'Courier' installed -- so try changing it to, say, 'Courier New' in FF.  In fact, for troubleshooting purposes, try changing 'Monospace' (in FF) to something off-beat, just to see what effect it has.

On 10/20/06, D. R. Evans <doc....@gmail.com> wrote:

D. R. Evans

unread,
Oct 20, 2006, 4:19:28 PM10/20/06
to Tiddl...@googlegroups.com
On 20/10/06, Jon Scully <jons...@gmail.com> wrote:
> Add to StyleSheet:
> .editor { border: 1px solid red }
>
> Click 'done', then 'edit' again. If you don't see red, perhaps a plugin is
> hyjacking that style(?) Or, if you do see red, perhaps you don't have a
> font called 'Courier' installed -- so try changing it to, say, 'Courier New'
> in FF. In fact, for troubleshooting purposes, try changing 'Monospace' (in
> FF) to something off-beat, just to see what effect it has.

OK...

1. I see the red border!!

2. I do have Courier installed, but in FF I changed the momspaced font
to something called "Coolvetica" (whatever that is). No difference.
(Except that the text inside {{{}}} braces now looks awful :-) ) I'm
changing the FF typeface back to Courier, since that doesn't seem like
it's the source of the problem.

Jon Scully

unread,
Oct 20, 2006, 5:19:11 PM10/20/06
to Tiddl...@googlegroups.com
What does your list of plugins look like?  Can you temp-disable them one at a time and see if it helps?

Daniel Baird

unread,
Oct 20, 2006, 11:21:58 PM10/20/06
to Tiddl...@googlegroups.com
Maybe someone asked already, but:

is there a URL where we can have a look? It seems like the kind of
problem where five minutes of fiddling is better than three days of
emails :)

;Daniel

D. R. Evans

unread,
Oct 21, 2006, 8:52:24 AM10/21/06
to Tiddl...@googlegroups.com
On 20/10/06, Jon Scully <jons...@gmail.com> wrote:
> What does your list of plugins look like? Can you temp-disable them one at
> a time and see if it helps?

I have no plugins.

D. R. Evans

unread,
Oct 21, 2006, 8:56:34 AM10/21/06
to Tiddl...@googlegroups.com
On 20/10/06, Daniel Baird <danie...@gmail.com> wrote:
>
> Maybe someone asked already, but:
>
> is there a URL where we can have a look? It seems like the kind of
> problem where five minutes of fiddling is better than three days of
> emails :)

You know, I was just going to suggest this very thing.

I just, within the last couple of minutes, did this:

1. go to www.tiddlywikicom
2. Download the current version
3. Open it locally
4. Create a StyleSheet tiddler
5. In the StyleSheet tiddler, put the single line:


.editor textarea {font-family: "Monospace font handling in Firefox

is braindead", monospace;border: 1px solid red }
6. Check to see if it works: the border does work, the font-family doesn't.

Daniel Baird

unread,
Oct 21, 2006, 9:20:32 AM10/21/06
to Tiddl...@googlegroups.com
On 10/21/06, D. R. Evans <doc....@gmail.com> wrote:
> 1. go to www.tiddlywikicom
> 2. Download the current version
> 3. Open it locally
> 4. Create a StyleSheet tiddler
> 5. In the StyleSheet tiddler, put the single line:
> .editor textarea {font-family: "Monospace font handling in Firefox
> is braindead", monospace;border: 1px solid red }
> 6. Check to see if it works: the border does work, the font-family doesn't.

In Firefox on Windows XP, that worked -- I get a red border and a
monospaced font (I had to take out the newline between "Firefox" and
"is braindead", but I assume that was an emailer-inserted newline).

So, I'm guessing it's a weirdness of your browser setup.. do you have
a user stylesheet or something along those lines? A browser extension
like Greasemonkey?

Try creating a new profile (close every Firefox window and run
"firefox -ProfileManager") and using that.

;D

Jon Scully

unread,
Oct 21, 2006, 2:19:30 PM10/21/06
to Tiddl...@googlegroups.com
A Few Tests using:
* .editor textarea { font-family: <directive>; }
* Didn't use the "FF is barindead" thing

Windows XP Pro, FF:
* "monospace" works
* "Courier" works
* "Courier New" works

Arch Linux, KDE, FF:
* "monospace" works
* "Courier" works
* "Courier New" does not work -- makes sense

Don't have a Kubuntu box, here.  Would recommend searching the Kubuntu / Ubuntu forums, etc.

D. R. Evans

unread,
Oct 21, 2006, 7:12:03 PM10/21/06
to Tiddl...@googlegroups.com
Found the problem!!!

I don't know why it's a problem, but it is.

In FF:

Edit | Preferences | Content | Fonts & Colors | Advanced | Allow Pages
to use their own fonts
MUST be checked.

For reasons I don't understand at all, if you have it unchecked, even
if you have the Monospace selection set to Courier, the CSS doesn't
work. Logically, it would seem that in this case, choosing "monospace"
in the CSS should cause FF to use Courier. But it doesn't.

This actually rather sucks, because the reason that option was
unchecked in the first place was because pages rather frequently make
really stupid decisions about what font and size they want me to use.

Andrew Winn

unread,
Apr 20, 2018, 8:51:09 AM4/20/18
to TiddlyWiki
For anyone who stumbles on this thread over a decade after the fact, I have found the current (as of April 2018) method to make the editor display monospace font is to use the following CSS:

.tc-tiddler-frame textarea.tc-edit-texteditor { font-family: monospace; }

@TiddlyTweeter

unread,
Apr 20, 2018, 9:02:31 AM4/20/18
to TiddlyWiki
That sounds like a bug.
Reply all
Reply to author
Forward
0 new messages