plone / plone.app.widgets

Integrating plone.widgets into plone
Other
7 stars 38 forks source link

tiny uses transformed text on archetypes richtextfields #145

Closed frisi closed 7 years ago

frisi commented 8 years ago

using tinymce4 from plone.app.widgets on archetypes textfields created without the package before will result in a not working image-dialog for existing images because tiny needs to parse uid and image scale out of a url like this:

<img alt="Image Title" class="image-left" src="image-test.jpg/@@images/f8f4827e-5407-4d3a-a171-445c3609f136.jpeg" title="Image Title" />

(see https://community.plone.org/t/images-inserted-with-plone4-broken-on-plone5/2722/5?u=frisi for a full explanation)

this of course, also breaks functions such as captioned images (where the output transforms <img class="captioned".../> into

<dl style="width:620px;" class="image-inline captioned">
<dt><a rel="lightbox" href="/path/to/image.jpg"><img src="image.jpg/@@images/c89b9bf7-b3b9-4eed-828c-6e6bc0ffbbbe.jpeg" alt="title" title="title" height="413" width="620" /></a></dt>
 <dd class="image-caption" style="width:620px;">image description text</dd>

in addition, saving this text after opening it will break the image dialog forever and add lots of unwanted code to the raw textfield

frisi commented 8 years ago

@pcdummy will soon add a pr for this

fredvd commented 7 years ago

@frisi @thet this issue can be closed then, right?

frisi commented 7 years ago

yes i guess so. thanks for your nudge fred ;-)