Jump to:

17452 Posts in 4473 Topics by 1971 members


SilverStripe Forums » Archive » tinyMCE customization

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

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

Page: 1
Go to End
Author Topic: 1819 Views
  • davee
    Community Member
    3 Posts

    tinyMCE customization Link to this post

    hi there,

    1. how to customize tinyMCE? i particulary need to add custom predefined css classes to the dropdown menuCMS

    2. each time i manually modify HTML code in the editor, tags like <q> get wiped and <p> is added as default wrapper around the content. is there a way to modify this behavior?


  • Sam
    679 Posts

    Re: tinyMCE customization Link to this post

    I've put a couple of notes here, to get you started: http://doc.silverstripe.com/doku.php?id=tinymce

  • teejay
    Community Member
    63 Posts

    Re: tinyMCE customization Link to this post

    Hi there,

    I want to add a new style to the stylelist in the CMS. So I took a look into the HtmlEditorField.php

    new HtmlEditorField_dropdown("FormatBlock", "formatSelect", array(
                "<p>" => _t('HtmlEditorField.FORMATP', "Paragraph", PR_MEDIUM, '<p> tag'),
                "<address>" => _t('HtmlEditorField.FORMATADDR', "Address", PR_MEDIUM, '<address> tag'),
                "<pre>" => "Preformatted",_t('HtmlEditorField.FORMATADDR', "Address", PR_MEDIUM, '<address> tag'),
                "<h1>" => _t('HtmlEditorField.FORMATH1', "Heading 1", PR_MEDIUM, '<h1> tag'),
                "<h2>" => _t('HtmlEditorField.FORMATH2', "Heading 2", PR_MEDIUM, '<h2> tag'),
                "<h3>" => _t('HtmlEditorField.FORMATH3', "Heading 3", PR_MEDIUM, '<h3> tag'),
                "<h4>" => _t('HtmlEditorField.FORMATH4', "Heading 4", PR_MEDIUM, '<h4> tag'),
                "<h5>" => _t('HtmlEditorField.FORMATH5', "Heading 5", PR_MEDIUM, '<h5> tag'),
                "<h6>" => _t('HtmlEditorField.FORMATH6', "Heading 6", PR_MEDIUM, '<span> tag'),
              "<strong>" => "bold", //<new

    The test with the strong tag does not work. What i want to do is something like that. Click on a list item adds the following code -> <h3><span>My Headline</span></h3> Has anyone a Idea ??

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