medium-editor-tables
Advanced tools
Comparing version 0.2.0 to 0.2.1
{ | ||
"name": "medium-editor-tables", | ||
"version": "0.2.0", | ||
"version": "0.2.1", | ||
"homepage": "http://daviferreira.github.io/medium-editor/", | ||
@@ -38,5 +38,5 @@ "authors": [ | ||
"dependencies": { | ||
"medium-editor": "^4.1.0", | ||
"medium-editor": "^4.6.0", | ||
"normalize.css": "~3.0.2" | ||
} | ||
} |
@@ -0,1 +1,7 @@ | ||
0.2.1 / 2015-04-26 | ||
================== | ||
* Fix main reference on package.json | ||
0.2.0 / 2015-03-29 | ||
@@ -2,0 +8,0 @@ ================== |
@@ -6,4 +6,4 @@ module.exports = { | ||
.concat(['src/wrappers/end.js']), | ||
dest: 'dist/js/<%= package.name %>.js', | ||
dest: 'dist/js/<%= package.name %>.js' | ||
} | ||
}; |
@@ -1,2 +0,2 @@ | ||
module.exports = { | ||
module.exports = { | ||
dist: { | ||
@@ -3,0 +3,0 @@ src: 'reports/jasmine/lcov/lcov.info' |
@@ -9,3 +9,3 @@ module.exports = { | ||
junit: { | ||
path: "reports/jasmine/", | ||
path: 'reports/jasmine/', | ||
consolidate: true | ||
@@ -12,0 +12,0 @@ }, |
module.exports = { | ||
src: jsSourceFiles, | ||
src: jsSourceFiles.concat(['Gruntfile.js', 'grunt/*.js', 'spec/*.js']), | ||
options: { | ||
@@ -4,0 +4,0 @@ config: '.jscsrc' |
module.exports = { | ||
build: jsSourceFiles | ||
build: jsSourceFiles.concat(['Gruntfile.js', 'grunt/*.js', 'spec/*.js']) | ||
}; |
@@ -9,5 +9,5 @@ global.jsSourceFiles = [ | ||
module.exports = function(grunt) { | ||
module.exports = function (grunt) { | ||
require('load-grunt-config')(grunt, { | ||
loadGruntTasks: { //can optionally pass options to load-grunt-tasks. If you set to false, it will disable auto loading tasks. | ||
loadGruntTasks: { | ||
pattern: [ | ||
@@ -14,0 +14,0 @@ 'grunt-*', |
{ | ||
"name": "medium-editor-tables", | ||
"version": "0.2.0", | ||
"version": "0.2.1", | ||
"author": "Davi Ferreira <hi@daviferreira.com>", | ||
"description": "MediumEditor extension to allow tables.", | ||
"main": "src/js/medium-editor-tables.js", | ||
"main": "dist/js/medium-editor-tables.js", | ||
"repository": { | ||
@@ -29,16 +29,17 @@ "type": "git", | ||
"devDependencies": { | ||
"grunt": "^0.4.5", | ||
"grunt-autoprefixer": "^2.2.0", | ||
"grunt-contrib-concat": "^0.5.0", | ||
"grunt-contrib-cssmin": "^0.12.1", | ||
"grunt-contrib-jasmine": "^0.8.2", | ||
"grunt-contrib-jshint": "^0.11.0", | ||
"grunt-contrib-uglify": "^0.8.0", | ||
"grunt-contrib-watch": "^0.6.1", | ||
"grunt-coveralls": "^1.0.0", | ||
"grunt-jscs": "^1.5.0", | ||
"grunt-sass": "^0.18.0", | ||
"grunt-template-jasmine-istanbul": "^0.3.3", | ||
"load-grunt-config": "^0.16.0", | ||
"time-grunt": "^1.0.0" | ||
"grunt": "0.4.5", | ||
"grunt-autoprefixer": "3.0.0", | ||
"grunt-bump": "0.3.1", | ||
"grunt-contrib-concat": "0.5.1", | ||
"grunt-contrib-cssmin": "0.12.2", | ||
"grunt-contrib-jasmine": "0.8.2", | ||
"grunt-contrib-jshint": "0.11.2", | ||
"grunt-contrib-uglify": "0.9.1", | ||
"grunt-contrib-watch": "0.6.1", | ||
"grunt-coveralls": "1.0.0", | ||
"grunt-jscs": "1.6.0", | ||
"grunt-sass": "0.18.1", | ||
"grunt-template-jasmine-istanbul": "0.3.3", | ||
"load-grunt-config": "^0.17.1", | ||
"time-grunt": "1.1.1" | ||
}, | ||
@@ -50,4 +51,4 @@ "scripts": { | ||
"dependencies": { | ||
"medium-editor": "^4.1.0" | ||
"medium-editor": "^4.6.0" | ||
} | ||
} |
@@ -25,3 +25,3 @@ describe('Util TestCase', function () { | ||
}); | ||
}) | ||
}); | ||
}); |
@@ -1,2 +0,2 @@ | ||
function Grid (el, callback, rows, columns) { | ||
function Grid(el, callback, rows, columns) { | ||
return this.init(el, callback, rows, columns); | ||
@@ -19,3 +19,3 @@ } | ||
markCells: function () { | ||
[].forEach.call(this._cellsElements, function(el) { | ||
[].forEach.call(this._cellsElements, function (el) { | ||
var cell = { | ||
@@ -26,3 +26,3 @@ column: parseInt(el.dataset.column, 10), | ||
var active = this._currentCell && | ||
cell.row <= this._currentCell.row && | ||
cell.row <= this._currentCell.row && | ||
cell.column <= this._currentCell.column; | ||
@@ -62,3 +62,3 @@ if (active === true) { | ||
this._generateCells(); | ||
this._cells.map(function(cell) { | ||
this._cells.map(function (cell) { | ||
html += '<a href="#" class="medium-editor-table-builder-cell' + | ||
@@ -80,3 +80,3 @@ (cell.active === true ? ' active' : '') + | ||
_bindEvents: function () { | ||
[].forEach.call(this._cellsElements, function(el) { | ||
[].forEach.call(this._cellsElements, function (el) { | ||
this._onMouseEnter(el); | ||
@@ -83,0 +83,0 @@ this._onClick(el); |
@@ -1,2 +0,2 @@ | ||
function MediumEditorTable (options) { | ||
function MediumEditorTable(options) { | ||
this.options = extend(options, { | ||
@@ -22,3 +22,3 @@ columns: 10, | ||
getForm: function() { | ||
getForm: function () { | ||
if (!this.builder) { | ||
@@ -25,0 +25,0 @@ this.builder = new Builder({ |
@@ -36,3 +36,4 @@ function Table(editor) { | ||
var html = ''; | ||
var x, y; | ||
var x; | ||
var y; | ||
var text = getSelectionText(this._doc); | ||
@@ -60,4 +61,4 @@ | ||
_onKeyDown: function (e) { | ||
var el = getSelectionStart(this._doc), | ||
table; | ||
var el = getSelectionStart(this._doc); | ||
var table; | ||
@@ -93,5 +94,6 @@ if (e.which === TAB_KEY_CODE && isInsideElementOfTag(el, 'table')) { | ||
_insertRow: function (tbody, cols) { | ||
var tr = document.createElement('tr'), | ||
html = '', | ||
i; | ||
var tr = document.createElement('tr'); | ||
var html = ''; | ||
var i; | ||
for (i = 0; i < cols; i += 1) { | ||
@@ -98,0 +100,0 @@ html += '<td><br /></td>'; |
@@ -23,4 +23,4 @@ function extend(dest, source) { | ||
function getSelectionStart(doc) { | ||
var node = doc.getSelection().anchorNode, | ||
startNode = (node && node.nodeType === 3 ? node.parentNode : node); | ||
var node = doc.getSelection().anchorNode; | ||
var startNode = (node && node.nodeType === 3 ? node.parentNode : node); | ||
return startNode; | ||
@@ -52,4 +52,4 @@ } | ||
var parentNode = node.parentNode, | ||
tagName = parentNode.tagName.toLowerCase(); | ||
var parentNode = node.parentNode; | ||
var tagName = parentNode.tagName.toLowerCase(); | ||
@@ -56,0 +56,0 @@ while (tagName !== 'body') { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
47707
42
1041
15
Updatedmedium-editor@^4.6.0