Module: Alchemy::Tinymce

Defined in:
lib/alchemy/tinymce.rb

Constant Summary collapse

@@plugins =
%w(alchemy_link anchor autoresize charmap code directionality fullscreen hr link lists paste tabfocus table)
@@init =
{
  skin: "alchemy",
  width: "auto",
  resize: true,
  autoresize_min_height: "105",
  autoresize_max_height: "480",
  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,
}

Class Method Summary collapse

Class Method Details

.custom_config_contents(page) ⇒ Object


37
38
39
# File 'lib/alchemy/tinymce.rb', line 37

def custom_config_contents(page)
  content_definitions_from_elements(page.descendent_element_definitions)
end

.initObject


33
34
35
# File 'lib/alchemy/tinymce.rb', line 33

def init
  @@init
end

.init=(settings) ⇒ Object


29
30
31
# File 'lib/alchemy/tinymce.rb', line 29

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