Sha256: 671a77f4a025519f5c4c97f1aec41926a6552f0b8bee47e1f7e36a9d748844d2

Contents?: true

Size: 1.03 KB

Versions: 1

Compression:

Stored size: 1.03 KB

Contents

Trestle.configure do |config|
  config.tinymce.default.configure do |c|
    c.skin = "trestle/tinymce-#{Trestle::TinyMCE.tinymce_major_version}"
    c.branding = false
    c.promotion = false
    c.elementpath = false
    c.menubar = false
    c.statusbar = false
    c.plugins = [
      :lists,
      :link,
      :image,
      :charmap,
      :table,
      :code
    ]
    c.plugins << :hr << :paste if Trestle::TinyMCE.tinymce_major_version == 5
    c.toolbar = "styleselect | bold italic underline strikethrough | subscript superscript hr | alignleft aligncenter alignright alignjustify | bullist numlist | indent outdent | undo redo | link unlink | image charmap table | code"
    c.link_context_toolbar = true
    c.convert_urls = false
  end

  config.hook(:javascripts) do
    safe_join([
      tinymce_assets,
      javascript_include_tag("trestle/tinymce"),
      javascript_tag(config.tinymce.to_javascript)
    ], "\n")
  end

  config.form_field :tinymce, Trestle::TinyMCE::Field
  config.form_field :editor, Trestle::TinyMCE::Field
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
trestle-tinymce-0.4.0.pre2 config/initializers/trestle.rb