Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

simple latex block #818

Closed
wants to merge 14 commits into from
Prev Previous commit
Next Next commit
fix MR error
  • Loading branch information
jkcs committed Jun 7, 2024
commit e586e0791a64b6a77bac197e361dbab35180d8b1
2 changes: 1 addition & 1 deletion examples/05-custom-schema/01-alert-block/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export default function App() {
},
{
type: "alert",
content: "This is an example \n alert",
content: "This is an example alert",
},
{
type: "paragraph",
Expand Down
33 changes: 0 additions & 33 deletions packages/core/src/api/testUtil/cases/customBlocks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,32 +76,12 @@ const SimpleCustomParagraph = createBlockSpec(
}
);

const CustomBlock = createBlockSpec(
{
type: "customBlock",
propSchema: {},
content: "inline",
},
{
render: () => {
const dom = document.createElement("div");
dom.className = "custom-block";

return {
dom: dom,
contentDOM: dom,
};
},
}
);

const schema = BlockNoteSchema.create({
blockSpecs: {
...defaultBlockSpecs,
simpleImage: SimpleImage,
customParagraph: CustomParagraph,
simpleCustomParagraph: SimpleCustomParagraph,
customBlock: CustomBlock
},
});

Expand Down Expand Up @@ -358,18 +338,5 @@ export const customBlocksTestCases: EditorTestCases<
},
],
},
{
name: "customBlock/basic",
blocks: [
{
type: "customBlock",
content: "Custom customBlock",
},
{
type: "customBlock",
content: "Custom customBlock \nwith \nline breaks",
},
],
},
],
};
Loading