Update WYSIWYG via JavaScript API


Matrix Version:
Our website has multiple broken links in the WYSIWYG HTML content. Manually fixing all of them seems impractical.

I can see the HTML content via this call:
js_api.getGeneral({“asset_id”:“xxx_id_num”, “get_attributes”:true, “dataCallback”:e=>(console.log(e.html))});
Let’s say it returns the following html code:
‘’’< a href=“http://404page.html”> Link < /a >’’’
My question is, which JS API allows me to update the WYSIWYG HTML to fix these broken links?