tinymce-rails configuration tinymce.yml

1.5k views Asked by At

I'm attempting to use tinymce-rails. I'm not certain how to setup the tinymce.yml file and the documentation doesn't really explain much. The main issue I am having is setting up plugin configurations. For example, how would one setup,

insertdate_dateformat: "%Y-%m-%d"

for the following plugin:

- insertdatetime

YAML is Below:

theme_advanced_toolbar_location: top
theme_advanced_toolbar_align: left
theme_advanced_statusbar_location: bottom
theme_advanced_buttons3_add:
  - tablecontrols
  - fullscreen
plugins:
  - table
  - fullscreen
  - insertdatetime

How can this be done?

1

There are 1 answers

0
Sebastian Iorga On

Make sure to use the version 4.0 documentation, since I am assuming you are using the latest version of the gem. Among other changes, there no longer exists an advanced theme, it's called modern.

Furthermore, you don't need to specify theme_blabla anymore. So try writing your yaml as:

toolbar_location: top
toolbar_align: left
statusbar_location: bottom
buttons3_add:
  - tablecontrols
  - fullscreen
plugins:
  - table
  - fullscreen
  - insertdatetime
insertdate_dateformat: "%Y-%m-%d"