Barocss Math for WordPress — development preview
This is a local, installable Gutenberg block prototype. Distribution and commercial license terms are not finalized. It is separate from the published MIT math-editor core and does not publish anything to WordPress.org or npm.
After installing workspace dependencies with pnpm install, run from the repository
root (Node.js and the zip command are required):
pnpm --dir packages/math-editor build
pnpm --dir packages/math-editor-integrations build
pnpm --dir apps/math-integrations build:wordpress
The output is output/wordpress/barocss-math-0.1.0.zip, using the version in
wordpress/block.json. The expanded plugin is in output/wordpress/barocss-math/,
and output/wordpress/build-report.json records the bundle inputs. Rebuild after
changing the core, adapter, or WordPress assets; this command creates local files
and does not deploy or publish the plugin.
In a WordPress test site, open Plugins → Add New Plugin → Upload Plugin, upload the ZIP, and activate it. In the block editor, insert Math (or 수식 in a Korean admin). Click the formula to edit, then Apply or Cancel. The plugin supplies dedicated blocks; paragraph inline math is not part of this preview.
The ZIP contains built editor/frontend JavaScript, CSS, local KaTeX fonts, a PHP registration file, block metadata, and notices. It requires no npm install on the WordPress server. WordPress supplies React and its own block-editor packages. The plugin header declares WordPress 6.6 (including its JSX runtime) and PHP 7.4 as loader requirements. These are not a verified compatibility range. WordPress 7.1 with PHP 8.3 passed a local WordPress Playground check of its iframe canvas, author-role saves, reload/re-edit, host Undo/Redo, and frontend KaTeX rendering. The generated plugin directory was mounted and activated for that check; the dashboard ZIP-upload wizard was not exercised. See the integration VALIDATION record.
The build gives editor/frontend JavaScript and CSS a shared content-derived cache version. CSS also refers to local fonts by hashed filenames, so changing styling, fonts, or frontend rendering invalidates the corresponding cached asset URLs.
The mathData attribute contains a UTF-8/base64 versioned payload wrapping
{ latex, mathDocument, fontSize }. WordPress block comments persist that string;
saved HTML preserves it as data-math-data. Encoding keeps
WordPress's HTML sanitization from changing formula text inside model attributes;
it is not encryption or a substitute for validating data. Post content saves a
deterministic escaped LaTeX fallback. Frontend JavaScript enhances it with KaTeX
using trust: false; live editor controls and renderer markup are never saved.
The Gutenberg adapter guide
documents the codec and save contract. Do not replace this envelope with raw model
strings in block comment attributes or save the live editing element's innerHTML.
Uninstalling the plugin leaves the post's original block data and LaTeX fallback in place. Reactivating the plugin restores editing. It does not delete post data.
The current build is for local evaluation. WordPress's licensing requirements and any future Barocss commercial terms must be settled before customer distribution; this preview does not change existing licenses or provide a WordPress.org listing.