Prosemirror wysiwyg editor Math equation view issue
Hi I am using Prosemirror wysiwyg editor for handling Some Math type equation related,I integrated an react-mathquill for adding and edit an math equation using threw some custom modal, I am handle the equation add threw If MathAdd modal if add it’s reflect in the editor ,if user want to edit the same formula again when double click that formula same popup will open user can edit and update it, The problem in when user the update the formula is not updating ,in that they adding like new formula, I need to update existing one only not need to add new one, I am trying fix but some thing i will missing, Can some please review code and will give any suggestion , It’s helpful for me, I will attached working demo code with sandbox link