Sha256: 99ae49dafb25f64d4f0ea6c251f8a93d0ec0bf394acd24c9f899cda7a2c2050e

Contents?: true

Size: 1.68 KB

Versions: 28

Compression:

Stored size: 1.68 KB

Contents

# -*- encoding : utf-8 -*-

class AddTinymceCards < Card::Migration
  TINYMCE_CONFIG = <<-JSON.strip_heredoc
    {
      "width":"100%",
      "auto_resize":true,
      "relative_urls":false,
      "theme":"advanced",
      "theme_advanced_buttons1":"formatselect,bold,italic,separator,blockquote,bullist,numlist,hr,separator,code,removeformat",
      "theme_advanced_buttons2":"",
      "theme_advanced_buttons3":"",
      "theme_advanced_path":false,
      "theme_advanced_toolbar_location":"top",
      "theme_advanced_toolbar_align":"left",
      "theme_advanced_resizing":true,
      "theme_advanced_resize_horizontal":false,
      "theme_advanced_statusbar_location":"bottom",
      "theme_advanced_blockformats":"p,h1,h2,pre",
      "extended_valid_elements":"a[name|href|target|title|onclick],img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name],hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]"
    }
  JSON

  def up
    ensure_card name: "*TinyMCE", type_id: Card::PlainTextID,
                codename: "tiny_mce",
                content: TINYMCE_CONFIG
    Card::Cache.reset_all
    create_or_update(
      name: "*TinyMCE+*self+*help",
      content: "Configure [[http://tinymce.com|TinyMCE]], Wagn's default "\
               "[[http://en.wikipedia.org/wiki/Wysiwyg|wysiwyg]] editor. "\
               "[[http://wagn.org/TinyMCE|more]]"
    )
    ensure_card name: "script: tinymce",
                type_id: Card::JavaScriptID,
                codename: "script_tinymce"
    ensure_card name: "script: tinymce config",
                type_id: Card::CoffeeScriptID,
                codename: "script_tinymce_config"
  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
card-1.96.2 mod/tinymce_editor/db/migrate_core_cards/20160804112560_add_tinymce_cards.rb
card-1.96.1 mod/tinymce_editor/db/migrate_core_cards/20160804112560_add_tinymce_cards.rb
card-1.96.0 mod/tinymce_editor/db/migrate_core_cards/20160804112560_add_tinymce_cards.rb
card-1.95.3 mod/tinymce_editor/db/migrate_core_cards/20160804112560_add_tinymce_cards.rb
card-1.95.2 mod/tinymce_editor/db/migrate_core_cards/20160804112560_add_tinymce_cards.rb
card-1.95.1 mod/tinymce_editor/db/migrate_core_cards/20160804112560_add_tinymce_cards.rb
card-1.95.0 mod/tinymce_editor/db/migrate_core_cards/20160804112560_add_tinymce_cards.rb
card-1.94.1 mod/tinymce_editor/db/migrate_core_cards/20160804112560_add_tinymce_cards.rb
card-1.94.0 mod/tinymce_editor/db/migrate_core_cards/20160804112560_add_tinymce_cards.rb
card-1.93.13 mod/tinymce_editor/db/migrate_core_cards/20160804112560_add_tinymce_cards.rb
card-1.93.12 mod/tinymce_editor/db/migrate_core_cards/20160804112560_add_tinymce_cards.rb
card-1.93.11 mod/tinymce_editor/db/migrate_core_cards/20160804112560_add_tinymce_cards.rb
card-1.93.10 mod/tinymce_editor/db/migrate_core_cards/20160804112560_add_tinymce_cards.rb
card-1.93.9 mod/tinymce_editor/db/migrate_core_cards/20160804112560_add_tinymce_cards.rb
card-1.93.8 mod/tinymce_editor/db/migrate_cards/20160804112560_add_tinymce_cards.rb
card-1.93.7 mod/tinymce_editor/db/migrate_cards/20160804112560_add_tinymce_cards.rb
card-1.93.6 mod/tinymce_editor/db/migrate_cards/20160804112560_add_tinymce_cards.rb
card-1.93.5 mod/tinymce_editor/db/migrate_cards/20160804112560_add_tinymce_cards.rb
card-1.93.4 mod/tinymce_editor/db/migrate_cards/20160804112560_add_tinymce_cards.rb
card-1.93.3 mod/tinymce_editor/db/migrate_cards/20160804112560_add_tinymce_cards.rb