Create a new entity from selection in draft.js / /Draftail, wrap existing text and link entities
问题 I'm trying to create a new entity for Wagtail 's Draftail text editor (based on draft.js ). I've started off with the example here: http://docs.wagtail.io/en/v2.5.1/advanced_topics/customisation/extending_draftail.html#creating-new-entities I have the extension working as a proof of concept, in that it will take a selection and wrap it in a footnote entity. However, I need to be able to preserve existing link entities, so that they become children of the new footnote entities. I've tried