Sha256: 7b10c25e227bf9d1ecd70b2487c7d148a568b7a4bfba2be2449f944d2a567a9c

Contents?: true

Size: 1.86 KB

Versions: 4

Compression:

Stored size: 1.86 KB

Contents

/* ===========================================================
 * trumbowyg.indent.js v1.0
 * Indent or Outdent plugin for Trumbowyg
 * http://alex-d.github.com/Trumbowyg
 * ===========================================================
 * Author : Fabacks
 *          Website : https://github.com/Fabacks
 */

 (function ($) {
    'use strict';

    $.extend(true, $.trumbowyg, {
        langs: {
            en: {
                indent: 'Indent',
                outdent: 'Outdent'
            },
            et: {
                indent: 'Taande suurendamine',
                outdent: 'Taande vähendamine'
            },
            fr: {
                indent: 'Augmenter le retrait',
                outdent: 'Diminuer le retrait'
            }
        }
    });

    // Adds the extra button definition
    $.extend(true, $.trumbowyg, {
        plugins: {
            paragraph: {
                init: function (trumbowyg) {
                    var indentBtnDef = {
                        fn: 'indent',
                        title: trumbowyg.lang.indent,
                        isSupported: function () {
                            return !!document.queryCommandSupported && !!document.queryCommandSupported('indent');
                        },
                        ico: 'indent'
                    };

                    var outdentBtnDef = {
                        fn: 'outdent',
                        title: trumbowyg.lang.outdent,
                        isSupported: function () {
                            return !!document.queryCommandSupported && !!document.queryCommandSupported('outdent');
                        },
                        ico: 'outdent'
                    };

                    trumbowyg.addBtnDef('indent', indentBtnDef);
                    trumbowyg.addBtnDef('outdent', outdentBtnDef);
                }
            }
        }
    });
})(jQuery);

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
activeadmin_trumbowyg-1.1.0 app/assets/javascripts/activeadmin/trumbowyg/plugins/indent/trumbowyg.indent.js
activeadmin_trumbowyg-1.0.0 app/assets/javascripts/activeadmin/trumbowyg/plugins/indent/trumbowyg.indent.js
activeadmin_trumbowyg-0.2.16 app/assets/javascripts/activeadmin/trumbowyg/plugins/indent/trumbowyg.indent.js
activeadmin_trumbowyg-0.2.14 app/assets/javascripts/activeadmin/trumbowyg/plugins/indent/trumbowyg.indent.js