Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

New to TinyMCE and Rails in general, problems with configuration and viewing in index

99 views
Skip to first unread message

SeanRLaBrie

unread,
May 9, 2011, 8:48:01 PM5/9/11
to tinymce_hammer
Hello Everyone,

I'm new to working with rails and Tiny MCE, but I've got it installed
and working according to the guide here:

http://tinymcehammer.lanalot.com/tutorials/getting_started/


I'm running ruby 1.8.7-p334 and rail 3.0.7.

I can't seem to get any changes made to the config\initializers
\tinymce_hammer.rb to work.

my tinymce is installed to: public\javascripts\tiny_mce

here is my tinymce_hammer.rb file:

Tinymce::Hammer.install_path = '/javascripts/tiny_mce'

Tinymce::Hammer.plugins = %w(safari table paste tabfocus)

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,
'pasteword,|,search,replace,|,tablecontrols,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect,fontselect,fontsizeselect'],
[: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"],
]


The default tinymce window is always loaded, none of the customized
buttons load. I can't seem to see where I'm going wrong either.

Thanks in advance for any hints you can throw at me.

-Sean

SeanRLaBrie

unread,
May 10, 2011, 5:34:28 PM5/10/11
to tinymce_hammer
I just wanted to let everyone know that I got this working, i had to
stop and restart the rails service, which i did, but my IDE (netbeans)
was somehow also running the same rails server for the app, so the
restart didn't take effect until after i closed the IDE down. Don't
ask me how they were both able to start and run on port 3000...

Anyways, so the config works the first time I load any page that has a
tinymce field, but on the update/edit/ or changing to a new page it
reverts to the original default config, even with netbeans closed.

Thanks,

Sean
Reply all
Reply to author
Forward
0 new messages