This commit is contained in:
Alessio Gravili
2025-09-01 22:24:37 -07:00
parent 4b9a5ae7c2
commit 5f7331cbe4
6 changed files with 53 additions and 55 deletions

View File

@@ -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)

View File

@@ -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)