19

Clean Google Doc Cut/Paste into WordPress Editor

If you cut/paste from a Google Doc into the WordPress WYSIWYG editor you get more than I want. Mainly a bunch of inline CSS that sets the font weight (see below). This is a pain because it’s going to take priority in CSS land and undoing it by hand is a hassle. Some internet wandering led me to Jonathan Nicol’s fix for some span elements and bit of adjustment allowed me to also deal with the inline CSS elements. The extra nice aspect of this as a fix is that it only applies on paste actions so you can still write the stuff in the HTML editor if you want.