Fixes #11628 PR #6389 caused bug #11628, which is a regression, as it had already been fixed in #4441 It is likely that some things have changed because [Lexical had recently made improvements](https://github.com/facebook/lexical/pull/7046) to address selection normalization. Although it wasn't necessary to resolve the issue, I added a `NormalizeSelectionPlugin` to the editor, which makes selection handling in the editor more robust. I'm also adding a new collection to the Lexical test suite, intending it to be used by default for most tests going forward. I've left an explanatory comment on the dashboard. ___ Looking at #11628's video, it seems users also want to be able to prevent the first paragraph from being empty. This makes sense to me, so I think in another PR we could add a button at the top, just [like we did at the bottom of the editor](https://github.com/payloadcms/payload/pull/10530).
26 lines
854 B
TypeScript
26 lines
854 B
TypeScript
export const usersSlug = 'users'
|
|
|
|
export const lexicalFullyFeaturedSlug = 'lexical-fully-featured'
|
|
export const lexicalFieldsSlug = 'lexical-fields'
|
|
export const lexicalLocalizedFieldsSlug = 'lexical-localized-fields'
|
|
export const lexicalMigrateFieldsSlug = 'lexical-migrate-fields'
|
|
export const lexicalRelationshipFieldsSlug = 'lexical-relationship-fields'
|
|
export const lexicalAccessControlSlug = 'lexical-access-control'
|
|
export const richTextFieldsSlug = 'rich-text-fields'
|
|
|
|
// Auxiliary slugs
|
|
export const textFieldsSlug = 'text-fields'
|
|
export const uploadsSlug = 'uploads'
|
|
export const arrayFieldsSlug = 'array-fields'
|
|
|
|
export const collectionSlugs = [
|
|
lexicalFieldsSlug,
|
|
lexicalLocalizedFieldsSlug,
|
|
lexicalMigrateFieldsSlug,
|
|
lexicalRelationshipFieldsSlug,
|
|
lexicalAccessControlSlug,
|
|
richTextFieldsSlug,
|
|
textFieldsSlug,
|
|
uploadsSlug,
|
|
]
|