Skip to content

Commit

Permalink
fix: add form block textContent into transofmers config (#793)
Browse files Browse the repository at this point in the history
* fix: add form block textContent into transofmers config

* fix: form block docs textContent link
  • Loading branch information
qradle-yndx authored Jan 31, 2024
1 parent b2ecf4a commit 3e5ae8e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/blocks/Form/__stories__/Form.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
12 changes: 12 additions & 0 deletions src/text-transform/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
],
};

0 comments on commit 3e5ae8e

Please sign in to comment.