Custom themes - allows the definitions of more tinymce themes than just simple & advanced #24

Merged
merged 3 commits into from Mar 19, 2012

Conversation

Projects
None yet
4 participants
@ghost

ghost commented Jan 20, 2012

given the following yml config:

stfalcon_tinymce:
    textarea_class: tinymce
    include_jquery: false
    theme:
        simple:
            mode: "textareas"
            theme: "advanced"
            theme_advanced_buttons1: "bold,italic,underline,seperator,link,unlink,|,spellchecker"
            theme_advanced_buttons2: ""
            theme_advanced_buttons3: ""
            theme_advanced_toolbar_location: "top"
            theme_advanced_toolbar_align: "left"
            theme_advanced_statusbar_location: ""
            plugins: "paste,spellchecker"
            paste_auto_cleanup_on_paste: true
            spellchecker_languages: "+English=en,Dutch=nl"
        advanced:
            theme: "advanced"
            plugins: "table,advhr,advimage,advlink,media,paste,fullscreen,xhtmlxtras,spellchecker"
            theme_advanced_buttons1: "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,forecolor,backcolor,|,hr,removeformat,|,sub,sup,|,spellchecker"
            theme_advanced_buttons2: "cut,copy,paste,pastetext,pasteword,|,bullist,numlist,|,undo,redo,|,link,unlink,anchor,image,cleanup,code,|,tablecontrols"
            theme_advanced_buttons3: ""
            theme_advanced_toolbar_location: "top"
            theme_advanced_toolbar_align: "left"
            theme_advanced_statusbar_location: "bottom"
            theme_advanced_resizing: true
            paste_auto_cleanup_on_paste: true
            spellchecker_languages : "+English=en,Dutch=nl"
        medium:
            mode: "textareas"
            theme: "advanced"
            plugins: "table,advhr,advlink,paste,xhtmlxtras,spellchecker"
            theme_advanced_buttons1: "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,forecolor,backcolor,|,hr,removeformat,|,sub,sup,|,spellchecker"
            theme_advanced_buttons2: "cut,copy,paste,pastetext,pasteword,|,bullist,numlist,|,undo,redo,|,link,unlink,anchor,cleanup,code,|,tablecontrols"
            theme_advanced_buttons3: ""
            theme_advanced_toolbar_location: "top"
            theme_advanced_toolbar_align: "left"
            theme_advanced_statusbar_location: ""
            paste_auto_cleanup_on_paste: true
            spellchecker_languages: "+English=en,Dutch=nl"

you can do the following in a form field definition to use a defined theme other than 'simple' or '

$builder->add('description', 'tinymce',     array(
        'label'     => 'Description', 
        'required'  => false,
        'theme' => 'medium',
));

the 'simple' theme is still used by default (if no theme was explicitly specified) and also if the explicitly specified theme is not defined.

@stfalcon

This comment has been minimized.

Show comment
Hide comment
@stfalcon

stfalcon Jan 20, 2012

Owner

nice! pls added this info to README

Owner

stfalcon commented Jan 20, 2012

nice! pls added this info to README

add some info to README.md about the changes that allow dfor definiti…
…on of additional themes (beyond 'simple' and 'advanced'
@ghost

This comment has been minimized.

Show comment
Hide comment
@ghost

ghost Jan 25, 2012

iamjochem made a quick change to the README

ghost commented Jan 25, 2012

iamjochem made a quick change to the README

@stfalcon

This comment has been minimized.

Show comment
Hide comment
@stfalcon

stfalcon Jan 27, 2012

Owner

ok. pls resolved conflicts with HEAD rev

Owner

stfalcon commented Jan 27, 2012

ok. pls resolved conflicts with HEAD rev

@stfalcon stfalcon merged commit 6d04195 into stfalcon:master Mar 19, 2012

@ardianys

This comment has been minimized.

Show comment
Hide comment
@ardianys

ardianys Mar 21, 2012

Contributor

I can't select custom theme in my installation

I got this error

The option "theme" does not exist 
Contributor

ardianys commented Mar 21, 2012

I can't select custom theme in my installation

I got this error

The option "theme" does not exist 

MisatoTremor pushed a commit to MisatoTremor/TinymceBundle that referenced this pull request Nov 10, 2017

Merge pull request #24 from nykopol/master
Fix merging process form theme configuration
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment