Simplify text change handling, text trimming, editor definition and CSS

Also, removed inactive host styles and broken HTML import.