forked from cadey/xesite
frontend/Utils: oh god undo this
This commit is contained in:
parent
dc58e7dc5b
commit
7c4d531493
|
@ -1,13 +1,9 @@
|
||||||
// Module App.BlogEntry
|
// Module App.BlogEntry
|
||||||
|
|
||||||
function htmlDecode(value){
|
|
||||||
return $('<div/>').html(value).text();
|
|
||||||
}
|
|
||||||
|
|
||||||
exports.mdify = function(id) {
|
exports.mdify = function(id) {
|
||||||
var converter = new showdown.Converter()
|
var converter = new showdown.Converter()
|
||||||
elem = document.getElementById(id);
|
elem = document.getElementById(id);
|
||||||
md = elem.innerHTML;
|
md = elem.innerHTML;
|
||||||
elem.innerHTML = htmlDecode(converter.makeHtml(md));
|
elem.innerHTML = converter.makeHtml(md);
|
||||||
return "done :)";
|
return "done :)";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue