// Style formats
style_formats : [
{title : 'Bold text', inline : 'b'},
{title : 'Red text', inline : 'span', styles : {color : '#ff0000'}},
{title : 'Red header', block : 'h1', styles : {color : '#ff0000'}},
{title : 'Example 1', inline : 'span', classes : 'example1'},
{title : 'Example 2', inline : 'span', classes : 'example2'},
{title : 'Table styles'},
{title : 'Table row 1', selector : 'tr', classes : 'tablerow1'}
]
How do set this in the tinymce_hammer.rb initializer file?
Tinymce::Hammer.init = [
[:style_formats, "[{title:'Bold text', inline:'b'}, {title:'Red header', block:'h1', styles:{color:'#fff'} ....]"],
...
]
I've been planning to revisit the configuration interface. I will probably modify it to allow for:
- a traditional (unordered hash)
- a javascript string
The string version would make this simpler. There really isn't much benefit to the arbitrary method of settings it through ruby code as its is never used by ruby and is converted straight to javascript. I'll try to put this in with the next update.
--
You received this message because you are subscribed to the Google Groups "tinymce_hammer" group.
To post to this group, send email to tinymce...@googlegroups.com.
To unsubscribe from this group, send email to tinymce_hamme...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/tinymce_hammer?hl=en.
But it works to just pass a ruby hash or array. Strange, but good ;)
[:style_formats, [ {:title => 'Bold text', :inline => 'b'} ]] does the
trick!
Funky. Nice. Working.
Thanks and regards
Thomas
On 30 Mrz., 18:02, Trevor Rowe <trevorr...@gmail.com> wrote: