This sounds a bit odd, but the problem can be provoked by dragging only a portion of the short code:

Now do:
- Drag and drop the selected text below "Test text" (no visual feedback because we do not use the handle)
Source before drag and drop:
<h2>insert_view_adv</h2>
<p>{"inserted_view_adv":"h4c_group_content_embeds=block_faq","arguments":[""]}</p>
<p>Test text</p>
Source after drag and drop:
<h2><img src="data:image/gif;base64,R0lGODlhAQABAPABAP///wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw==" /><span style="background:rgba(220, 220, 220, 0.5) url("http://275-iva.site-h4c-dev.mbm.wod.by/core/assets/vendor/ckeditor/plugins/widget/images/handle.png") repeat scroll 0% 0%; display:block; left:0px; top:-15px"><img height="15" role="presentation" src="data:image/gif;base64,R0lGODlhAQABAPABAP///wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw==" title="Click and drag to move" width="15" /></span></h2>
<p>Test text</p>
<h2>insert_view_adv</h2>
<p>{"inserted_view_adv":"h4c_group_content_embeds=block_faq","arguments":[""]}</p>
Generally this is only possible when we select text and the shortcode. Only selecting the shortcode does not allow to drag and drop except for when the handle is used. In entity_embed I could provoke similar behavior but then the entity was duplicated which is also not nice, but not as bad as creating a new random image either.
| Comment | File | Size | Author |
|---|---|---|---|
| adv-drag-and-drop.png | 16.83 KB | anruether |
Comments
Comment #2
anruetherComment #3
anruetherSome more testing. This drag and drop works (select the full shortcode row including handle):
Select only the shortcode text (which also does not select the handle). This leads to the handle left as base64 image in the original place.
So we literally forget to copy the handle. Which might be an effect of the upstream issue I filed: #3082750: Drag and drop of media and text duplicates embedded media
Comment #4
a.dmitriiev commentedPlease check this comment here https://www.drupal.org/project/insert_view_adv/issues/3100923#comment-14...