Bug #98933
closed<figure> does not render correctly in frontend when a table is created in rte editor
100%
Description
On inserting a table in backend's rte editor, there is wrapping a <figure>-tag around it. By rendering this in the frontend with fluid_styled_content (with f:format.raw), the figure tag is rendered with escaped signs (e.g. < and >). Additional, on every save in backend, there is inserted a new line below the <figure>-tag.
I fixed the inserting new line every save in backend on adding the "figure"-tag on TYPO3\CMS\Core\Html\RteHtmlParser to the $blockElementList variable:
protected $blockElementList = 'DIV,TABLE,BLOCKQUOTE,PRE,UL,OL,H1,H2,H3,H4,H5,H6,ADDRESS,DL,DD,HEADER,SECTION,FOOTER,NAV,ARTICLE,ASIDE, FIGURE';
For correct rendering in frontend, i added the <figure>-tag to the allowed tags in typoscript:
lib.parseFunc_RTE.allowTags:=addToList(figure) lib.parseFunc_RTE.externalBlocks:=addToList(figure) lib.parseFunc_RTE.externalBlocks.figure.stripNL = 1
Updated by Urs Maag almost 2 years ago
- Subject changed from <figure> does not render correctly in frontend when a table is crated in rte editor to <figure> does not render correctly in frontend when a table is created in rte editor
Updated by Benni Mack over 1 year ago
- Related to Bug #99273: Additional new <p> tag in case of <figure> tag added
Updated by Gerrit Code Review over 1 year ago
- Status changed from New to Under Review
Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/78646
Updated by Benni Mack over 1 year ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 4ea5e52861b20f063b5e58c1751fcd2d01223256.