make the element scrollable from keyboard

pull/3932/head
Divyansh Singh 1 year ago
parent b9ef224755
commit 68c87d0930

@ -287,6 +287,13 @@ export const createMarkdownRenderer = async (
md.use(mathPlugin.default ?? mathPlugin, {
...(typeof options.math === 'boolean' ? {} : options.math)
})
const orig = md.renderer.rules.math_block!
md.renderer.rules.math_block = (tokens, idx, options, env, self) => {
return orig(tokens, idx, options, env, self).replace(
/^<mjx-container /,
'<mjx-container tabindex="0" '
)
}
} catch (error) {
throw new Error(
'You need to install `markdown-it-mathjax3` to use math support.'

Loading…
Cancel
Save