(function (factory) { /* global define */ if (typeof define === 'function' && define.amd) { // AMD. Register as an anonymous module. define(['jquery'], factory); } else if (typeof module === 'object' && module.exports) { // Node/CommonJS module.exports = factory(require('jquery')); } else { // Browser globals factory(window.jQuery); } }(function ($) { // Extends plugins for adding readmore. // - plugin is external module for customizing. $.extend($.summernote.plugins, { /** * @param {Object} context - context object has status of editor. */ 'filebrowser': function (context) { var self = this; var ui = $.summernote.ui; // add button context.memo('button.filebrowser', function () { // create button var button = ui.button({ contents: '', tooltip: 'File Browser', click: function () { $('#FileModal').modal('show') } }); // create jQuery object from button instance. var $btn = button.render(); return $btn; }); // This methods will be called when editor is destroyed by $('..').summernote('destroy'); // You should remove elements on `initialize`. this.destroy = function () { this.$panel.remove(); this.$panel = null; }; } }); })); // create modal $(document).ready(function () { // change iframe path for file browser location var modalcode = '
File Browser<\/h5>