chore: rename editors
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import path from 'path'
|
||||
|
||||
import { mapAsync } from '../../packages/payload/src/utilities/mapAsync'
|
||||
import { createSlate } from '../../packages/richtext-slate/src'
|
||||
import { slateEditor } from '../../packages/richtext-slate/src'
|
||||
import { buildConfigWithDefaults } from '../buildConfigWithDefaults'
|
||||
import { devUser } from '../credentials'
|
||||
import AfterDashboard from './components/AfterDashboard'
|
||||
@@ -121,7 +121,7 @@ export default buildConfigWithDefaults({
|
||||
{
|
||||
name: 'richText',
|
||||
type: 'richText',
|
||||
editor: createSlate({
|
||||
editor: slateEditor({
|
||||
admin: {
|
||||
elements: ['relationship'],
|
||||
},
|
||||
|
||||
@@ -7,7 +7,7 @@ import { webpackBundler } from '../packages/bundler-webpack/src'
|
||||
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 { createSlate } from '../packages/richtext-slate/src'
|
||||
import { slateEditor } from '../packages/richtext-slate/src'
|
||||
|
||||
// process.env.PAYLOAD_DATABASE = 'postgres'
|
||||
|
||||
@@ -32,7 +32,7 @@ export function buildConfigWithDefaults(testConfig?: Partial<Config>): Promise<S
|
||||
const [name] = process.argv.slice(2)
|
||||
|
||||
const config: Config = {
|
||||
editor: createSlate({}),
|
||||
editor: slateEditor({}),
|
||||
telemetry: false,
|
||||
rateLimit: {
|
||||
window: 15 * 60 * 100, // 15min default,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { Block } from '../../../../packages/payload/src/fields/config/types'
|
||||
|
||||
import { createLexical } from '../../../../packages/richtext-lexical/src'
|
||||
import { lexicalEditor } from '../../../../packages/richtext-lexical/src'
|
||||
|
||||
export const TextBlock: Block = {
|
||||
fields: [
|
||||
@@ -24,7 +24,7 @@ export const UploadAndRichTextBlock: Block = {
|
||||
{
|
||||
name: 'richText',
|
||||
type: 'richText',
|
||||
editor: createLexical({}),
|
||||
editor: lexicalEditor({}),
|
||||
},
|
||||
],
|
||||
slug: 'uploadAndRichText',
|
||||
|
||||
@@ -5,9 +5,9 @@ import {
|
||||
LinkFeature,
|
||||
TreeviewFeature,
|
||||
UploadFeature,
|
||||
createLexical,
|
||||
lexicalEditor,
|
||||
} from '../../../../packages/richtext-lexical/src'
|
||||
import { createSlate } from '../../../../packages/richtext-slate/src'
|
||||
import { slateEditor } from '../../../../packages/richtext-slate/src'
|
||||
import { TextBlock, UploadAndRichTextBlock } from './blocks'
|
||||
import { loremIpsum } from './loremIpsum'
|
||||
|
||||
@@ -28,7 +28,7 @@ const RichTextFields: CollectionConfig = {
|
||||
{
|
||||
name: 'richTextLexicalCustomFields',
|
||||
type: 'richText',
|
||||
editor: createLexical({
|
||||
editor: lexicalEditor({
|
||||
userConfig(defaultEditorConfig) {
|
||||
defaultEditorConfig.features.push(TreeviewFeature())
|
||||
defaultEditorConfig.features.push(
|
||||
@@ -57,7 +57,7 @@ const RichTextFields: CollectionConfig = {
|
||||
{
|
||||
name: 'caption',
|
||||
type: 'richText',
|
||||
editor: createLexical({}),
|
||||
editor: lexicalEditor({}),
|
||||
},
|
||||
],
|
||||
},
|
||||
@@ -77,7 +77,7 @@ const RichTextFields: CollectionConfig = {
|
||||
{
|
||||
name: 'richTextLexical',
|
||||
type: 'richText',
|
||||
editor: createLexical({
|
||||
editor: lexicalEditor({
|
||||
userConfig(defaultEditorConfig) {
|
||||
defaultEditorConfig.features.push(TreeviewFeature())
|
||||
return defaultEditorConfig
|
||||
@@ -122,7 +122,7 @@ const RichTextFields: CollectionConfig = {
|
||||
{
|
||||
name: 'richText',
|
||||
type: 'richText',
|
||||
editor: createSlate({
|
||||
editor: slateEditor({
|
||||
admin: {
|
||||
elements: [
|
||||
'h1',
|
||||
@@ -173,7 +173,7 @@ const RichTextFields: CollectionConfig = {
|
||||
{
|
||||
name: 'richTextCustomFields',
|
||||
type: 'richText',
|
||||
editor: createSlate({
|
||||
editor: slateEditor({
|
||||
admin: {
|
||||
elements: [
|
||||
'h1',
|
||||
@@ -222,7 +222,7 @@ const RichTextFields: CollectionConfig = {
|
||||
admin: {
|
||||
readOnly: true,
|
||||
},
|
||||
editor: createSlate({
|
||||
editor: slateEditor({
|
||||
admin: {
|
||||
elements: [
|
||||
'h1',
|
||||
|
||||
Reference in New Issue
Block a user