I am trying to add a new component panel under document tab, like categories, featured image etc.
Click on Blocks, then scroll down the list until you see Widgets. Select one of the three widgets that you wish to add. Note that if you want to use a widget type that is not available, you can still add them through the Administrator Menu – Widgets section.
Scroll down to the “Ultimate Addons Block” section and look for the “Table of Contents” block. Click on it to add it to your post or page. The block will automatically be added into your editor, and from here, you can start editing and building the table of contents block. That's it!
They've added the PluginDocumentSettingPanel SlotFill now.
const { registerPlugin } = wp.plugins
const { PluginDocumentSettingPanel } = wp.editPost
const PluginDocumentSettingPanelDemo = () => (
<PluginDocumentSettingPanel
name="custom-panel"
title="Custom Panel"
className="custom-panel"
>
Custom Panel Contents
</PluginDocumentSettingPanel>
)
registerPlugin('plugin-document-setting-panel-demo', {
render: PluginDocumentSettingPanelDemo
})
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With