Sha256: e77d7ac0eebcccb5b63fb80bf1f83f74499807083e9ecccb9d64b4b86c9c8fca

Contents?: true

Size: 1014 Bytes

Versions: 2

Compression:

Stored size: 1014 Bytes

Contents

ready = ->
  post_url = "/annex/blocks"

  # cmd+s saves the editor contents
  $(window).keydown (e) ->
    $(".redactor").addClass "active"  if (e.which is "17") and (e.ctrlKey or e.metaKey)
    return

  # on click of .redactor, fire up a redactor instance
  $("body").on "click", ".redactor", ->
    unless $(this).hasClass("redactor-editor")
      $(this).redactor
        focus: true
        buttonSource: true
        plugins: [
          "definedlinks"
          "fontsize"
          "fontcolor"
          "table"
          "filemanager"
          "imagemanager"
          "video"
          "clips"
          "fullscreen"
          "save"
        ]
        toolbarFixed: false
        formatting: ['p', 'blockquote', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6']
        formattingAdd: [
          {
            tag: 'pre'
            title: 'pre'
          }
          {
            tag: 'code'
            title: 'code'
          }
        ]

    return

$(document).ready(ready)
$(document).on('page:load', ready)

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
annex-cms-0.3.8 app/assets/javascripts/annex/cms.js.coffee
annex-cms-0.3.7 app/assets/javascripts/annex/cms.js.coffee