# all files / src/js/ summernote.js

27.59% Statements 8/29
0% Branches 0/12
50% Functions 2/4
25% Lines 7/28

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    471×
    1×
    1×
    1×
    1×
    1×
    1×

     (function(global){global.wrappers['/Users/lqez/Dev/summernote/src/js/summernote.js']=[function(require,module,exports,__dirname,__filename){ "use strict";
    exports.__esModule = true;
    var jquery_1 = require("jquery");
    var env_1 = require("./base/core/env");
    var lists_1 = require("./base/core/lists");
    var Context_1 = require("./base/Context");
    jquery_1["default"].fn.extend({
        /**
         * Summernote API
         *
         * @param {Object|String}
         * @return {this}
         */
        summernote: function () {
            var type = jquery_1["default"].type(lists_1["default"].head(arguments));
            var isExternalAPICalled = type === 'string';
            var hasInitOptions = type === 'object';
            var options = jquery_1["default"].extend({}, jquery_1["default"].summernote.options, hasInitOptions ? lists_1["default"].head(arguments) : {});
            // Update options
            options.langInfo = jquery_1["default"].extend(true, {}, jquery_1["default"].summernote.lang['en-US'], jquery_1["default"].summernote.lang[options.lang]);
            options.icons = jquery_1["default"].extend(true, {}, jquery_1["default"].summernote.options.icons, options.icons);
            options.tooltip = options.tooltip === 'auto' ? !env_1["default"].isSupportTouch : options.tooltip;
            this.each(function (idx, note) {
                var $note = jquery_1["default"](note);
                if (!$note.data('summernote')) {
                    var context = new Context_1["default"]($note, options);
                    $note.data('summernote', context);
                    $note.data('summernote').triggerEvent('init', context.layoutInfo);
                }
            });
            var $note = this.first();
            if ($note.length) {
                var context = $note.data('summernote');
                if (isExternalAPICalled) {
                    return context.invoke.apply(context, lists_1["default"].from(arguments));
                }
                else if (options.focus) {
                    context.invoke('editor.focus');
                }
            }
            return this;
        }
    });

    },'src/js/summernote.js',{"jquery":"/Users/lqez/Dev/summernote/node_modules/jquery/dist/jquery.js","./base/core/env":"/Users/lqez/Dev/summernote/src/js/base/core/env.js","./base/core/lists":"/Users/lqez/Dev/summernote/src/js/base/core/lists.js","./base/Context":"/Users/lqez/Dev/summernote/src/js/base/Context.js"}];})(this);
    //# sourceMappingURL=data:application/json;charset=utf-8;base64,