Closed grogou closed 1 year ago
You may be able to import the component from Gutenberg, otherwise it will need to be custom.
Yes I am trying to import and it is importing, but there is issue with canEdit
it is false
in frontend. Is it related to ISO editor config? I have copied settings from Blocks Everywhere
plugin.
Thank you!
<PostVisibilityCheck
render={ ( { canEdit } ) => (
<PanelRow
ref={ setPopoverAnchor }
className="edit-post-post-visibility"
>
<span>{ __( 'Visibility' ) }</span>
{ ! canEdit && (
<span>
<PostVisibilityLabel />
</span>
) }
{ canEdit && (
<Dropdown
contentClassName="edit-post-post-visibility__dialog"
popoverProps={ popoverProps }
focusOnMount
renderToggle={ ( { isOpen, onToggle } ) => (
<PostVisibilityToggle
isOpen={ isOpen }
onClick={ onToggle }
/>
) }
renderContent={ ( { onClose } ) => (
<PostVisibilityForm onClose={ onClose } />
) }
/>
) }
</PanelRow>
) }
/>
I really couldn't say what you need to do to get the component working and it's quite a bit outside the scope of this repo. It should be noted that the ISO editor does not use @wordpress/edit-post
, so anything that depends on it will need a lot of work.
And one more question, is Gutenberg use ISO editor?
No, it is the other way round - this uses Gutenberg.
Thank you)
I want to have Summary tab like in Post editor. Am I need to do custom implementation or there is a way to show? Thank you!