Skip to content

Commit

Permalink
legg til støtte for ny flettefelt implementasjon
Browse files Browse the repository at this point in the history
  • Loading branch information
idaame committed Mar 12, 2024
1 parent 1fb1cbc commit f1944c6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,10 @@ const TekstBlock: React.FC<{
);
},
},
types: {
flettefelt: props =>
flettefeltTilTekst(props.value.flettefelt, flettefelter, valgtLocale),
},
}}
/>
) : null;
Expand Down
2 changes: 2 additions & 0 deletions src/frontend/utils/sanity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit f1944c6

Please sign in to comment.