config/initializer/tinymce_hammer.rb is not created

17 views
Skip to first unread message

krrish

unread,
Mar 19, 2010, 5:50:30 AM3/19/10
to tinymce_hammer
I followed the link http://tinymcehammer.lanalot.com/tutorials/getting_started/


After Installation of

1.

Download (zip, tgz) the tinymce_hammer plugin and copy it to:

vendor/plugins/tinymce_hammer
2.

Run:

script/generate tinymce_installation

It is not creating a config/initializer/tinymce_hammer.rb file
with default values.

Can anyone help me

Roy Pardee

unread,
Mar 21, 2010, 3:57:00 PM3/21/10
to tinymce_hammer
Are you maybe making the same mistake I did?  Dig it:

http://github.com/trevorrowe/tinymce_hammer/issues/closed#issue/11


--
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.




--
Roy Pardee
http://facebook.com/rpardee

Aashish Kiran

unread,
Mar 22, 2010, 7:44:21 AM3/22/10
to tinymce...@googlegroups.com
I downloaded zip from http://tinymcehammer.lanalot.com/tutorials/getting_started/ , then uncompressed and then move the tinymce_hammer folder into vendor/plugins/
I runned
    script/generate tinymce_installation
  But,  config/initializer/tinymce_hammer.rb file is still not created  with default values.

Can anyone help me.
with regards,
Ashish

Roy Pardee

unread,
Mar 22, 2010, 8:30:14 AM3/22/10
to tinymce...@googlegroups.com
Ah--that file you've got to create yourself--the installer doesn't do it for you (I'm pretty sure).  I don't think it's absolutely necessary--just a convenience.

Try pasting this into a file & saving it to that location & see if it works for you:

Tinymce::Hammer.plugins = %w(table paste)
Tinymce::Hammer.init = [
  [:paste_convert_headers_to_strong, true],
  [:paste_convert_middot_lists, true],
  [:paste_remove_spans, true],
  [:paste_remove_styles, true],
  [:paste_strip_class_attributes, true],
  [:theme, 'advanced'],
  [:theme_advanced_toolbar_align, 'left'],
  [:theme_advanced_toolbar_location, 'top'],
  [:theme_advanced_buttons1, 'undo,redo,cut,copy,paste,pastetext,|,bold,italic,strikethrough,blockquote,charmap,bullist,numlist,removeformat,|,link,unlink,table,|,cleanup,code'],
  [:theme_advanced_buttons2, ''],
  [:theme_advanced_buttons3, ''],
  [:valid_elements, "a[href|title],blockquote[cite],br,caption,cite,code,dl,dt,dd,em,i,img[src|alt|title|width|height|align],li,ol,p,pre,q[cite],small,strike,strong/b,sub,sup,u,ul,table,tr,th,td"],
]

HTH,

-Roy

Aashish Kiran

unread,
Mar 22, 2010, 8:38:47 AM3/22/10
to tinymce...@googlegroups.com
Thanks a lot

Trevor Rowe

unread,
Mar 22, 2010, 11:50:16 AM3/22/10
to tinymce...@googlegroups.com
Sorry for the confusion.  The generator does not build a default config/intializer/tinymce_hammer.rb file.  It could certainly be added, but that file is likely to be heavily customized and the presence would prompt a question to keep or override every time you upgrade (which is why I left it out of the generator to begin with).

All of that said, there are still defaults.   Here is what a default config/intializer/tinymce_hammer.rb might look like (the values are taken from vendor/plugins/tinymce/hammer.rb)

Tinymce::Hammer.install_path = 'javascripts/tiny_mce'
Tinymce::Hammer.plugins = ['paste']
Tinymce::Hammer.languages = ['en']
Tinymce::Hammer.themes = ['advanced']
Tinymce::Hammer.init = [
    [:paste_convert_headers_to_strong, true],
    [:paste_convert_middot_lists, true],
    [:paste_remove_spans, true],
    [:paste_remove_styles, true],
    [:paste_strip_class_attributes, true],
    [:theme, 'advanced'],
    [:theme_advanced_toolbar_align, 'left'],
    [:theme_advanced_toolbar_location, 'top'],
    [:theme_advanced_buttons1, 'undo,redo,cut,copy,paste,pastetext,|,bold,italic,strikethrough,blockquote,charmap,bullist,numlist,removeformat,|,link,unlink,image,|,cleanup,code'],
    [:theme_advanced_buttons2, ''],
    [:theme_advanced_buttons3, ''],
    [:valid_elements, "a[href|title],blockquote[cite],br,caption,cite,code,dl,dt,dd,em,i,img[src|alt|title|width|height|align],li,ol,p,pre,q[cite],small,strike,strong/b,sub,sup,u,ul"],
  ]
Reply all
Reply to author
Forward
0 new messages