Skip to content

feat: Add custom KaTeX block for LaTeX equations #1719

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Kartikayy007
Copy link

KaTeX Equation Block for BlockNote

This PR implements a custom block for inputting and displaying LaTeX equations in BlockNote, as requested in issue #741.

\claim #741

Features

  • Dedicated block for LaTeX equation input with real-time preview
  • Display mode toggle to switch between inline and block equation display
  • Keyboard shortcut: Type $$ + space to create an equation block
  • Similar UX to Notion's equation input feature

Implementation Details

  • Created new KaTeXBlockContent component that handles equation input and rendering
  • Added the block to the default BlockNote blocks
  • Updated editor settings to include KaTeX configuration options
  • Added KaTeX CSS styling for proper equation rendering
  • Created an example in examples/katex-example to demonstrate functionality

Screenshots

[Screenshots would be added here in an actual PR]

Testing

  • Tested equation input and rendering with various LaTeX expressions
  • Verified shortcut for creating equation blocks
  • Tested display mode toggle functionality

Fixes #741

- Create new KaTeX block component for equation input and rendering
- Add LaTeX equation support with real-time preview
- Implement display mode toggle for inline vs. block equations
- Add keyboard shortcut (type $$ + space) to create equation blocks
- Include KaTeX styling for proper equation rendering
- Add example showcasing the KaTeX block functionality
Copy link

vercel bot commented May 25, 2025

@Kartikayy007 is attempting to deploy a commit to the TypeCell Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Custom Block for Katex
1 participant