Skip to content
Snippets Groups Projects
Commit af9538f8 authored by Andy C's avatar Andy C
Browse files

Added solution to change b and i tags to strong and em

parent d5e2e9a7
No related branches found
No related tags found
No related merge requests found
function clean_up_html_tags(inputhtml) {
inputhtml = inputhtml.replace("<b>", "<strong>");
inputhtml = inputhtml.replace("</b>", "</strong>");
inputhtml = inputhtml.replace("<i>", "<em>");
inputhtml = inputhtml.replace("</i>", "</em>");
return inputhtml;
}
$(document).ready(function () {
document.execCommand("defaultParagraphSeparator", false, "p");
//Let's go!
......@@ -9,7 +17,9 @@ $(document).ready(function () {
});
$('#update-code').click(function(){
$('#output-pre').text($('#input-textarea').html());
let outputprehtml = $('#input-textarea').html();
$('#output-pre').text(clean_up_html_tags(outputprehtml));
});
var buttonList = [
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment