Sha256: 5b21a290697ad18a41afc5140d06827a99398c24cdd1aafd3838ecaa26600bd3

Contents?: true

Size: 635 Bytes

Versions: 31

Compression:

Stored size: 635 Bytes

Contents

$(document).ready ->
  $('.ace_json_editor').each ->
    editor_area = document.createElement('div')
    this.appendChild(editor_area)

    # Initialize Ace Editor
    editor = ace.edit(editor_area)
    editor.getSession().setMode("ace/mode/json")
    editor.getSession().setTabSize(2)
    editor.getSession().setUseWrapMode(true);
    editor.setPrintMarginColumn(800)
    editor.setOptions({
      minLines: 8,
      maxLines: Infinity
    });

    textarea = $(this).children('textarea').hide()
    editor.getSession().setValue textarea.val()
    editor.getSession().on "change", ->
      textarea.val editor.getSession().getValue()

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
biola_wcms_components-0.23.0 app/assets/javascripts/components/forms/json_editor.js.coffee
biola_wcms_components-0.22.0 app/assets/javascripts/components/forms/json_editor.js.coffee
biola_wcms_components-0.21.0 app/assets/javascripts/components/forms/json_editor.js.coffee
biola_wcms_components-0.20.0 app/assets/javascripts/components/forms/json_editor.js.coffee
biola_wcms_components-0.19.0 app/assets/javascripts/components/forms/json_editor.js.coffee
biola_wcms_components-0.18.1 app/assets/javascripts/components/forms/json_editor.js.coffee
biola_wcms_components-0.18.0 app/assets/javascripts/components/forms/json_editor.js.coffee
biola_wcms_components-0.17.0 app/assets/javascripts/components/forms/json_editor.js.coffee
biola_wcms_components-0.16.0 app/assets/javascripts/components/forms/json_editor.js.coffee
biola_wcms_components-0.15.3 app/assets/javascripts/components/forms/json_editor.js.coffee
biola_wcms_components-0.15.2 app/assets/javascripts/components/forms/json_editor.js.coffee
biola_wcms_components-0.15.1 app/assets/javascripts/components/forms/json_editor.js.coffee
biola_wcms_components-0.15.0 app/assets/javascripts/components/forms/json_editor.js.coffee
biola_wcms_components-0.14.0 app/assets/javascripts/components/forms/json_editor.js.coffee
biola_wcms_components-0.13.0 app/assets/javascripts/components/forms/json_editor.js.coffee
biola_wcms_components-0.12.0 app/assets/javascripts/components/forms/json_editor.js.coffee
biola_wcms_components-0.11.0 app/assets/javascripts/components/forms/json_editor.js.coffee
biola_wcms_components-0.10.0 app/assets/javascripts/components/forms/json_editor.js.coffee
biola_wcms_components-0.9.1 app/assets/javascripts/components/forms/json_editor.js.coffee
biola_wcms_components-0.9.0 app/assets/javascripts/components/forms/json_editor.js.coffee