t3x-rte_ckeditor_image icon indicating copy to clipboard operation
t3x-rte_ckeditor_image copied to clipboard

Inline Images

Open dimitri-koenig opened this issue 1 year ago • 9 comments

Hi guys

I have a case where images should be placed within a paragraph. But that does not work. Even raw bodytext data like <p>... <img... />...</p> is transformed to <p>...</p><img... /><p>...</p> in the RTE and in the frontend to <p>...</p> <p><img... /></p> <p>...</p>

Any idea on how to change that? Is that a config issue or a bug?

dimitri-koenig avatar Mar 14 '24 14:03 dimitri-koenig

Hi @dimitri-koenig,

what's your extension and TYPO3 version?

CybotTM avatar Mar 15 '24 05:03 CybotTM

Extension Version is 12.0.1 TYPO3 Version is 12.4.12

If I don't include the javascript file typo3image.js, the additional tags won't be added. So there is some issue in the plugin js file.

dimitri-koenig avatar Mar 15 '24 07:03 dimitri-koenig

I found a possible solution: Change add $block to allowIn config in typo3image.js:430 Now i need to check some other contents to see wether it really fits every case

dimitri-koenig avatar Mar 15 '24 12:03 dimitri-koenig

I don't understand this solution proposal. I have made this discribed change in typo3image.js:430 but there is no affect visible. When i add an image inside the RTE, the exisiting paragaph is still split into two paragraphs and the new img tag is added outside.

Is any further change necessary?

Any help or hint is welcome.

Thanks.

wwenzel avatar Apr 24 '24 14:04 wwenzel

With this change the inline image is not placed within its own p tag but inside the same block as the rest of the text. If you don't see any visible changes then you probably have set images as block via css rather than inline-block.

dimitri-koenig avatar Apr 24 '24 14:04 dimitri-koenig

Hm, with no "visible changes" i meant, no changes in the resulting source code, neither in the RTE nor in the rendered frontend page. It is still like <p>... <img... />...</p> is transformed to <p>...</p><img... /><p>...</p> in the RTE and in the frontend to <p>...</p> <p class="image"><img... /></p> <p>...</p>

wwenzel avatar Apr 24 '24 14:04 wwenzel

The reason why it doesn't work for me was the usage of the old version of TYPO3 V12.4.9. With the update to V12.4.14 this bugfix in typo3image.js:430 works fine for me, too.

I'm sorry for this confusion.

wwenzel avatar Apr 25 '24 09:04 wwenzel

Nice, so that means you can merge this fix in #276? 👍

dimitri-koenig avatar Apr 25 '24 12:04 dimitri-koenig

Sorry, but i think i've not enough rights to do this job.in #276

wwenzel avatar Apr 25 '24 12:04 wwenzel

Up ! +1 on this topic !

lucmuller avatar May 21 '24 13:05 lucmuller

Sry for the delay.

Gitsko avatar May 22 '24 11:05 Gitsko