docs: adjust line breaks in code blocks (#6001)

This commit is contained in:
Tylan Davis
2024-05-01 15:57:39 -04:00
committed by GitHub
parent 43a17f67a0
commit 26ee91eb48
3 changed files with 9 additions and 10 deletions

View File

@@ -49,7 +49,8 @@ export default buildConfig({
{ {
label: 'Arabic', label: 'Arabic',
code: 'ar', code: 'ar',
// opt-in to setting default text-alignment on Input fields to rtl (right-to-left) when current locale is rtl // opt-in to setting default text-alignment on Input fields to rtl (right-to-left)
// when current locale is rtl
rtl: true, rtl: true,
}, },
], ],
@@ -134,13 +135,9 @@ to support localization, you need to specify each field that you would like to l
```js ```js
{ {
name: 'title', name: 'title',
type type: 'text',
: // highlight-start
'text', localized: true,
// highlight-start
localized
:
true,
// highlight-end // highlight-end
} }
``` ```

View File

@@ -20,7 +20,8 @@ The initial request made to Payload will begin a new transaction and attach it t
```ts ```ts
const afterChange: CollectionAfterChangeHook = async ({ req }) => { const afterChange: CollectionAfterChangeHook = async ({ req }) => {
// because req.transactionID is assigned from Payload and passed through, my-slug will only persist if the entire request is successful // because req.transactionID is assigned from Payload and passed through,
// my-slug will only persist if the entire request is successful
await req.payload.create({ await req.payload.create({
req, req,
collection: 'my-slug', collection: 'my-slug',

View File

@@ -196,7 +196,8 @@ const Pages: CollectionConfig = {
editor: lexicalEditor({ editor: lexicalEditor({
features: ({ defaultFeatures }) => [ features: ({ defaultFeatures }) => [
...defaultFeatures, ...defaultFeatures,
// The HTMLConverter Feature is the feature which manages the HTML serializers. If you do not pass any arguments to it, it will use the default serializers. // The HTMLConverter Feature is the feature which manages the HTML serializers.
// If you do not pass any arguments to it, it will use the default serializers.
HTMLConverterFeature({}), HTMLConverterFeature({}),
], ],
}), }),