Server IP : 162.0.232.140 / Your IP : 3.135.201.190 Web Server : LiteSpeed System : Linux premium139.web-hosting.com 4.18.0-513.24.1.lve.2.el8.x86_64 #1 SMP Fri May 24 12:42:50 UTC 2024 x86_64 User : micrcvoy ( 740) PHP Version : 8.1.32 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/micrcvoy/zomticksa.store/controlPanel/assets/plugins/summernote/src/js/editing/ |
Upload File : |
define([ 'summernote/core/dom', 'summernote/core/range', 'summernote/core/list' ], function (dom, range, list) { /** * @class editing.Table * * Table * */ var Table = function () { /** * handle tab key * * @param {WrappedRange} rng * @param {Boolean} isShift */ this.tab = function (rng, isShift) { var cell = dom.ancestor(rng.commonAncestor(), dom.isCell); var table = dom.ancestor(cell, dom.isTable); var cells = dom.listDescendant(table, dom.isCell); var nextCell = list[isShift ? 'prev' : 'next'](cells, cell); if (nextCell) { range.create(nextCell, 0).select(); } }; /** * create empty table element * * @param {Number} rowCount * @param {Number} colCount * @return {Node} */ this.createTable = function (colCount, rowCount) { var tds = [], tdHTML; for (var idxCol = 0; idxCol < colCount; idxCol++) { tds.push('<td>' + dom.blank + '</td>'); } tdHTML = tds.join(''); var trs = [], trHTML; for (var idxRow = 0; idxRow < rowCount; idxRow++) { trs.push('<tr>' + tdHTML + '</tr>'); } trHTML = trs.join(''); return $('<table class="table table-bordered">' + trHTML + '</table>')[0]; }; }; return Table; });