diff --git a/packages/editor/src/editor/components/DefaultObject.tsx b/packages/editor/src/editor/components/DefaultObject.tsx
index 30babd0e..7c75cc8f 100644
--- a/packages/editor/src/editor/components/DefaultObject.tsx
+++ b/packages/editor/src/editor/components/DefaultObject.tsx
@@ -1,6 +1,6 @@
import type {PortableTextBlock, PortableTextChild} from '@sanity/types'
-export function DefaultObject(props: {
+export function DefaultBlockObject(props: {
value: PortableTextBlock | PortableTextChild
}) {
return (
@@ -9,3 +9,13 @@ export function DefaultObject(props: {
)
}
+
+export function DefaultInlineObject(props: {
+ value: PortableTextBlock | PortableTextChild
+}) {
+ return (
+
+ [{props.value._type}: {props.value._key}]
+
+ )
+}
diff --git a/packages/editor/src/editor/components/Element.tsx b/packages/editor/src/editor/components/Element.tsx
index 6391ff2b..52e27608 100644
--- a/packages/editor/src/editor/components/Element.tsx
+++ b/packages/editor/src/editor/components/Element.tsx
@@ -29,7 +29,7 @@ import type {
RenderListItemFunction,
RenderStyleFunction,
} from '../../types/editor'
-import {DefaultObject} from './DefaultObject'
+import {DefaultBlockObject, DefaultInlineObject} from './DefaultObject'
import {DraggableBlock} from './DraggableBlock'
const debug = debugWithName('components:Element')
@@ -137,7 +137,7 @@ export const Element: FunctionComponent = ({
{renderChild &&
renderChild({
annotations: EMPTY_ANNOTATIONS, // These inline objects currently doesn't support annotations. This is a limitation of the current PT spec/model.
- children: ,
+ children: ,
editorElementRef: inlineBlockObjectRef,
focused,
path: elmPath,
@@ -146,7 +146,7 @@ export const Element: FunctionComponent = ({
type: schemaType,
value: value as PortableTextChild,
})}
- {!renderChild && }
+ {!renderChild && }
)
@@ -280,7 +280,7 @@ export const Element: FunctionComponent = ({
if (renderBlock) {
const _props: Omit = Object.defineProperty(
{
- children: ,
+ children: ,
editorElementRef: blockRef,
focused,
path: blockPath,
@@ -310,7 +310,7 @@ export const Element: FunctionComponent = ({
{renderedBlockFromProps ? (
renderedBlockFromProps
) : (
-
+
)}