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).
23 lines
716 B
TypeScript
23 lines
716 B
TypeScript
import React from 'react'
|
|
|
|
export function CollectionsExplained() {
|
|
return (
|
|
<div>
|
|
<h1>Which collection should I use for my tests?</h1>
|
|
|
|
<p>
|
|
By default and as a rule of thumb: "Lexical Fully Featured". This collection has all our
|
|
features, but it does NOT have (and will never have):
|
|
</p>
|
|
<ul>
|
|
<li>Relationships or dependencies to other collections</li>
|
|
<li>Seeded documents</li>
|
|
<li>Features with custom props (except for a block and an inline block included)</li>
|
|
<li>Multiple richtext fields or other fields</li>
|
|
</ul>
|
|
|
|
<p>If you need any of these features, use another collection or create a new one.</p>
|
|
</div>
|
|
)
|
|
}
|