Sha256: c52b527830ab7154c57f8383ad4273d7d27e429383e46fe2a083ea7b6ddd47aa
Contents?: true
Size: 1.41 KB
Versions: 1
Compression:
Stored size: 1.41 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.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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
formagic-0.2.5 | app/assets/javascripts/formagic/inputs/redactor.coffee |