Search DominoPower's 11,441 Lotus-related article archive 
Home
EasyPrint
News details Click here for the RSS feed's XML code. This is not a browser URL.
Articles-only Click here for the RSS feed's XML code. This is not a browser URL.
Twitter Feed Click here for the Twitter feed.
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.


1  ·  2  ·  3  ·  Next »
Other articles you might like
Home > Tips & Techniques (102 articles)
   More about Domino log files
   Why your log.nsf might not be purging properly
   A faster way to repair corrupted server files
Home > Lotus Technologies > Application Development (48 articles)
   An application for scanning physical mail and distributing it virtually
   How hide-whens in Rich Text can ruin your whole day (and what to do about it)
   Little known traps about Lotus Notes fields
Home > Internet Technologies > HTML and CSS (15 articles)
   Using a reusable code approach to HTML select option lists
   One reader's opinion on HTML mailing
   Keep lookin' good with Cascading Style Sheets
Get Weekly Email Updates
Subscribe to our regular weekly email newsletter. It's packed with tips, reviews, deep analysis, and the latest news.
 
Recent DominoPower Articles
Application development, William Shatner, and the origin of the universe
Learn Domino Designer 8.5 for free
The (near) future of Sametime, Quickr, Connections, and Symphony
Inside the IBM Innovations lab
Lotusphere 2010: Hot fixes and cool news for Notes, Domino, and LotusLive
Lotusphere 2010: mobility and collaboration
2010: A Lotusphere of change
Latest Lotus Headlines
Xpages not loading? JVM errors? - Solution
How to implement an iCalendar feed into your Notes calendar with XPages
DWA Hotfixes for Domino 8.5.1FP1 - A Gotcha
IBM Adds DB2 to Lotus Foundations SMB Package
SNTT : XPages onclick Ghosts in the machine
Ports used by Lotus Sametime 8.5 servers
Exploring a Domino Date Bug
>> Read all the news
More from the ZATZ journals
Computing Unplugged: The iPad defenders have spoken
David Gewirtz Online: CNN commentary and analysis
OutlookPower: More about disappearing text
-- Advertisement --

Find unused Lotus Notes groups and clean up your address book
Have you ever wanted to get rid of old Lotus Notes groups that were cluttering up your address book, but you weren't sure if they were used? Find Unused Groups can help.

Find Unused Groups will check your ACL, mail, multi purpose and server groups to help you determine if they are used, and who uses them.

Learn how to easily clean up your address book.

-- Advertisement --

Mark your calendar for in-depth Lotus training, May 12-14, Boston
Join experts and peers May 12-14 in Boston for educational and networking events that deliver real-world Lotus training so you can increase productivity and efficiency in your company, advance your skills, and squeeze the most from your current environment. One registration gets you into THE VIEW's Admin2010 and Lotus Developer2010.

Register by April 10 to save $200.
ZATZ Home  ·  News  ·  Back Issues  ·  Credits/Trademarks ·  Link To Us
Copyright © 1998-2010, ZATZ Publishing. All rights reserved worldwide.
Editor's Login