Is there a way to remove the HTML blockquote tag, but keep the text? Basically, if in my code was <blockquote>Hello!</blockquote>
, I'd want it to display as Hello!
- I don't know if there's a way to filter the blockquotes out or just clone the text, but an answer would be quite helpful!
Is there a way to remove the HTML blockquote tag, but keep the text? Basically, if in my code was <blockquote>Hello!</blockquote>
, I'd want it to display as Hello!
- I don't know if there's a way to filter the blockquotes out or just clone the text, but an answer would be quite helpful!
- So you want to remove the HTML tag, and keep the text? – c0deNinja Commented Jul 3, 2012 at 22:28
2 Answers
Reset to default 11Use contents
with unwrap
:
$("blockquote").contents().unwrap();
You can use .html()
to achieve this
$("blockquote").html()
Check out this running example