Styles

14 posts by 4 authors in: Forums > CMS Builder
Last Post: March 25, 2008   (RSS)

By Michael Blake - November 29, 2007

Hi,
I'm likely to purchase CMS Builder later today (if i survive Christmas Shopping with my wife [:)])

Just a quick question, looking at the demo it appears that the css styles are inline rather than using a global css, is that the case and if so can I change that to refer to my main site css file?

Thanks,
Mickey

Re: [Michael Blake] Styles

By Dave - November 29, 2007

You can use a global CSS. We're in the middle of transitioning our own site to CMS Builder and we use a global CSS.

I think what we're doing for our own site is using the default formats (h1, h2, etc) and giving default styles to those.
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] Styles

By Michael Blake - November 29, 2007

Thanks Dave,

Mickey

Re: [Michael Blake] Styles

By steve_e - March 16, 2008

Is it possible that someone will write a tutorial on how to link a global stylesheet into the CMS editor? [:)]

Re: [steve_e] Styles

By Dave - March 16, 2008

I'm sure we can help you out!

Can you give me some more details about what you trying to do and how you want it to work?
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] Styles

By steve_e - March 17, 2008

Hi Dave -
Hmm. Well perhaps it might be possible to have either a second drop down box (as the one that allows you to select Heading 1) but which shows the main styles set up in the external style sheet for a particular site, or alternatively, if there isn't room for two drop down boxes, for you to be able to select and change what styles show up in that drop down box - ie the default styles as you already have it, or the external (global) style sheet as you have set up for your site?

That way it would be possible to use standard markup or your own stylesheet as needed if that makes sense?

Re: [steve_e] Styles

By Dave - March 17, 2008

Ok, which version are you running? v1.10? Try this:

Open /lib/menus/default/edit_functions.php and search for "theme_advanced_buttons1". That line specifies the first row of buttons for the tinymce wysiwyg. You can see a list of possible buttons here: http://wiki.moxiecode.com/index.php/TinyMCE:Control_reference

Add "styleselect," to the beginning of that value like this:

theme_advanced_buttons1 : "styleselect,formatselect,fontsizeselect,bold...

This will add a pulldown for css classes the user can style content with. If you like you can remove formatselect and/or fontsizeselect to remove the wysiwyg pulldowns for format and size.

Next, replace /css/wysiwyg.css with the attached wysiwyg.css file. It's from v1.11 (not yet released) is updated to work with the latest TinyMCE version. You'll see at the bottom of that file a place where you can add classes. Just add classes there and they'll show up in the wysiwyg pulldown.

You can either link to this file from your website or copy and paste the classes you want from your website css file to this one.

Hope that makes sense. Let me know if you have any more questions on that or if you need more detail! :)
Dave Edis - Senior Developer
interactivetools.com
Attachments:

wysiwyg.css 2K

Re: [Dave] Styles

By steve_e - March 18, 2008

Hi Dave -
Brilliant, perfect, many thanks!

It works seamlessly and the source code looks great as well. Exactly what I wanted! [:)]

Regards, Steve.

Re: [steve_e] Styles

By Dave - March 18, 2008

Great, glad to hear it.

Just make sure when you upgrade that you don't overwrite that file with your changes. It might be a good idea to keep a backup copy in the same dir: wysiwyg.css.backup
Dave Edis - Senior Developer
interactivetools.com