SkyLundy / Fluency-Translation

A DeepL translation integration for the ProcessWire CMF/CMS platform
GNU General Public License v3.0
11 stars 1 forks source link

A bug translating RTE field with embedded images #9

Open ivangretsky opened 2 years ago

ivangretsky commented 2 years ago

Good day, @SkyLundy !

If I try to translate an RTE field with embedded images I get the image screwed up like this:

Before the tranlation <p><img alt="" class="align_center" src="/site/assets/files/82081/50609718431_0aa9b4af24_k.jpg" width="1200" /></p>

After the translation <p><span aria-label=" image widget" contenteditable="false" role="region" tabindex="-1">&lt;img alt="" data-cke-saved-src="/site/assets/files/82081/50609718431_0aa9b4af24_k.jpg" src="/site/assets/files/82081/50609718431_0aa9b4af24_k.jpg" width="1200" class="align_center cke_widget_element" data-cke-widget-data="{"hasCaption":false,"src":"/site/assets/files/82081/50609718431_0aa9b4af24_k.jpg","alt":"","width":"1200","height":"","lock":true,"align":"none","classes":{"align_center":1}}" data-cke-widget-upcasted="1" data-cke-widget-keep-attr="0" data-widget="image"&gt;<span style="background:url(&quot;https://www.onlineexpo.com/wire/modules/Inputfield/InputfieldCKEditor/ckeditor-4.18.0/plugins/widget/images/handle.png&quot;) rgba(220, 220, 220, 0.5); left:0px; top:-15px"><img draggable="true" height="15" role="presentation" src="data:image/gif;base64,R0lGODlhAQABAPABAP///wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw==" title="Click and drag to move" width="15" /></span><span title="Click and drag to resize"></span></span></p>

Please help!