Editing exported HTML is a wrong approach here. The right approach is inserting parts of code.
For example, if you want something you can't create directly in WD, you can write the code of that element or a script and place it within the code placeholder in WD.