ASP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingASP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old December 9th, 2002, 01:55 PM
sherihy sherihy is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2002
Posts: 3 sherihy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 10 m 52 sec
Reputation Power: 0
Question WYSIWYG editor and default font

The article by Mitchell Harper on building an html editor is great.

Is it possible to change the default font that is used in the rich text window? I have tried applying a style to it either through the id, like this:

#iView {font-family: Verdana, sans-serif; font-size: 12px;}

or through the local style tag like this:

<iframe id="iView" style="width: 415px; height:205px; font-family: Verdana;">

and these are not working.

I don't want to add a font tag to the actual text, I just want it to appear in Verdana in the window.

Any ideas?

Thanks,
Sheri

Reply With Quote
  #2  
Old December 9th, 2002, 09:58 PM
Alazan Alazan is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Nov 2002
Posts: 2 Alazan User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Smile check this

this works for me

iView.document.body.style.fontFamily = "Courier"
iView.document.body.style.fontSize = "10pt"
iView.document.body.bgColor = '#FFFFCC';
iView.document.body.text = '#000000';

Reply With Quote
  #3  
Old December 9th, 2002, 10:31 PM
Ben Rowe
Guest
Dev Articles Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
the default font is controled by windows defaults in your prefrences.

Reply With Quote
  #4  
Old December 10th, 2002, 10:19 AM
sherihy sherihy is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2002
Posts: 3 sherihy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 10 m 52 sec
Reputation Power: 0
Thanks for the speedy responses!

Alazan, can you tell me where you put that block of code in the doc? I have tried it in several different places and it doesn't seem to have an effect.

Ben, I see that it is controlled by the IE preferences. Does this mean that I cannot programatically override it on the user's system?

Sheri

Reply With Quote
  #5  
Old December 11th, 2002, 09:49 AM
Alazan Alazan is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Nov 2002
Posts: 2 Alazan User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Smile OOOPSS!!!

Sorry I forgot a couple of lines

iView.document.body.style.fontFamily = "Courier"
iView.document.body.style.fontSize = "10pt"
iView.document.body.bgColor = "";
iView.document.body.text = '#000000';

iText = iView.document.body.innerText;
iView.document.body.innerHTML = iText;

Reply With Quote
  #6  
Old December 12th, 2002, 02:22 AM
rajeevrao rajeevrao is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2002
Location: Bangalore
Posts: 30 rajeevrao User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via ICQ to rajeevrao
Hey .. yea

Alazan is right ...
__________________
Rajeev

Reply With Quote
  #7  
Old December 12th, 2002, 08:49 AM
sherihy sherihy is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2002
Posts: 3 sherihy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 10 m 52 sec
Reputation Power: 0
thanks!

Yep, I got this working yesterday! Thanks so much Alazan!

Sheri

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingASP Development > WYSIWYG editor and default font


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
Stay green...Green IT