Sha256: e2901cbb680b7295dd34b41d585299d9d518e4bedd82405373a09308e37a0317

Contents?: true

Size: 825 Bytes

Versions: 5

Compression:

Stored size: 825 Bytes

Contents

//= require active_admin/editor/wysihtml5.min
//= require active_admin/editor/wysihtml5/parser_rules
//= require active_admin/editor/quicksave

(function($) {
    $(function(){
        var active_admin_editor, textarea_id, toolbar_id;
        active_admin_editor = $('.active_admin_editor');

        if (active_admin_editor.length > 0) {
            textarea_id         = active_admin_editor.find('textarea').attr('id');
            toolbar_id          = active_admin_editor.find('.active_admin_editor_toolbar').attr('id');

            var editor = new wysihtml5.Editor(textarea_id, {
                toolbar: toolbar_id,
                stylesheets: "/assets/active_admin/editor/wysiwyg",
                parserRules: wysihtml5ParserRules
            });

            window.editor = editor;
        }
    });
})(jQuery);

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
active_admin_editor-0.2.3 app/assets/javascripts/active_admin/editor.js
active_admin_editor-0.2.2 app/assets/javascripts/active_admin/editor.js
active_admin_editor-0.2.1 app/assets/javascripts/active_admin/editor.js
active_admin_editor-0.2.0 app/assets/javascripts/active_admin/editor.js
active_admin_editor-0.1.0 app/assets/javascripts/active_admin/editor.js