DonationCoder.com forum
 
Read-only archive. This is a static copy of the DonationCoder.com forum. Reading and searching work as before; logging in, posting and private messages do not.
Archive of 2026-10-21 · About this archive · Main site

Author Topic: Setting the richedit display to fixed-width  (Read 7,517 times)

pmoore

  • Supporting Member
  • Joined in 2008
  • **
  • Posts: 17
Setting the richedit display to fixed-width
« on: September 08, 2008, 02:18 PM »
Is it possible to change the font of the richedit display (the one set by window.richeditmode)? Specifically, to a fixed width font. I have some tabular output (a simple month calendar) I want to display, but it's messed up completely by a proportional width font...

Thanks
Paul

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,931
    • Gathering Badge
    • Plugin Coding Medal
    • Participated in NANY Challenge Seventeen Times
    • Cody Award
    • Coding Snacks
    • Volunteers/Staff
Re: Setting the richedit display to fixed-width
« Reply #1 on: September 08, 2008, 03:30 PM »
yes it is:

test Screenshot - 9_8_2008 , 10_30_02 AM.png

lanux128

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 6,277
    • Coding Snacks
    • Volunteers/Staff
    • Gathering Badge
    • Participated in NANY Challenge Once
    • Linux User
Re: Setting the richedit display to fixed-width
« Reply #2 on: September 09, 2008, 01:23 AM »
but there is also this problem where the font settings may be altered by plugins as noted in this thread.

pmoore

  • Supporting Member
  • Joined in 2008
  • **
  • Posts: 17
Re: Setting the richedit display to fixed-width
« Reply #3 on: September 09, 2008, 09:43 PM »
yes it is:
Ah, thanks. That helps, but what I was actually after was a way that a plugin could do this, just for one display...

Aha! I found it. If I set window.richeditmode to a string of RTF format text, I can do what I want. Pity RTF is such an ugly format, but never mind - it works :)

Original address: https://www.donationcoder.com/forum/index.php?topic=14792.0