Sha256: 5359f70e4ccb06e2663405a5961f451a9c0534b719c0ffee91177bde5faf002a
Contents?: true
Size: 1.39 KB
Versions: 8
Compression:
Stored size: 1.39 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 vendor/redactor.table #= require vendor/redactor.fixedtoolbar #= require ./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
8 entries across 8 versions & 1 rubygems