mobiledoc-kit
Advanced tools
Comparing version 0.10.2 to 0.10.3
@@ -51,4 +51,2 @@ 'use strict'; | ||
var _utilsDeprecate = require('../utils/deprecate'); | ||
var _editorMutationHandler = require('../editor/mutation-handler'); | ||
@@ -537,2 +535,3 @@ | ||
* @type {Markup[]} | ||
* @public | ||
*/ | ||
@@ -545,16 +544,15 @@ }, { | ||
* @return {boolean} | ||
* @deprecated after v0.10.1 | ||
*/ | ||
value: function hasActiveMarkup(markup) { | ||
(0, _utilsDeprecate['default'])('editor#hasActiveMarkup is deprecated. Use editor#activeMarkups instead'); | ||
var matchesFn = undefined; | ||
if (typeof markup === 'string') { | ||
markup = markup.toLowerCase(); | ||
matchesFn = function (_markup) { | ||
return _markup.tagName === markup; | ||
}; | ||
(function () { | ||
var tagName = (0, _utilsDomUtils.normalizeTagName)(markup); | ||
matchesFn = function (m) { | ||
return m.tagName === tagName; | ||
}; | ||
})(); | ||
} else { | ||
matchesFn = function (_markup) { | ||
return _markup === markup; | ||
matchesFn = function (m) { | ||
return m === markup; | ||
}; | ||
@@ -565,4 +563,2 @@ } | ||
} | ||
}, { | ||
key: 'serialize', | ||
@@ -574,2 +570,4 @@ /** | ||
*/ | ||
}, { | ||
key: 'serialize', | ||
value: function serialize() { | ||
@@ -1258,8 +1256,2 @@ var version = arguments.length <= 0 || arguments[0] === undefined ? _renderersMobiledoc.MOBILEDOC_VERSION : arguments[0]; | ||
} | ||
}, { | ||
key: 'markupsInSelection', | ||
get: function get() { | ||
// FIXME deprecate this | ||
return this.activeMarkups; | ||
} | ||
}]); | ||
@@ -1266,0 +1258,0 @@ |
'use strict'; | ||
exports['default'] = '0.10.2'; | ||
exports['default'] = '0.10.3'; |
{ | ||
"name": "mobiledoc-kit", | ||
"version": "0.10.2", | ||
"version": "0.10.3", | ||
"description": "A toolkit for building WYSIWYG editors with Mobiledoc", | ||
@@ -5,0 +5,0 @@ "repository": "https://github.com/bustlelabs/mobiledoc-kit", |
@@ -13,3 +13,3 @@ import Tooltip from '../views/tooltip'; | ||
import { mergeWithOptions } from '../utils/merge'; | ||
import { clearChildNodes, addClassName } from '../utils/dom-utils'; | ||
import { normalizeTagName, clearChildNodes, addClassName } from '../utils/dom-utils'; | ||
import { forEach, filter, contains, values } from '../utils/array-utils'; | ||
@@ -28,3 +28,2 @@ import { setData } from '../utils/element-utils'; | ||
import assert from '../utils/assert'; | ||
import deprecate from '../utils/deprecate'; | ||
import MutationHandler from 'mobiledoc-kit/editor/mutation-handler'; | ||
@@ -478,2 +477,3 @@ import EditHistory from 'mobiledoc-kit/editor/edit-history'; | ||
* @type {Markup[]} | ||
* @public | ||
*/ | ||
@@ -487,13 +487,10 @@ get activeMarkups() { | ||
* @return {boolean} | ||
* @deprecated after v0.10.1 | ||
*/ | ||
hasActiveMarkup(markup) { | ||
deprecate(`editor#hasActiveMarkup is deprecated. Use editor#activeMarkups instead`); | ||
let matchesFn; | ||
if (typeof markup === 'string') { | ||
markup = markup.toLowerCase(); | ||
matchesFn = (_markup) => _markup.tagName === markup; | ||
let tagName = normalizeTagName(markup); | ||
matchesFn = (m) => m.tagName === tagName; | ||
} else { | ||
matchesFn = (_markup) => _markup === markup; | ||
matchesFn = (m) => m === markup; | ||
} | ||
@@ -504,7 +501,2 @@ | ||
get markupsInSelection() { | ||
// FIXME deprecate this | ||
return this.activeMarkups; | ||
} | ||
/** | ||
@@ -511,0 +503,0 @@ * @param {String} version The mobiledoc version to serialize to. |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
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
3049965
43816