Email:   
Home
In This Issue
EasyPrint
Click here for the RSS feed's XML code. This is not a browser URL.
PROGRAMMING POWER
Changing Rich Text font styles on the Web
By Dan Velasco

Often when creating tips, I open up a can of worms. Usually it's a good can of worms, though, so I'm not complaining. Lots of protein. This is exactly what happened when I wrote a tip about applying stylesheet styles to Notes Rich Text fields on the Web and asked for feedback from you, the faithful DominoPower readers. I received a lot of responses that led me to create a second tip on the same subject. And it also helped me to solve a problem that had been bugging me for months (more about that later). So, in the interest of consolidating the information I've collected into one place, we're reprinting the tips here along with commentary from yours truly.

Applying stylesheet styles to Notes Rich Text fields on the Web
This tip is about something that perplexed me for many months until I figured out a solution somewhat by accident. I was trying to apply a stylesheet font to a Rich Text field on a form that was using the default sans serif font. I tried putting the name of the style in the "Class" field on the HTML (Hyper Text Markup Language) properties tab for the Rich Text field, but that didn't work. I then tried putting "<font class="bodyText"> before the field and </font> after the field, marking both as Pass-Thru HTML. The style ended up being applied fine, but the space between the first and second paragraphs on some documents disappeared.

The solution I came up with at the time, which was somewhat kludgey, I'll admit, was to put "&nbsp;" on the line between the first and second paragraphs and mark it as Pass-Thru HTML. This solved the problem, but it made a little extra work for our Production Team. I encountered this problem again recently, but this time I couldn't modify the contents of the Rich Text field because we didn't "own" the database. I started playing again with the code around the field, and what I found is that if I put <span class="bodyText"> before the field and </span> after the field (marking it as Pass-Thru HTML), the correct style was applied to the Rich Text field (the contents of which were using the default sans serif font) and the line between the first and second paragraphs didn't disappear.

Again, please note that the Rich Text fields, to which I applied the stylesheet styles, used the default 10-point Notes sans serif font. If anyone has any other interesting experiences with trying to apply stylesheet styles to Rich Text fields, please send me an email at dvelasco@dominopower.com.





[ Next ]

ZATZ Home  ·  News  ·  Back Issues  ·  Credits/Trademarks ·  Link To Us
-- Advertisement --

Learn Notes and Domino 8 at your place and pace!
Learn Notes and Domino in your office and/or home! TLCC's highly acclaimed distance learning courses for users, developers, and admins will enhance your career and your resume.

The many included activities and demos will make you a pro! Expert instructor help is a click away.

Click here to try a FREE demo course!!

-- Advertisement --

The Ultimate Notes Domino Training Experience - Amsterdam, 11-13 November
Get in-depth technical training that you can put to use on the job right away at THE VIEW's Admin2008 and Lotus Developer2008 Europe! One registration gets you into your choice of over 70 new and updated expert know-how sessions, one-on-one consultations, hands-on labs, and more.

See complete agendas and register by 10 October to save 495 euros!
Copyright © 1998-2008, ZATZ Publishing. All rights reserved worldwide.
Editor's Login