I'm using this code to fetch the article, but it contain only snipets of text:
$.ajax({
url: "https://en.wikipedia.org/w/api.php?",
data: {
action: 'query',
list: 'search',
srsearch: "Richard Stallman",
format: 'json'
},
dataType: 'jsonp',
success: function(data){
var datatp = '';
data.query.search.map(function(f) {
datatp += '<h3>' + f.title + '</h3>';
datatp += f.snippet;
});
resultDiv.html(datatp);
}
});
I found this question: How to get Wikipedia content using Wikipedia's API? but it show how to fetch first paragraph of the article in wiki markup. How can I fetch full article as text? I can live with wiki content I can figure out how to remove it from the text. JSFIDDLE