Hacker News new | ask | show | jobs
by sbr464 2769 days ago
Curious also about any gotchas, etc.
1 comments

Here is "DOM canibalizer" module from my HTML-NOTEPAD ( https://html-notepad.com ) :

https://github.com/c-smile/sciter-sdk/blob/master/notepad/re...

While it looks pretty simple it cleans MS Word and browser artifacts in pasted markup pretty well.

But I shall admit that such simplicity is possible only with sciter (that html-notepad is based on). E.g. that canonicalizeDOM gets called before the content appears in target document. So all this does not affect undo/redo stack, etc.