Open DmitriyMaltsevTakeda opened 1 year ago
Same issue here!
Still reproducible
I took a look at this issue and here are my findings.
Any field types set in the plugin configuration will be processed here and turned into object with a single value
field. This field is defined here.
Clearly, there is no restriction imposed on the field types that can be defined in the plugin configuration, meaning it will also accept field types like markdown
. The issue arises when a custom type is redefined with custom components here and here.
Commenting out components
property on the previously mentioned lines fixes the issue, but then the functionality introduced by InternationalizedField would not be applied.
It is not entirely clear as to how this could be fixed, so I will let the maintainers take a closer look.
Hello! Any update on this? It would be great to have markdown fields working for this plugin
I'm using
https://www.sanity.io/plugins/sanity-plugin-markdown
for rendering Markdown inputs. To make them translatable, I addedfieldTypes: ['string', 'markdown']
to Sanity config.I'm assuming I have to use
internationalizedArrayMarkdown
astype
when I create schemas for translatable Markdown fields now, although I didn't find any examples in the docs for custom input types.I'm expecting to see a markdown input, but I still get a regular string input for
internationalizedArrayMarkdown
fields:So my question is: is it possible at all to render custom field types with this plugin? If yes, what could I be doing wrong?
Edit: I tried using
text
andinternationalizedArrayText
just to check that it's possible to render any input fields other than a regular string inputs, and it works, I'm getting a nice textarea. So this problem must be only for rendering custom fields.