In IDEA I can select a block of html and press ctrl+alt+t to surround that with a tag. I am trying to find the option/keymapping to do the opposite... I want to select a block of html and remove the outermost surrounding tag. Here's an example:
<div id="one">
<div id="two">Hello</div>
</div>
If I select the #one div in the editor I should be able to have it removed, leaving only this:
<div id="two">Hello</div>
Any way to have IDEA do this for me?
For HTML tags, you can press Alt+Enter and select Remove tag instead of removing an opening tag and then a closing tag.
The HTML tags can be removed from a given string by using replaceAll() method of String class. We can remove the HTML tags from a given string by using a regular expression. After removing the HTML tags from a string, it will return a string as normal text.
Code | Unwrap/Remove... Ctrl+Shift+Delete
(Cmd+Shift+fn+Backspace on Mac)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With