aecreations / clippings

Clippings: an extension for Mozilla Firefox
20 stars 4 forks source link

Refactor HTML insert to use the DOM Range API #436

Closed aecreations closed 9 months ago

aecreations commented 10 months ago

The content script that inserts an HTML-formatted clipping into a rich text editor uses document.execCommand("insertHTML"...), which is deprecated[1].

Refactor the code to use the DOM Range API: https://developer.mozilla.org/en-US/docs/Web/API/Range

-- [1] https://developer.mozilla.org/en-US/docs/Web/API/Document/execCommand

aecreations commented 10 months ago

Unfortunately, this improvement doesn't resolve the issue with pasting HTML-formatted clippings into rich text editors that use the CKEditor library (issue #379).