Compare commits
No commits in common. "6c3efd9b5da90405a258016c054c730853b046d1" and "5b1a63a69c8ef7753baeaaefb6a685295926a6bf" have entirely different histories.
6c3efd9b5d
...
5b1a63a69c
|
@ -1,5 +1,5 @@
|
||||||
import { InterfaceSkeleton, FullscreenMode, ComplementaryArea } from '@wordpress/interface';
|
import { InterfaceSkeleton, FullscreenMode, ComplementaryArea } from '@wordpress/interface';
|
||||||
import { BlockBreadcrumb, BlockCanvas, __experimentalLibrary as BlockLibrary } from '@wordpress/block-editor';
|
import { BlockBreadcrumb, BlockCanvas, store as blockEditorStore } from '@wordpress/block-editor';
|
||||||
|
|
||||||
import Header from './Header';
|
import Header from './Header';
|
||||||
import Sidebar from './Sidebar';
|
import Sidebar from './Sidebar';
|
||||||
|
@ -28,7 +28,6 @@ export default function BlockEditor() {
|
||||||
header={ <Header /> }
|
header={ <Header /> }
|
||||||
content={ <BlockCanvas height="100%" styles={styles} /> }
|
content={ <BlockCanvas height="100%" styles={styles} /> }
|
||||||
sidebar={ <ComplementaryArea.Slot scope={ scope } /> }
|
sidebar={ <ComplementaryArea.Slot scope={ scope } /> }
|
||||||
secondarySidebar={ <BlockLibrary /> }
|
|
||||||
footer={ <BlockBreadcrumb /> }
|
footer={ <BlockBreadcrumb /> }
|
||||||
/>
|
/>
|
||||||
</>
|
</>
|
||||||
|
|
|
@ -6,15 +6,54 @@ import BlockEditor from './BlockEditor';
|
||||||
import './editor.scss';
|
import './editor.scss';
|
||||||
|
|
||||||
export default function Editor() {
|
export default function Editor() {
|
||||||
const [ blocks, updateBlocks ] = useState([]);
|
const [ blocks, updateBlocks ] = useState();
|
||||||
|
|
||||||
return (
|
return <BlockEditorProvider
|
||||||
<BlockEditorProvider
|
|
||||||
value={ blocks }
|
value={ blocks }
|
||||||
onInput={ updateBlocks }
|
onInput={ updateBlocks }
|
||||||
onChange={ updateBlocks }
|
onChange={ updateBlocks }
|
||||||
|
settings={ {
|
||||||
|
__experimentalFeatures: {
|
||||||
|
typography: {
|
||||||
|
defaultFontSizes: true,
|
||||||
|
dropCap: true,
|
||||||
|
fontSizes: {
|
||||||
|
default: [
|
||||||
|
{
|
||||||
|
name: "Small",
|
||||||
|
slug: "small",
|
||||||
|
size: "13px",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Medium",
|
||||||
|
slug: "medium",
|
||||||
|
size: "20px",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Large",
|
||||||
|
slug: "large",
|
||||||
|
size: "36px",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Extra Large",
|
||||||
|
slug: "x-large",
|
||||||
|
size: "42px",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
customFontSize: true,
|
||||||
|
fontStyle: true,
|
||||||
|
fontWeight: true,
|
||||||
|
letterSpacing: true,
|
||||||
|
textAlign: true,
|
||||||
|
textColumns: false,
|
||||||
|
textDecoration: true,
|
||||||
|
textTransform: true,
|
||||||
|
writingMode: false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
} }
|
||||||
>
|
>
|
||||||
<BlockEditor/>
|
<BlockEditor/>
|
||||||
</BlockEditorProvider>
|
</BlockEditorProvider>;
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
import { useSelect } from '@wordpress/data';
|
||||||
|
import { useEffect } from '@wordpress/element';
|
||||||
import { ComplementaryArea } from '@wordpress/interface';
|
import { ComplementaryArea } from '@wordpress/interface';
|
||||||
import { Panel } from '@wordpress/components';
|
import { Panel } from '@wordpress/components';
|
||||||
import { BlockInspector } from '@wordpress/block-editor';
|
import { BlockInspector } from '@wordpress/block-editor';
|
||||||
|
|
|
@ -2,10 +2,10 @@ import { createRoot, StrictMode } from '@wordpress/element';
|
||||||
import { registerCoreBlocks } from '@wordpress/block-library';
|
import { registerCoreBlocks } from '@wordpress/block-library';
|
||||||
import '@wordpress/format-library';
|
import '@wordpress/format-library';
|
||||||
|
|
||||||
import Editor from './Editor';
|
|
||||||
|
|
||||||
registerCoreBlocks();
|
registerCoreBlocks();
|
||||||
|
|
||||||
|
import Editor from './Editor';
|
||||||
|
|
||||||
const root = createRoot(document.querySelector('main'));
|
const root = createRoot(document.querySelector('main'));
|
||||||
root.render(
|
root.render(
|
||||||
<StrictMode>
|
<StrictMode>
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
14
package.json
14
package.json
|
@ -11,14 +11,14 @@
|
||||||
"preview": "vite preview"
|
"preview": "vite preview"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@wordpress/block-editor": "^13.0.0",
|
"@wordpress/block-editor": "13.0.0",
|
||||||
"@wordpress/block-library": "^9.0.0",
|
"@wordpress/block-library": "9.0.0",
|
||||||
"@wordpress/components": "^28.0.0",
|
"@wordpress/components": "28.0.0",
|
||||||
"@wordpress/data": "^10.0.0",
|
"@wordpress/data": "^10.0.0",
|
||||||
"@wordpress/element": "^6.0.0",
|
"@wordpress/element": "6.0.0",
|
||||||
"@wordpress/format-library": "^5.0.0",
|
"@wordpress/format-library": "5.0.0",
|
||||||
"@wordpress/icons": "^10.0.0",
|
"@wordpress/icons": "10.0.0",
|
||||||
"@wordpress/interface": "^6.0.0"
|
"@wordpress/interface": "6.0.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@vitejs/plugin-react": "^4.3.1",
|
"@vitejs/plugin-react": "^4.3.1",
|
||||||
|
|
Loading…
Reference in New Issue