feat: initial lexical support (#5206)
* chore: explores pattern for rscs in lexical * WORKING!!!!!! * fix(richtext-slate): field map path * Working Link Drawer * fix issues after merge * AlignFeature * Fix AlignFeature --------- Co-authored-by: James <james@trbl.design>
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { AlignFeature, LinkFeature, lexicalEditor } from '@payloadcms/richtext-lexical'
|
||||
import path from 'path'
|
||||
|
||||
import type { Config, SanitizedConfig } from '../packages/payload/src/config/types'
|
||||
@@ -5,7 +6,7 @@ import type { Config, SanitizedConfig } from '../packages/payload/src/config/typ
|
||||
import { mongooseAdapter } from '../packages/db-mongodb/src'
|
||||
import { postgresAdapter } from '../packages/db-postgres/src'
|
||||
import { buildConfig as buildPayloadConfig } from '../packages/payload/src/config/build'
|
||||
import { slateEditor } from '../packages/richtext-slate/src'
|
||||
//import { slateEditor } from '../packages/richtext-slate/src'
|
||||
|
||||
// process.env.PAYLOAD_DATABASE = 'postgres'
|
||||
|
||||
@@ -55,7 +56,7 @@ export function buildConfigWithDefaults(testConfig?: Partial<Config>): Promise<S
|
||||
const config: Config = {
|
||||
db: databaseAdapters[process.env.PAYLOAD_DATABASE || 'mongoose'],
|
||||
secret: 'TEST_SECRET',
|
||||
editor: slateEditor({
|
||||
/*editor: slateEditor({
|
||||
admin: {
|
||||
upload: {
|
||||
collections: {
|
||||
@@ -70,6 +71,9 @@ export function buildConfigWithDefaults(testConfig?: Partial<Config>): Promise<S
|
||||
},
|
||||
},
|
||||
},
|
||||
}),*/
|
||||
editor: lexicalEditor({
|
||||
features: [LinkFeature({}), AlignFeature()],
|
||||
}),
|
||||
rateLimit: {
|
||||
max: 9999999999,
|
||||
|
||||
Reference in New Issue
Block a user