pimcore / admin-ui-classic-bundle

Other
7 stars 93 forks source link

[Bug]: TinyMCE - Shared Translations - surrounding <p> Tag #655

Open ctippler opened 1 month ago

ctippler commented 1 month ago

Pimcore Version: 11.2.0

Steps to reproduce: The problem is, that TinyMCE adds a surrounding <p></p> Tag on translations where we don't want/need the<p>Tag.

1) Go to "Tools" > "Translations" > "Translations" 2) Add an Translation with an HTML Code in it "E.g" We want the following code as Translation This is <a href="{link}">a sample</a> sentence. 3) save/update the translation 4) Re edit the translation (now you are forced to use the TinyMCE Wysiwyg Editor) and change the text. Then update/save the translation. Now TinyMCE adds a surrounding "

..

" tag which we don't want.

As TinyMCE remove the option "forced_root_block" (https://github.com/tinymce/tinymce/discussions/7342) it seems there is no way around this issue.

So a solution would be to let the input field editable and display both buttons "Edit as HTML" and "Edit as Text". So the user can decide which Editor he wants.

Threfore we would just need to remove this part https://github.com/pimcore/admin-ui-classic-bundle/blob/1.x/public/js/pimcore/settings/translation.js#L622-L636

What do you think? Is this ok/ a reasonable way for you.

Regards, Christian

fashxp commented 3 weeks ago

Hmm, I can't think of a better solution either? Anyone else? Or could you provide a PR for that?

github-actions[bot] commented 3 days ago

Thanks a lot for reporting the issue. We did not consider the issue as "Pimcore:Priority", "Pimcore:ToDo" or "Pimcore:Backlog", so we're not going to work on that anytime soon. Please create a pull request to fix the issue if this is a bug report. We'll then review it as quickly as possible. If you're interested in contributing a feature, please contact us first here before creating a pull request. We'll then decide whether we'd accept it or not. Thanks for your understanding.