last-draft-js-plugins
Version:
Last Draft draft-js-plugins
16 lines (12 loc) • 388 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
var _draftJs = require('draft-js');
function linkStrategy(contentBlock, cb) {
contentBlock.findEntityRanges(function (character) {
var entityKey = character.getEntity();
return entityKey !== null && _draftJs.Entity.get(entityKey).getType() === 'LINK';
}, cb);
}
exports.default = linkStrategy;