Refactoring web content editor (HTML5/Angular/TypeScript)