Sha256: b2bf02a87e50f5637f194f5331cdf6a6c2895cc80c4694c0a5fa0279a777fb73

Contents?: true

Size: 894 Bytes

Versions: 13

Compression:

Stored size: 894 Bytes

Contents

wagn.addEditor(
  '.tinymce-textarea',
  ->
    wagn.initTinyMCE @[0].id
  ->
    tinyMCE.get(@[0].id).getContent()
)

$.extend wagn,
  setTinyMCEConfig: (string) ->
    setter = ->
      try
        $.parseJSON string
      catch
        {}
    wagn.tinyMCEConfig = setter()

  initTinyMCE: (el_id) ->
    # verify_html: false -- note: this option needed for empty
    #                             paragraphs to add space.
    conf = {
      plugins: 'autoresize'
      autoresize_max_height: 500
    }
    user_conf = if wagn.tinyMCEConfig? then wagn.tinyMCEConfig else {}
    hard_conf = {
      mode: 'exact'
      elements: el_id
      # CSS could be made optional, but it may involve migrating old legacy
      # *tinyMCE settings to get rid of stale stuff.
      content_css: wagn.cssPath
      entity_encoding: 'raw'
    }
    $.extend conf, user_conf, hard_conf
    tinyMCE.init conf

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
card-1.21.0 mod/tinymce_editor/lib/javascript/script_tinymce_config.js.coffee
card-1.20.4 mod/tinymce_editor/lib/javascript/script_tinymce_config.js.coffee
card-1.20.3 mod/tinymce_editor/lib/javascript/script_tinymce_config.js.coffee
card-1.20.2 mod/tinymce_editor/lib/javascript/script_tinymce_config.js.coffee
card-1.20.1 mod/tinymce_editor/lib/javascript/script_tinymce_config.js.coffee
card-1.20.0 mod/tinymce_editor/lib/javascript/script_tinymce_config.js.coffee
card-1.19.6 mod/tinymce_editor/lib/javascript/script_tinymce_config.js.coffee
card-1.19.5 mod/tinymce_editor/lib/javascript/script_tinymce_config.js.coffee
card-1.19.4 mod/tinymce_editor/lib/javascript/script_tinymce_config.js.coffee
card-1.19.3 mod/tinymce_editor/lib/javascript/script_tinymce_config.js.coffee
card-1.19.2 mod/tinymce_editor/lib/javascript/script_tinymce_config.js.coffee
card-1.19.1 mod/tinymce_editor/lib/javascript/script_tinymce_config.js.coffee
card-1.19.0 mod/tinymce_editor/lib/javascript/script_tinymce_config.js.coffee