Print Page | Close Window

automatic setting of font in html

Printed From: Web Wiz Forums
Category: Web Wiz Web App Support Forums
Forum Name: Web Wiz Rich Text Editor (RTE)
Forum Description: Support forum for the Web Wiz Rich Text Editor (RTE).
URL: https://forums.webwiz.net/forum_posts.asp?TID=15927
Printed Date: 28 March 2026 at 10:56am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: automatic setting of font in html
Posted By: abarker
Subject: automatic setting of font in html
Date Posted: 21 July 2005 at 10:15am
The default font that you see when you first start typing in RTE is determined by the style sheet 'default_style.css'.  However, this has no effect on the font that is actually set in the html generated by RTE.  As a result, there is no guarantee that the font that you first see when typing in RTE will be the font that you will see when you view them RTE-generated html.
 
To overcome this, I came up with the idea of forcing the font to be set (just as it would when you select a font from the dropdown) when the RTE first loads.  Then whatever font you first see when you start typing in RTE will be the font that's actually set in the html.
 
I have searched the forums and tried several strategies for acheiving this.  I looked to see what command occurs when one of the fonts is selected from the dropdown, but triggering this command right in the script rather than when a selection is made results in a 'object expected error'.
 
I'd really like to get this to work, but am stumped.  Does anyone have any ideas?  If we get this figured out, it could make a great addition to the already great RTE!



Replies:
Posted By: karlsmarxs
Date Posted: 28 September 2005 at 12:00pm

I have the same problem. Can anyone Help US???????? 



Posted By: Unleash_Hell
Date Posted: 01 March 2006 at 12:56pm
Same here! I want it to force a font to be set. Even when you paste from Word the font should be forced to Verdana.


Posted By: WebWiz-Bruce
Date Posted: 10 March 2006 at 12:16pm
The default style for the RTE textbox is set in the CSS file 'default_style.css' using the class 'RTEtextarea'

As the Web Wiz RTE uses the built in RTE API's of the web browser it has different effects in different browsers.


Posted By: Unleash_Hell
Date Posted: 10 March 2006 at 5:17pm
Originally posted by -boRg- -boRg- wrote:

The default style for the RTE textbox is set in the CSS file 'default_style.css' using the class 'RTEtextarea'

As the Web Wiz RTE uses the built in RTE API's of the web browser it has different effects in different browsers.
'
I know this, but when someone is pasteing from Word, the font is being kept from Word, and this overrides the default style in the RTE textbox. I want something which don't allows to change the font.


Posted By: WebWiz-Bruce
Date Posted: 11 March 2006 at 2:46pm
To be honest Word is a pain in the arse as the code it produces is awful and very difficult to filter.

As the RTE by it's nature allows HTML code to be used behind the front end to format the text it means that pasting code from World also pastes the HTML/CSS code that Word uses to format the text.

The only solution would be to not use RTE software for people pasteing from Word, or ask if they can paste from Word to Notepad, then to the RTE in order that only plain text is pasted across.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net