From 3e5ae8eac4dbd19341091aeb89607f2b2093f8f9 Mon Sep 17 00:00:00 2001 From: Sergey <148218517+qradle-yndx@users.noreply.github.com> Date: Wed, 31 Jan 2024 19:57:43 +0300 Subject: [PATCH] fix: add form block textContent into transofmers config (#793) * fix: add form block textContent into transofmers config * fix: form block docs textContent link --- src/blocks/Form/__stories__/Form.mdx | 2 +- src/text-transform/config.ts | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/blocks/Form/__stories__/Form.mdx b/src/blocks/Form/__stories__/Form.mdx index 35ee34a7d..1d42ae712 100644 --- a/src/blocks/Form/__stories__/Form.mdx +++ b/src/blocks/Form/__stories__/Form.mdx @@ -11,7 +11,7 @@ import * as FormBlockStories from './Form.stories.tsx'; `title?: string` - Title. -`textContent?` - See the [Content](?path=/story/components-content--default&viewMode=docs) component. +`textContent?` - See the [Content](?path=/story/components-content--docs&viewMode=docs) component. `formData: {yandex?: Object, hubspot?: Object}` - See [Yandex](?path=/story/components-yandexform--docs&viewMode=docs) / [Hubspot](?path=/story/components-hubspotform--docs&viewMode=docs) form data. diff --git a/src/text-transform/config.ts b/src/text-transform/config.ts index ff57aecc8..0c90049cf 100644 --- a/src/text-transform/config.ts +++ b/src/text-transform/config.ts @@ -380,4 +380,16 @@ export const config: BlocksConfig = { parser: createItemsParser(['text']), }, ], + [BlockType.FormBlock]: [ + { + fields: ['textContent'], + transformer: yfmTransformer, + parser: parseContentLayout, + }, + { + fields: ['textContent'], + transformer: typografTransformer, + parser: parseContentLayoutTitle, + }, + ], };