Editor tool for WordPress.
npm install @teft/editor-tools``bash`
npm install @teft/editor-tools
_Example:_
`jsx
import { PostSelector } from '@teft/editor-tools';
import { useState } from '@wordpress/element';
const [ postIds, setPostIds ] = useState( [] );
const [ visible, setVisible ] = useState( false );
{ visible && (
onSelect={ ( ids ) => setPostIds( ids ) }
onClose={ () => setVisible( false ) }
postTypes={ [ 'post', 'page' ] }
/>
) }
`
`jsx
import { QuerySidebarOptions, queryServerAttributes } from '@teft/editor-tools';
function Edit( { attributes, setAttributes } ) {
return (
<>
setAttributes={ setAttributes }
/>
attributes={ queryServerAttributes( attributes ) }
/>
>
);
}
``