Use of CSS Class with Editor

2 posts by 2 authors in: Forums > CMS Builder
Last Post: October 16, 2009   (RSS)

By furcat - October 15, 2009

I use CSS almost exclusively in my web designs, and normally I have a large number of stylized paragraphs, bullets, headings, etc.

I am preparing a website for my customer, and making the pages so that they can maintain as much of the site as possible through CMSBuilder.

However, I don't see any place in the editor that is provided for usage of classes, or anyway to allow my customer to select formatting beyond just a plane paragraph, bullet, and headers.

I don't want my customer editing the html. Am I missing something?

Thanks.

Re: [furcat] Use of CSS Class with Editor

By Damon - October 16, 2009

Hi,

You can add a custom styles dropdown to the WYSIWYG editor with these steps:

1. Open both these files:
/cmsAdmin/lib/wysiwyg.css
/cmsAdmin/lib/wysiwyg.php
- make a backup of both before making any changes.

2. In the wysiwyg.php file, on line 48:

theme_advanced_buttons1 : "formatselect

Change to:
theme_advanced_buttons1 : "styleselect, formatselect

3. In the wysiwyg.css file, on line 31, add classes to have them appear in your 'styleselect' pulldown.

This will allow youu users to add classes and visually see the effect in the editor.

4. Add the same custom styles to the css file that is linked to your published pages.

Hope that makes sense. Let me know if you have any questions.
Cheers,
Damon Edis - interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/