简体   繁体   中英

How to remove specific HTML tags in Visual Studio

I need to copy/paste text from Microsoft Powerpoint to Visual studio 2010's aspx page. When I copy the text it copies several unwanted tags (like style tags, span, p tag etc.). How can I cleanup that copied text in Visual Studio? I have also installed Resharper, is it useful in removing unwanted tags? For example I want to remove all style tags from a document or want to remove all span tags. I want to cleanup/remove unwanted tags in a single command.

After you have already pasted the text, it will be pretty hard to automatically determine between unwanted and actual tags, perhaps a complicated Replace All with Regex would work. But there are ways to copy/paste pure text, look here: How to copy and paste code without rich text formatting? .

As of now, there is now easy way to remove specific HTML tags. I would suggest you to use find and replace feature of Notepad++ where you can easily write a regular expression to replace tags. Also, I would suggest you to use these links to clean up your HTML WordToHTML CleanHTML . I hope this helps you to resolve a part of your concern.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM