Here is a screenshot I captured.
https://i.stack.imgur.com/VUGEg.png
This content resides inside my div. My goal is to replace "" with "-" and "" with "-" wherever they occur within the div, and then send this modified content via ajax using jQuery since storing it in the database as is would not work. I attempted to achieve this by:
var para = $('#list_id');
var drag_words_paragraph = para.html(para.html().replace(new RegExp("<div class="fancy" draggable="true">","</div>"),"-"));
Unfortunately, this code does not correctly replace all occurrences as intended. Can anyone assist me in resolving this issue?