1
0
Fork 0

feat(lab): Paperless and render settings

This commit is contained in:
Joost De Cock 2022-01-28 13:39:07 +01:00
parent 21d1d15e53
commit 18f9e93cc0
9 changed files with 269 additions and 55 deletions

View file

@ -1,6 +1,6 @@
const TextOnPath = (props) => {
const text = []
// Handle translation
// Handle translation (and spaces)
let translated = ''
for (let string of props.path.attributes.getAsArray('data-text')) {
translated += props.app.t(string, false, props.locale).replace(/"/g, '"') + ' '
@ -16,7 +16,10 @@ const TextOnPath = (props) => {
return (
<text>
<textPath {...textPathProps}>
<tspan {...props.path.attributes.asPropsIfPrefixIs('data-text-')}>{translated}</tspan>
<tspan
{...props.path.attributes.asPropsIfPrefixIs('data-text-')}
dangerouslySetInnerHTML={{__html: translated}}
/>
</textPath>
</text>
)