Closed hfkhrni closed 22 hours ago
I tested with arrays, blocks and normal fields and I can't reproduce this. Can you share your problematic config please?
my payload UI is in english, the problem is when you write inside the text area in arabic
payload.config.ts
export default buildConfig({
admin: {
user: Users.slug,
importMap: {
baseDir: path.resolve(dirname),
},
},
collections: [Users, Media, Pages, Categories],
localization: {
locales: [
{
label: 'English',
code: 'en',
},
{
label: 'Arabic',
code: 'ar',
// opt-in to setting default text-alignment on Input fields to rtl (right-to-left)
// when current locale is rtl
rtl: true,
},
],
defaultLocale: 'en',
// fallback: true,
},
editor: lexicalEditor(),
secret: process.env.PAYLOAD_SECRET || '',
typescript: {
outputFile: path.resolve(dirname, 'payload-types.ts'),
},
db: mongooseAdapter({
url: process.env.DATABASE_URI || '',
}),
sharp,
cors: ['http://localhost:3000'],
csrf: ['http://localhost:3000'],
plugins: [
s3Storage({
collections: {
[Media.slug]: true,
},
bucket: process.env.S3_BUCKET || '',
config: {
endpoint: process.env.S3_ENDPOINT || '',
credentials: {
accessKeyId: process.env.S3_ACCESS_KEY_ID || '',
secretAccessKey: process.env.S3_SECRET_ACCESS_KEY || '',
},
region: process.env.S3_REGION || '',
},
}),
],
})
collection.ts
{
name: 'layout',
labels: {
singular: 'block',
plural: 'blocks',
},
type: 'blocks',
blocks: [Paragraph, Heading],
}
parapgraph.ts
import { Block } from 'payload'
export const Paragraph: Block = {
slug: 'paragraph',
fields: [
{
name: 'paragraph',
type: 'textarea',
localized: true,
},
],
}
heading.ts
import { Block } from 'payload'
export const Heading: Block = {
slug: 'heading',
fields: [
{
name: 'heading',
type: 'text',
localized: true,
},
],
}
text is working correctly and textarea is not
here's Arabic text you can test with
يولد جميع الناس أحرارًا متساوين في الكرامة والحقوق. وقد وهبوا عقلاً وضميرًا وعليهم أن يعامل بعضهم بعضًا بروح الإخاء.
كل الناس سواسية أمام القانون ولهم الحق في التمتع بحماية متكافئة عنه دون أية تفرقة، كما أن لهم جميعاً الحق في حماية متساوية ضد أي تمييز يُخل بهذا الإعلان وضد أي تحريض على تمييز كهذا.
sorry, closed the issue by mistake
Thanks this will be fixed in https://github.com/payloadcms/payload/pull/8474
Link to reproduction
No response
Environment Info
Describe the Bug
Wrong direction in textarea on localized rtl text, screenshot attached shows the difference between text and textarea, it should be like textarea
Reproduction Steps
same beta version in env info, put a textarea field in a collection then write inside it in an rtl language
Adapters and Plugins
No response