Jump to:

5453 Posts in 1674 Topics by 1198 members

Customising the CMS

SilverStripe Forums » Customising the CMS » TinyMCE

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

Page: 1 2
Go to End
Author Topic: 2316 Views
  • mhull
    Avatar
    Community Member
    79 Posts

    TinyMCE Link to this post

    I am trying to add text size and text colour to HtmlEditor Field. I have added formatselect,fontsizeselect", to the tinymce.template.js which shows the button in the toolbar but has no effect!

    This is driving me crazy, and I have gone through the forum trying to find the answer, and the question seems to have arised a number of times.

    These buttons are just not adding any styles. I have tried changing themes to see if it is being controlled in my stylesheets, and have just tried installing the latest version of SS but still cant get it to work.

    Can anyone help?

  • Aram
    Avatar
    Community Member
    598 Posts

    Re: TinyMCE Link to this post

    HI mhull

    I have done this without a problem....can't think of a reason why it would not be working for you as it adds the styles inline. To add font color simple add forecolor to the tinyMCE template:

    .....justifyfull,styleselect,formatselect,forecolor,separator.......

    Make sure there are no spaces as that seemed to break it for me.

  • mhull
    Avatar
    Community Member
    79 Posts

    Re: TinyMCE Link to this post

    Aram,

    I have just tried exactly as you described, added this line to the tinymce.template.js and it has added the colour text option, but when I try to use it, it only adds <p><span style="font-family: mceinline;">Test</span></p> to the text.

    Any ideas?

  • Aram
    Avatar
    Community Member
    598 Posts

    Re: TinyMCE Link to this post

    hmm, thats very strange.....

    here is my complete template file: http://pastie.org/439456

    I had a few other plugins changes which I have removed, although I left fullscreen in there to see if that works

  • mhull
    Avatar
    Community Member
    79 Posts

    Re: TinyMCE Link to this post

    Aram,

    Thanks for posting, but still I cant get it to add any styles. I could understand that I may have some styles overriding it, but all that is showing is <span style="font-family: mceinline;">Test</span>

  • Aram
    Avatar
    Community Member
    598 Posts

    Re: TinyMCE Link to this post

    hmmm, I'm afraid I can't be much more help.....perhaps try it on a fresh install?

  • mhull
    Avatar
    Community Member
    79 Posts

    Re: TinyMCE Link to this post

    I think I may have solved my problem. I was flushing my browser, but it wasnt looking correct in safari, went into Firefox and it allowed me to apply inline styles through TinyMCE. Is this a Safari problem do you think?

    I also looked through the TinyMCE site and found reference to applying -
    inline_styles : true

    which may have made a difference.

    Thanks for your help

  • Aram
    Avatar
    Community Member
    598 Posts

    Re: TinyMCE Link to this post

    nice one, well done for tracking it down. I guess it must be a safar issue as it was still able to apply the inline style, just not the right one Also I can do it without adding that line. still good to be aware of

    2316 Views
Page: 1 2
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.