import { registerBlockType } from '@wordpress/blocks'; import { RichText } from '@wordpress/editor'; import './editor.scss'; const attributes = { notes: { type: 'string', }, }; const edit = ( { attributes: { notes }, className, isSelected, setAttributes } ) => (
{ ! isSelected && ( 📔 Editor's Notes: hidden from rendered page ) } setAttributes( { notes: newNotes } ) } />
); const save = () => null; registerBlockType( 'a8c/editor-notes', { title: "Editor's Notes", icon: 'welcome-write-blog', category: 'a8c', attributes, edit, save, } );