Open memeplex opened 10 years ago
The right way to do this
document.body.replaceChild(newNode, markdownEl);
is
markdownEl.parentNode.replaceChild(newNode, markdownEl);
otherwise some browsers get confused in some sites (try, for example, to put strapdown inside blogspot, it won't work but the second line fixes the issue)
+1 on this.
It would allow to use Strapdown on something else than bare-bones html. Right now
The right way to do this
document.body.replaceChild(newNode, markdownEl);
is
markdownEl.parentNode.replaceChild(newNode, markdownEl);
otherwise some browsers get confused in some sites (try, for example, to put strapdown inside blogspot, it won't work but the second line fixes the issue)