You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Hydro/packages/ui-default/components/katex/katex.page.js

14 lines
435 B
JavaScript

import { AutoloadPage } from 'vj/misc/Page';
const katexPage = new AutoloadPage('katexPage', () => {
import('katex/contrib/auto-render/auto-render').then(({ default: katex }) => {
function runKatex($containers) {
$containers.get().forEach((container) => katex(container));
}
runKatex($('.typo'));
$(document).on('vjContentNew', (e) => runKatex($(e.target).find('.typo')));
});
});
export default katexPage;