works!
This commit is contained in:
@@ -6,10 +6,12 @@ import type { JSONFieldClientComponent } from 'payload'
|
||||
import { buildEditorState, useRenderEditor_internal_ } from '@payloadcms/richtext-lexical/client'
|
||||
import React, { useEffect, useRef, useState } from 'react'
|
||||
|
||||
import { lexicalFullyFeaturedSlug } from '../../../lexical/slugs.js'
|
||||
|
||||
export const Component: JSONFieldClientComponent = (args) => {
|
||||
const { Component, renderLexical } = useRenderEditor_internal_({
|
||||
name: 'richText',
|
||||
editorTarget: 'default',
|
||||
editorTarget: `collection.${lexicalFullyFeaturedSlug}.richText`,
|
||||
})
|
||||
const mounted = useRef(false)
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ import { lexicalFullyFeaturedSlug } from '../../slugs.js'
|
||||
export const Component: JSONFieldClientComponent = (args) => {
|
||||
const { Component, renderLexical } = useRenderEditor_internal_({
|
||||
name: 'richText2',
|
||||
editorTarget: `collections.${lexicalFullyFeaturedSlug}.richText`,
|
||||
editorTarget: `collection.${lexicalFullyFeaturedSlug}.richText`,
|
||||
})
|
||||
const mounted = useRef(false)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user