PDA

View Full Version : Editor always types in Times roman - how can I change this to Arial?


peter348932
06-09-2009, 07:18 AM
I have integrated PowerCMs into my first site is its looking good - however my site uses Arial and although anything editted in PowerCMS get display on my site in arial durting editting its in Times roman and this gives my cient the jitters.
can I configure the powerCMS editor to start in my styles? ie font size 11 and in Arial?
I have seen a reply to someone else and it talks about iRite - I know its part of PowerCMS but I don't know anything about iRite and how to configure it please give simple guide and what files I need to edit - thanks.
love the powercms by the way - has made my job a lot easier!

Ray Borduin
06-09-2009, 07:52 AM
To edit the files by hand without iRite, you can follow the fckeditor documentation:

http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide/Configuration/Configuration_Options/EditorAreaStyles

peter348932
06-09-2009, 11:36 AM
thanks ofrthat - BTW - can I get hold of how to use iRite >

Ray Borduin
06-09-2009, 11:57 AM
To find out about iRite view:

http://www.webassist.com/software/irite/

johnd45081
06-09-2009, 03:59 PM
This is the most annoying feature of iRite that there appears to be no facility to easily set the default text of the FCK Editor which shows as Times Roman.

It is easy to fix. You will need to update WA_PowerCMS/WA_iRite/custom/contents_insert_ContentValue1.js and contents_update_ContentValue1.js to include the following line at around line 45:

FCKConfig.EditorAreaStyles = 'body { font-family: Arial, Helvetica, sans-serif; font-size: 11px; }';

Different text styles can be defined to suit your needs. You can also add more styles in the statement.

peter348932
06-09-2009, 04:51 PM
Excellent call! - I've just spent 1 hour messing with fckconfig.js and the fck_editorarea.css files with no luck - thank you!!

roby258376
06-11-2009, 04:12 AM
My problem is that the text size is too large. I tried editing the files as suggested and there was no change in my irite interface. Any other suggestions?

Just an edit, it would seem that the problem was being caused by a conflict between an older version of irite, which was one one page, and the new version which was on another page. As soon as I deleted both and redid Irite, they work properly.

joannet256841
06-12-2009, 12:29 AM
I would like to display how the various styles look in the 'Format' drop down menu as well as in the editor section itself. At present, it only shows plain text, bolding, italics, but not the exact style as in the site's stylesheet.

After referring to the following in this post:

"To edit the files by hand without iRite, you can follow the fckeditor documentation:

http://docs.fckeditor.net/FCKeditor_...itorAreaStyles"

I noted another helpful link - http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide/Configuration/Configuration_Options/EditorAreaCSS which states:

You can precisely simulate the output of your site inside FCKeditor, including background colors, font styles and sizes and custom CSS definitions. To do that, just point this setting to the CSS file that you want the editor to use. You may use a simple string, setting the CSS file path, or even a string array, with more than one CSS file to be loaded. Example:

FCKConfig.EditorAreaCSS = '/mycssstyles/editorstyle.css' ;

By default, FCKeditor uses a very simple file located at "editor/css/fck_editorarea.css". You can place your file outside the FCKeditor directory and just point to that.

------------

When I browse to contents_insert_ContentValue1.js and contents_update_ContentValue1.js, I see the following code that the above is referring to:

FCKConfig.EditorAreaCSS = ''; // relative to fckeditor/editor/fckeditor.html

-------------

My site's stylesheet is located here - www.site.com/design/style.css.

Would anyone know how I would make reference to this stylesheet as it says it should be relative to fckeditor/editor/fckeditor.html?

Would it be something like ../../../design/style.css??

Thanks

Ray Borduin
06-12-2009, 05:52 AM
You should be able to find the .js file in the iRite/custom directory associated with the iRite instance you want to update.

Then add the reference as you have found in the documentation.

I think it would be "../../design/style.css" if I remember correctly, but try both if one does't work.

joannet256841
06-14-2009, 12:02 AM
Hi Ray,

I have accessed the following files:

cms/WA_iRite/custom/contents_insert_ContentValue1.js and cms/WA_iRite/custom/contents_update_ContentValue1.js

and found the line:

FCKConfig.EditorAreaCSS = '../../../design/style.css'; // relative to fckeditor/editor/fckeditor.html

As you can see, I added the relative path to my stylesheet where necessary.

This has put some of the styles in the drop down box and they show up in the editor itself.

However, I have noticed that not all of the styles in the stylesheet are appearing in the drop down menu.

Please explain how I can add these to the editor drop down box.

Exact files and code would be most appreciated.

Thanks for your help.

Ray Borduin
06-15-2009, 07:17 AM
If you own iRite it will help you do this from an existing style sheet.

To do it manually you would have to create and reference an .xml file that defines the available options.

you would reference the xml in the line:

FCKConfig.StylesXmlPath = '';

and it would be created according to the sytnax described:
http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide/Configuration/Styles

roland263452
11-15-2009, 08:26 AM
This line also works in the new HTML Editor (formerly iRite) but it has to be added to the js file.

FCKConfig.EditorAreaStyles = 'body { font-family: Verdana, Geneva, sans-serif; font-size: 10pt; }';


HTMLEditor -- custom -- <<select the file for the instance that needs custom formatting>>

This works great for me where my admin pages need to have text areas with white backgrounds but the mail form on the public side of the site needs a custom background.

Thanks for this tip!

Now to find out how I can change the default field title text of the pop ups away from TImes New Roman!!

Any ideas?

Ray Borduin
11-16-2009, 07:25 AM
It appears this may be a bug in the extension... read post number 8 of the thread:

http://www.webassist.com/forums/showthread.php?t=5993