Sha256: f54ba2e5f5c4a9e879c58767a827ab50b9381a32f94b50c558fb5fbb4bdd0fef
Contents?: true
Size: 1.09 KB
Versions: 3
Compression:
Stored size: 1.09 KB
Contents
require "trestle/tinymce/field" Trestle.configure do |config| config.tinymce.default.configure do |c| c.skin = "trestle" c.selector = "textarea.tinymce" c.branding = false c.elementpath = false c.menubar = false c.statusbar = false c.plugins = [ :lists, :link, :image, :charmap, :table, :code, :hr, :paste ] 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 config = TinyMCE::Rails::Configuration.new(Trestle.config.tinymce.default.as_json.with_indifferent_access) tinymce_assets + javascript_include_tag("trestle/tinymce") + javascript_tag("Trestle.TinyMCE.default = #{config.to_javascript};") end config.form_field :tinymce, Trestle::TinyMCE::Field config.form_field :editor, Trestle::TinyMCE::Field end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
trestle-tinymce-0.2.0 | config/initializers/trestle.rb |
trestle-tinymce-0.1.3 | config/initializers/trestle.rb |
trestle-tinymce-0.1.2 | config/initializers/trestle.rb |