Setting font in Xinha
#1
Posted 24 October 2006 - 09:49 PM
I would like the editor (I am using Xinha) to have a fixed font. So that users who add content always use the same font.
How can I do that?
#2
Posted 24 October 2006 - 10:01 PM
#3
Posted 05 September 2007 - 02:42 PM
xinha_config.pageStyle = "body {font-family: Verdana; font-size: 10pt;}";
This will do to cvhange the default font to 'Verdana' and font-size to 10 points;
#4
Posted 05 November 2007 - 02:02 PM
Yes it can be done, like a lot of other things....
xinha_config.pageStyle = "body {font-family: Verdana; font-size: 10pt;}";
This will do to cvhange the default font to 'Verdana' and font-size to 10 points;
Hi,
where can I find these settings? I mean in which file?
#5
Posted 05 November 2007 - 06:51 PM
#6
Posted 06 November 2007 - 08:25 AM
I use xinha extensively, and have modified it to remove the font and, color selectors. xinha.css in the assets/site folder sets the style for the editor in my case... to be honest I can't remember if I had to modify it to do that or not... but it's worth a try.
Hi,
Could you give me a starting helping hand
The thing is, i do not want the editors write their text in 3000 different fonts per each word. So I just want to reduce the number of fonts and the font-sizes.
I hoped that somewhere in the code I could just delete some of these fonts.
#7
Posted 06 November 2007 - 02:35 PM
I'm attaching an image of what my Xinha editor bar looks like.
In 0.6.1.4 \manager\actions\dynamic\mutate_content.dynamic.action.php:
Look for line 566 or thereabouts, which looks like this:
xinha_config = xinha_config ? xinha_config() : new HTMLArea.Config();
Now scan downward for this line:
xinha_config = function()
Select all lines in between but not including those two lines and paste over with this:
// begin Ian's custom xinha config - www.n-vent.com xinha_config.height = '600px'; // toolbar config xinha_config.toolbar = [ ["formatblock","bold","italic","strikethrough","separator"], ["justifyleft","justifycenter","justifyright","justifyfull","separator"], ["insertorderedlist","insertunorderedlist","outdent","indent","separator"], ["inserthorizontalrule","createlink","insertimage","inserttable","separator"], ["undo","redo"], (HTMLArea.is_gecko ? [] : ["cut","copy","paste"]),["separator"], ["killword","clearfonts","removeformat","toggleborders","separator"], ["selectall","print","separator","htmlmode","showhelp"] ]; // end toolbar config // path to custom site stylesheet for real-time development styling xinha_config.pageStyleSheets = ['../../assets/site/xinha.css']; xinha_editors = HTMLArea.makeEditors(xinha_editors, xinha_config, xinha_plugins); HTMLArea.startEditors(xinha_editors); } // end Ian's custom xinha config
Now the xinha.css (attached) goes into the /assets/site/ folder. It's set up to display the text as red until it has been styled, immediately letting the person know where there's some text outside of a paragraph or whatever.
You'll also notice a filesize.png file. It's to style the file link control in xinha, and looks really good. if you want this to work in your site CSS, you'll need to copy over the corresponding classes:
img.fileimg{
padding-right: 5px;
}
span.filesize{
background:#FFF3D0 url(/assets/site/filesize.png) no-repeat top left;
color:#000000;
font-size:10px;
margin:0pt 6px;
padding:3px 3px 3px 10px;
}
Attached Files
#8
Posted 06 November 2007 - 02:46 PM
I have to manually re-install this mod every time I upgrade.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users












