Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inline Images #274

Closed
dimitri-koenig opened this issue Mar 14, 2024 · 11 comments · Fixed by #276
Closed

Inline Images #274

dimitri-koenig opened this issue Mar 14, 2024 · 11 comments · Fixed by #276

Comments

@dimitri-koenig
Copy link
Contributor

dimitri-koenig commented Mar 14, 2024

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?

@CybotTM
Copy link
Member

CybotTM commented Mar 15, 2024

Hi @dimitri-koenig,

what's your extension and TYPO3 version?

@dimitri-koenig
Copy link
Contributor Author

dimitri-koenig commented Mar 15, 2024

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
Copy link
Contributor Author

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

@wwenzel
Copy link

wwenzel commented Apr 24, 2024

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.

@dimitri-koenig
Copy link
Contributor Author

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.

@wwenzel
Copy link

wwenzel commented Apr 24, 2024

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
Copy link

wwenzel commented Apr 25, 2024

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.

@dimitri-koenig
Copy link
Contributor Author

dimitri-koenig commented Apr 25, 2024

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

@wwenzel
Copy link

wwenzel commented Apr 25, 2024

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

@lucmuller
Copy link

Up ! +1 on this topic !

@Gitsko
Copy link
Contributor

Gitsko commented May 22, 2024

Sry for the delay.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants