Skip to content

Commit

Permalink
Fix Richtext: Show the value of the placeholder one time
Browse files Browse the repository at this point in the history
Fixes: AFORM-3948
  • Loading branch information
hungoptimizely committed Jan 29, 2024
1 parent aa6ba5e commit 5aaf299
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export const ParagraphTextElementBlock = (props: ParagraphTextElementBlockProps)
const friendlyName = form.formElements.find(fe => fe.key === element.elementKey)?.displayName

if (friendlyName && placeHolders.indexOf(friendlyName) !== -1) {
replacedText = replacedText.replace(`${indicator}${friendlyName}${indicator}`, getValueAsString(element))
replacedText = replacedText.replaceAll(`${indicator}${friendlyName}${indicator}`, getValueAsString(element))
}
});
}
Expand Down
2 changes: 1 addition & 1 deletion src/@episerver/forms-react/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"compilerOptions": {
"target": "es5",
"target": "es2021",
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"strict": true,
Expand Down

0 comments on commit 5aaf299

Please sign in to comment.