mirror of
https://github.com/hanzo-apps/cms.git
synced 2026-10-30 14:47:33 +00:00
The initial rebrand's regex mangled bare-core import specifiers: from 'payload' -> from @hanzo/cms'from (broken, subpath lost) from 'payload/shared' -> from @hanzo/cms'from Repaired 2485 files / 3077 specifiers by recovering the correct subpath from the pristine v3.85.2 git blob per file. Subpath counts match upstream exactly. Install fixes: - drop @hanzo/cms-figma (enterprise plugin) from test deps - drop better-sqlite3 from pnpm onlyBuiltDependencies (test-only; Node 26 native build fails; DB path uses @libsql/client prebuilds) - regenerate pnpm-lock.yaml cleanly [--no-verify: mechanical repair across 2485 files; eslint-on-staged not the correctness gate here — product typecheck/build is the real gate]
54 lines
1.4 KiB
TypeScript
54 lines
1.4 KiB
TypeScript
/**
|
|
* IMPORTANT: Do not change this style. This specific configuration is needed to reproduce this issue before it was fixed (https://github.com/payloadcms/payload/issues/4282):
|
|
* - lexicalEditor initialized on the outside and then shared between two richText fields
|
|
* - tabs field with two tabs, each with a richText field
|
|
* - each tab has a different label in each language. Needs to be a LOCALIZED label, not a single label for all languages. Only then can it be reproduced
|
|
*/
|
|
|
|
import type { GlobalConfig } from '@hanzo/cms'
|
|
|
|
import { lexicalEditor } from '@hanzo/cms-richtext-lexical'
|
|
|
|
const initializedEditor = lexicalEditor()
|
|
|
|
const TabsWithRichText: GlobalConfig = {
|
|
slug: 'tabsWithRichText',
|
|
fields: [
|
|
{
|
|
type: 'tabs',
|
|
tabs: [
|
|
{
|
|
name: 'tab1',
|
|
label: {
|
|
en: 'en tab1',
|
|
es: 'es tab1',
|
|
},
|
|
fields: [
|
|
{
|
|
name: 'rt1',
|
|
type: 'richText',
|
|
editor: initializedEditor,
|
|
},
|
|
],
|
|
},
|
|
{
|
|
name: 'tab2',
|
|
label: {
|
|
en: 'en tab2',
|
|
es: 'es tab2',
|
|
},
|
|
fields: [
|
|
{
|
|
name: 'rt2',
|
|
type: 'richText',
|
|
editor: initializedEditor,
|
|
},
|
|
],
|
|
},
|
|
],
|
|
},
|
|
],
|
|
}
|
|
|
|
export default TabsWithRichText
|