backdrop-contrib / tinymce

Integration for the TinyMCE editor in Backdrop CMS
https://backdropcms.org/project/tinymce
GNU General Public License v2.0
2 stars 1 forks source link

Convert line breaks into HTML not working for line breaks #14

Closed izmeez closed 1 year ago

izmeez commented 1 year ago

When using TinyMCE for editing and inserting a line break it fails by inserting <br> instead of <br /> with the resulting display showing nothing and viewing the source showing nothing.

indigoxela commented 1 year ago

@iszmeez nice catch, but the problem isn't, how Tiny inserts the line breaks, but that the tag <br> isn't in the allowlist for filter.

As a quick fix you can add it manually by editing the "Limit allowed HTML tags" of your filter on admin/config/content/formats/YOUR_FILTER.

In the next release I will also update the default profiles in next release and add "br" to the builder tool.

indigoxela commented 1 year ago

A pull request is available for testing. Note that it has to run a config update.

izmeez commented 1 year ago

Thanks. The PR fixes the problem and I did run the core/update.php before testing it. I did at first wonder if it was missing from the allowed tags but couldn't see that right away and when I saw the checkbox for "Convert line breaks into HTML" thought it might be something else. Thanks, this fixes it. Unfortunately, I do not think I have permissions to add labels, yet.

izmeez commented 1 year ago

Just an aside, I don't know why but it seems some applications use <br> as TinyMCE does and others use <br /> like Ckeditor does. I've never understood why the difference, maybe it's just historical?

indigoxela commented 1 year ago

@izmeez many thanks for testing and feedback. :+1:

Re ability to edit labels - ask in our Zulip chat to become member of the ... (hm, which team actually...). Someone there can help you.