Components
Plate editor plugin kit that adds static, read-only rendering of block and inline LaTeX equations for server-side and RSC content.

import { BaseMathKit } from "@/components/ui/math-base-kit";
import * as React from "react";
import { createStaticEditor, PlateStatic } from "platejs/static";
const value = [
{
type: "p",
children: [
{ text: "Mass–energy equivalence: " },
{
type: "inline_equation",
texExpression: "E = mc^2",
children: [{ text: "" }],
},
{ text: "." },
],
},
{
type: "equation",
texExpression: "\\int_{a}^{b} f(x) \\, dx = F(b) - F(a)",
children: [{ text: "" }],
},
];
export default function MathBaseKitDemo() {
const editor = createStaticEditor({
plugins: BaseMathKit,
value,
});
return (
<div className="mx-auto max-w-2xl p-8">
<PlateStatic editor={editor} />
</div>
);
}