Sha256: 7b46a9c87e7ce7f427387e27d34a40256aac264a3666ef8687ce8e6d366a6881

Contents?: true

Size: 638 Bytes

Versions: 1

Compression:

Stored size: 638 Bytes

Contents

$(document).ready(function() {
    $wmd_input = $('.wmd-input');
    if ( $wmd_input.length > 0 ) {

        $wmd_input.each(function( index ) {
            $this = $(this);
            $this.attr('id', 'wmd-input-' + index);
            $this.closest('.pagedown_text').find('.wmd-preview').attr('id', 'wmd-preview-' + index);
            $this.closest('.wmd-panel').find('.wmd-button-bar').attr('id', 'wmd-button-bar-' + index);
            converter = Markdown.getSanitizingConverter();
            options = {};
            editor = new Markdown.Editor(converter, "-" + index, options );
            editor.run();
        });
    }
});

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
activeadmin_pagedown-0.0.2 app/assets/javascripts/active_admin_pagedown/default.js