diff --git a/src/frontend/components/Felleskomponenter/Sanity/TekstBlock.tsx b/src/frontend/components/Felleskomponenter/Sanity/TekstBlock.tsx index f30947ca4..10512a041 100644 --- a/src/frontend/components/Felleskomponenter/Sanity/TekstBlock.tsx +++ b/src/frontend/components/Felleskomponenter/Sanity/TekstBlock.tsx @@ -109,6 +109,10 @@ const TekstBlock: React.FC<{ ); }, }, + types: { + flettefelt: props => + flettefeltTilTekst(props.value.flettefelt, flettefelter, valgtLocale), + }, }} /> ) : null; diff --git a/src/frontend/utils/sanity.ts b/src/frontend/utils/sanity.ts index 54b872104..2723a03f0 100644 --- a/src/frontend/utils/sanity.ts +++ b/src/frontend/utils/sanity.ts @@ -129,6 +129,8 @@ export const plainTekstHof = ? pipe(node => node, ...transformedMarks)(child).text : pipe(node => node)(child).text; previousElementIsNonSpan = false; + } else if (child._type == 'flettefelt') { + tekst += flettefeltTilTekst(child.flettefelt, flettefelter, spesifikkLocale); } else { previousElementIsNonSpan = true; }