18 lines
601 B
TypeScript
18 lines
601 B
TypeScript
import { generateBlockId, IBlockData } from "@schlechtenburg/core";
|
|
import { getDefaultData as getDefaultLayoutData, ILayoutData, name as layoutName } from "@schlechtenburg/layout";
|
|
import { getDefaultData as getDefaultHeadingData, name as headingName } from "@schlechtenburg/heading";
|
|
|
|
export const getNewPageBlock: () => IBlockData<ILayoutData> = () => ({
|
|
id: generateBlockId(),
|
|
name: layoutName,
|
|
data: getDefaultLayoutData({
|
|
children: [
|
|
{
|
|
id: generateBlockId(),
|
|
name: headingName,
|
|
data: getDefaultHeadingData({ value: 'New page' }),
|
|
}
|
|
],
|
|
}),
|
|
});
|