Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » Font selection within the CMS?

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

Page: 1 2 3
Go to End
Author Topic: 9104 Views
  • Sam
    Avatar
    Administrator
    679 Posts

    Font selection within the CMS? Link to this post

    One feature that our users increasingly ask for is the ablity to choose font & colour from within the CMS.

    Historically, we have shied away from this, with the reason that it gives the user the opportunity to muck up the design.

    However, there's no technical reason why we can't add this, and perhaps we're being a bit heavy handed.

    Perhaps site developers could be given an opportunity to filter the font, size, and colour selection lists to only show values appropriate for the site? This way, design integrity could be managed on a site-by-site basis.

    What do people think?

  • Sean
    Avatar
    Forum Moderator
    921 Posts

    Re: Font selection within the CMS? Link to this post

    I agree.

    Some clients request this ability. For example, they may want to highlight some text with a colour of red or green for their own content purposes. At least two that I've developed for have asked if there was the ability to change the font colour and the size. To get around it at the moment the only way to do this is using the H5 and H6 elements, because nobody really uses those often, and apply the colours (manually) to those for the client.

    Maybe we can also have some sort of colour picker, with common colours, or even some interface to add their own colours? I haven't thought about this a whole lot, but it's just an idea right off the top of my head. A colour picker probably isn't easy to make, and wouldn't be something I'd expect to have, but would be cool. At least giving the option of hex code or RGB values is enough for now.

    All in all, if there's a way to have this, and to enable on a case-by-case basis it would be useful.

    Sean

  • laktek
    Avatar
    Google Summer of Code Hacker
    76 Posts

    Re: Font selection within the CMS? Link to this post

    How will be the font information inserted, would it be as <font> tag or as inline styles ? I guess we have to go with the latter option cos XHTML doesn't support the 'font' tag. Even inline styles are polluting the markup. Is there any other mechanisms to do this ? I guess building custom classes on the fly would be nice way to handle this.

  • Willr
    Avatar
    Forum Moderator
    5489 Posts

    Re: Font selection within the CMS? Link to this post

    would it be as <font> tag - I would hope not . The easiest way would be to have inline styles I guess.

    Perhaps site developers could be given an opportunity to filter the font, size, and colour selection lists to only show values appropriate for the site? This way, design integrity could be managed on a site-by-site basis.

    Excellent Idea. From a designer view I dont want clients thinking yellow headings 72px in Impact and green text in 8px in comic sans is a good idea.

    We could add our own classes in the CSS like - .ArialFont {}, .VerdanaFont{} and we might set classes ( rather then inline styles) of colors which site users can use. So we can define like .red{} .pink{} in the css. Then using TinyMCE is just applys something like <span class="ArialFont red"> slightly better then inline styles. Just... but the problem with defining classes is that it wont cover even hue, shade that a user might want. That might be bad aswell as good

    This will enable us to allow user-defined colors and fonts but within a set range. As many sites might not want to have Georgia or Verdana as a font selection or if you are on a light on dark site you dont want the user to select black as a font color. I think if we give site authors too much control we might see some odd results, I just dont trust them!! just my 2cents anyways

  • Sigurd
    Avatar
    Forum Moderator
    628 Posts

    Re: Font selection within the CMS? Link to this post

    I feel what we've battled for so far is the better path. What we lack, though, is the ability for making more classes in the "Heading" dropdown. Generally, the Heading 1/2/3/4/5/6 isn't versatile enough, and can cause a nuisance if you're wanting to style a "span" of text.

    This prevents us from having a strong argument supporting our idealistic notion of preventing content editors run amuck. So, I suggest making it easy to add other classes, and documenting this well (e.g. adding it to one of our initial tutorials, etc).

    It could be as easy as YourEditor->AddClass("ArtDeco") which would then add "ArtDeco" to the dropdown, and any text in that would be a div (span?) of this new class, able to be nicely styled as a part of the whole typography set up.

  • Nicolaas
    Avatar
    Forum Moderator
    213 Posts

    Re: Font selection within the CMS? Link to this post

    This sounds like an excellent idea Siggy. In other sites I have developed in the past, outside of SS, I would for example, give the user the ability to add one extra colour in their text - which would fit with the design.

  • zaud
    Avatar
    5 Posts

    Re: Font selection within the CMS? Link to this post

    If you could modify the font size and color it would be great, I've got to hack the CMS to do this. Please add this feature, everyone of my clients asks for this and cant believe its not in there. (I may have to switc haway from silverstripe if this cant be fixed). =(

  • Sean
    Avatar
    Forum Moderator
    921 Posts

    Re: Font selection within the CMS? Link to this post

    You don't want to give your clients too much control though.

    Sig's idea is the best. This allows a site designer to control what users of the CMS should be able to change, be it font face or colour.

    If we give options to change the design too much from the WYSIWYG editor, we risk contaminating the fact that we've separated content from design from code. This is what other CMS' like Joomla are good at doing, because they give complete control of building your site from the administration area, something SS isn't trying to do.

    My two cents.

    Sean

    9104 Views
Page: 1 2 3
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.