htmlArea

A directory of browser-based WYSIWYG editors

  MAIN
INDEX
SEARCH
POSTS
WHO'S
ONLINE
LOG
IN

Home: htmlArea 3 (beta): htmlArea 2 & 3 archive (read only): htmlArea v3.0 - Discussion:
Default Font, Size and Style


The htmlArea 2 & 3 editors have been discontinued.

We've made these forums available as a read-only reference and knowledge-base for people using or developing editors based on htmlArea 2 or 3.

Anyone who is interested in taking over version 2 or 3 is free to do so. All we ask is that you choose a new name that doesn't have "htmlarea" in it to avoid confusion with this site. We'll even give you a link in the directory to make it easier for people to find you. If you are developing or hosting an htmlArea based-editor under a new name, please submit it to our directory.

 


eztune
Novice

Nov 22, 2004, 12:26 PM

Post #1 of 8 (6155 views)
Shortcut
Default Font, Size and Style Can't Post

I have a need to provide my users with a default font, font size and style that is different from the current one. What I need is to set the default to Verdana, 12, formatted with single space returns.

They want to the default style to have tabbing, and just hate the space between paragraphs. They can't stand having to do a shift-enter because that creates a line break and carries the justification, and other formatting stuff with it.

I'm about to lose a large group of users if we can't provide this change. I'd surely appreciate any inputs on this as I don't want to lose my users, nor do I want to switch from HTMLArea.

Thanks,

eztune@cox.net


akaEdge
Novice

Nov 22, 2004, 7:14 PM

Post #2 of 8 (6133 views)
Shortcut
Re: [eztune] Default Font, Size and Style [In reply to] Can't Post

You set the font size and family in the htmlarea.css and it will change the default settings for your textarea's.

You can also change the amount of space between your paragraphs there too.


eztune
Novice

Nov 23, 2004, 7:38 AM

Post #3 of 8 (6091 views)
Shortcut
Re: [akaEdge] Default Font, Size and Style [In reply to] Can't Post

Yes, I looked at the htmlarea.css, but couldn't see how to do it. Let's assume that I want to set the default to

Verdana, 12, no space between paragraphs, with tabs. Could you enlighten me on the code, please?

I appreciate your assist.

eztune


akaEdge
Novice

Nov 23, 2004, 7:01 PM

Post #4 of 8 (6061 views)
Shortcut
Re: [eztune] Default Font, Size and Style [In reply to] Can't Post

First of all you should have your own config file so you can make changes to that rather than the htmlArea files themselves (easier to upgrade). Mine is called site_config.js.

So the code to include it looks like this on the textarea page:
<script type="text/javascript" src="/root/htmlarea/htmlarea.js"></script>
<script type="text/javascript" src="/root/htmlarea/site_config.js"></script>

Then in site_config.js you will need to add this line:
site_config.pageStyle = "@import url(../../style/main.css); body {border: 1px solid #A5ACB2; background: white; font-size:12 pt; font-family:'Verdana'; padding: 3px;}; p {margin: 0px;};";

where the @import includes my standard site style sheet (it colours HR's etc) and the rest is just a standard stylesheet laid out in one line. The font-family does seem to be required (it doesn't inherit the style from your @import stylesheet). I have also added the code you will need to reduce the line break space around a paragraph tag.

For tabs I assume you mean pressing the tab key moves the text in by certain amount - use the "Increase Indent" button on the toolbar. You can change the amount this moves in by adding:
blockquote {margin-left: 999px; margin-top: 0px; margin-bottom: 0px; margin-right: 0px};
to the pageStyle code above.

Let me know how you go


eXistenZ
Novice

Dec 4, 2004, 8:12 AM

Post #5 of 8 (5776 views)
Shortcut
Re: [akaEdge] Default Font, Size and Style [In reply to] Can't Post

Thx dude.. was looking for this one ages:

For version 3:
this.pageStyle = "@import url(http://www.host.nl/style.css);";


Doopie
Novice

Jan 31, 2005, 12:28 PM

Post #6 of 8 (4910 views)
Shortcut
Re: [eXistenZ] Default Font, Size and Style [In reply to] Can't Post

Euhm sorry to reply in this old post but how do i set the default font size and color if you only inlude the htmlArea in your PHP script.

I can't get it to work .help me please


eXistenZ
Novice

Jan 31, 2005, 2:04 PM

Post #7 of 8 (4890 views)
Shortcut
Re: [Doopie] Default Font, Size and Style [In reply to] Can't Post

I'm not sure if this is what you mean:

(If i'm correct at Line: 138 @ htmlarea.js)

Change this:

Code
this.fontname = { 
"Arial": 'arial,helvetica,sans-serif',
"Courier New": 'courier new,courier,monospace',
"Georgia": 'georgia,times new roman,times,serif',
"Tahoma": 'tahoma,arial,helvetica,sans-serif',
"Times New Roman": 'times new roman,times,serif',
"Verdana": 'verdana,arial,helvetica,sans-serif',
"impact": 'impact',
"WingDings": 'wingdings'
};


To:

Code
this.fontname = { 
"Courier New": 'courier new,courier,monospace',
"Arial": 'arial,helvetica,sans-serif',
"Georgia": 'georgia,times new roman,times,serif',
"Tahoma": 'tahoma,arial,helvetica,sans-serif',
"Times New Roman": 'times new roman,times,serif',
"Verdana": 'verdana,arial,helvetica,sans-serif',
"impact": 'impact',
"WingDings": 'wingdings'
};


At the second code you start with Courier New instead of Arial.


Doopie
Novice

Feb 1, 2005, 12:19 AM

Post #8 of 8 (4869 views)
Shortcut
Re: [eXistenZ] Default Font, Size and Style [In reply to] Can't Post

Thanks for your reply but i didn't mean that.
I wanted to set the default font size en color for the htmlarea in the javascript: this.Pagestyle.

I made it work by typing this.pagestyle= "body { font-family: arial; color=#8c8c8c; } ";

and this was the code that wasn't working : page.style="body { font-family: Arial, Helvetica, sans-serif; color=#8c8c8c; }";

I hop i can help someone with my reply.
Greetz

 
 
 


Search for (options)