Removing empty paragraph on rendering

We all have this kind of editor who love line break to add space between paragraph, you can add this small TS snipped to remove all the empty paragraphes:

prototype(TYPO3.Neos.NodeTypes:Text) {
    text.@process.cleanup = ${node.context.workspace.name == 'live' ? String.pregReplace(value, '#<p>(\s|&nbsp;|</?\s?br\s?/?>)*</?p>#', '') : value}
}
5 Likes

Greap tip! Maybe makes sense to move it to FAQ? https://discuss.neos.io/c/faq