Sha256: 03e6028c3d026feb5aaafdfe26bde1c67d757bcc75192ab0a0cf7c91cd4d0a6a
Contents?: true
Size: 1.38 KB
Versions: 1
Compression:
Stored size: 1.38 KB
Contents
# ----------------------------------------------------------------------------- # Author: Alexander Kravets <alex@slatestudio.com>, # Slate Studio (http://www.slatestudio.com) # # Coding Guide: # https://github.com/thoughtbot/guides/tree/master/style/coffeescript # ----------------------------------------------------------------------------- # ----------------------------------------------------------------------------- # INPUT REDACTOR # ----------------------------------------------------------------------------- # # Dependencies: #= require redactor #= require vendor/redactor.fixedtoolbar #= require ./input-redactor_character # ----------------------------------------------------------------------------- class @InputRedactor extends InputString # PRIVATE =============================================== _add_input: -> @$el.css('opacity', 0) @$input =$ "<textarea class='redactor' name='#{ @name }' rows=1>#{ @_safe_value() }</textarea>" @$el.append @$input # PUBLIC ================================================ initialize: -> @config.beforeInitialize?(this) @$input.redactor(@_redactor_options()) @$el.css('opacity', 1) @config.onInitialize?(this) updateValue: (@value) -> @_trigger_change = false @$input.redactor('code.set', @value) include(InputRedactor, redactorCharacter) chr.formInputs['redactor'] = InputRedactor
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
chr-0.3.5 | app/assets/javascripts/redactor/input-redactor.coffee |