CanopyTax / bandicoot

React rich text editor
https://bandicoot.js.org
MIT License
54 stars 2 forks source link

Duplicate useTextAsImage missing attributes #76

Closed rhys-childs closed 4 years ago

rhys-childs commented 4 years ago

When using multiple of the same useTextAsImage on a page, any after the first do not get attributes (style="vertical-align: bottom;" and data-text-as-image="...") because only the first element with the matching image is modified.

This issue has a workaround of inserting each useTextAsImage backwards (or bottom of the document to the top) because the newly inserted image is then the first one found by the query selector.