Skip to content

Commit

Permalink
fix: more fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
EETagent committed Aug 31, 2024
1 parent 5540c93 commit 2472c14
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
6 changes: 5 additions & 1 deletion lib/editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,12 @@ import { withDraggables } from '@/components/plate-ui/with-draggables'
import type { Value } from '@udecode/plate-common'
import { Prism } from './components/plate-ui/code-block-combobox'

export const createEditor = (initialValue?: Value, normalizeInitialValue?: boolean) =>
export const createEditor = (
initialValue?: Value,
normalizeInitialValue?: boolean
) =>
createPlateEditor({
shouldNormalizeEditor: normalizeInitialValue,
plugins: [
BlockquotePlugin,
CodeBlockPlugin.configure({
Expand Down
10 changes: 5 additions & 5 deletions lib/plate-contember.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@ const PlateEditorForContember = Component<Props & PlateEditorForContemberProps>(
return (
<PlateEditor
isContember={true}
value={
isJsonContent(contentField?.value)
? contentField?.value?.children
: undefined
}
// value={
// isJsonContent(contentField?.value)
// ? contentField?.value?.children
// : undefined
// }
onChange={(options) => handleEditorOnChange(options.value)}
shouldNormalizeEditor
additionalToolbarButtons={
Expand Down

0 comments on commit 2472c14

Please sign in to comment.