JSFiddle - React, Tailwind, and code Playground
HTML
<script src="https://raw.github.com/embedly/embedly-jquery/master/jquery.embedly.min.js"></script>
<div class="newscontainer">
<script src="http://feeds.feedburner.com/cnn/dHWG?format=sigpro" type="text/javascript" ></script>
</div>
CSS
img {
max-height: 100px;
width: 50px;
float:left;
padding: 5px;
}
.embed {
padding-bottom: 50px;
}
JavaScript
$('document').ready(function() {
$('div.newscontainer').embedly({
key: ':3eccf441bf0f43acbb076da9817af27d',
success: function(oembed, dict) {
var regex = /CNN/;
if (regex.exec(oembed.find('.embed a:first').text()) !== null && regex.exec($oembed.find('.provider').text()) !== null) {
element.remove();
}
}
});
$('.description').html(
function() {
return $.trim($(this).html()).substring(0, 100).split(" ").slice(0, -1).join(" ") + "...";
});
});