Sometimes when you're working and you've built your content and word a perfectly normal way to build code, we're tries to be helpful. And include the exact font you're using exact spacing you're using and all this kind of crap that you really don't care about. You just want it to just have your content, maybe with the bolding, italics, and those sorts of things intact. So there's a couple ways you can go about fixing this. At one point, I got this kind of crazy text, I don't even know where to start with a lot of this. It's just weird.
One of the best things you can do is put it in a code editor. In this case, I've put it in here into code pen. They can use any color coding editor you want. And that actually gives you a lot of information or helps to really clarify what's going on. So now you can see that all of this is just from a span tag. And there's a bold, italics underlined section here for no reason, it seems there's a lot of weird stuff going on here.
So now that you can see the color coding, of course, you can just delete the span tag. And don't forget to delete the other span and or the closing span. And a lot of this content actually we don't even need, because it is just for this guy here is what's called a non breaking space. It's equivalent to just a space, but has the benefit of not breaking line. So sometimes it's used as a placeholder for things. But then we have space, and we can actually just delete this whole section here.
And there we go. Now we have just the code that we wanted, and not all the craziness. So that's one great way to do it. There are some content management systems that are better at removing this than others. Sometimes in Drupal, they will have a paste from Word that will remove a lot of that cruft that you don't want, while leaving the content that you do and the styling that you do another way to get rid of it. Is to paste it as plain text.
So copy the content into a plain text editor. That should generally remove all formatting, which is not always ideal. That's another way to do it. Also, if you have a copy of WordPress handy, WordPress tends to do a pretty good job of removing a lot of that cruft and excess code while leaving the stuff that you want to keep if you paste it into the visual editor, so that is another great way to get around it. Maybe if you are using WordPress on one side and Drupal another something, you can always paste it into WordPress, then copy from there and paste it to the other application or the other thing that you're doing. There's a lot of different ways to get around it.
But putting it in a code editor, that color codes is probably the best way to keep the content that you want and get rid of the stuff that you don't