Module: Alchemy::Tinymce

Defined in:
lib/alchemy/tinymce.rb

Constant Summary collapse

DEFAULT_PLUGINS =
%w[
  anchor
  charmap
  code
  directionality
  fullscreen
  link
  lists
]
@@plugins =
DEFAULT_PLUGINS + %w[alchemy_link]
@@init =
{
  skin: "alchemy",
  content_css: "/assets/tinymce/skins/content/alchemy/content.min.css",
  icons: "remixicons",
  width: "auto",
  resize: true,
  min_height: 250,
  menubar: false,
  statusbar: true,
  toolbar: [
    "bold italic underline | strikethrough subscript superscript | numlist bullist indent outdent | removeformat | fullscreen",
    "pastetext charmap hr | undo redo | alchemy_link unlink anchor | code"
  ],
  fix_list_elements: true,
  convert_urls: false,
  entity_encoding: "raw",
  paste_as_text: true,
  element_format: "html",
  branding: false,
  license_key: "gpl"
}

Class Method Summary collapse

Class Method Details

.initObject



45
46
47
# File 'lib/alchemy/tinymce.rb', line 45

def init
  @@init
end

.init=(settings) ⇒ Object



41
42
43
# File 'lib/alchemy/tinymce.rb', line 41

def init=(settings)
  @@init.merge!(settings)
end

.preloadable_pluginsObject



49
50
51
# File 'lib/alchemy/tinymce.rb', line 49

def preloadable_plugins
  @@plugins - DEFAULT_PLUGINS
end