BlockNote icon indicating copy to clipboard operation
BlockNote copied to clipboard

Custom Block for Katex

Open stevenoh2003 opened this issue 1 year ago • 7 comments

Is your feature request related to a problem? Please describe. Right now, the default blocks provide useful support for text editing. However, there is a limitation in the editor's versatility: it lacks a dedicated block for inputting equations. This makes it difficult for users who need to include mathematical expressions and equations in their documents, similar to the functionality available in Notion. The current options do not support a seamless way to input and display LaTeX equations within the text editor, which is a significant drawback for users in academia, research, or any field that requires mathematical documentation. Screenshot 2024-05-14 at 14 48 22

Describe the solution you'd like I would like to have a custom block that allows users to input equations directly into the editor. This block should support LaTeX formatting so that users can type LaTeX code and have it rendered properly as mathematical notation within the document. Ideally, this block would function similarly to Notion's equation input feature, providing a user-friendly interface for entering and editing equations.

Describe alternatives you've considered Building a block that directly converts the text input into LaTeX code. This approach would allow users to type their equations as plain text and have it automatically converted to LaTeX for rendering. Implementing a text field that appears from a dropdown menu in the block selection options. Users could input LaTeX code into this field, and it would render the equation in the current editing location.

Additional context Adding this feature would greatly enhance the usability of the text editor for users who need to include complex mathematical expressions in their documents. It would make the editor more versatile and user-friendly, especially for those in scientific and technical fields.

stevenoh2003 avatar May 14 '24 05:05 stevenoh2003

This would be great! It should be possible with Custom Inline Content (https://www.blocknotejs.org/docs/custom-schemas/custom-inline-content), although it might need custom prosemirror handling, not sure.

It's not on our roadmap atm, but I'd definitely welcome a PR for this!

/bounty 100

YousefED avatar May 28 '24 12:05 YousefED

💎 $100 bounty • BlockNote

Steps to solve:

  1. Start working: Comment /attempt #741 with your implementation plan
  2. Submit work: Create a pull request including /claim #741 in the PR body to claim the bounty
  3. Receive payment: 100% of the bounty is received 2-5 days post-reward. Make sure you are eligible for payouts

❗ Important guidelines:

  • To claim a bounty, you need to provide a short demo video of your changes in your pull request
  • If anything is unclear, ask for clarification before starting as this will help avoid potential rework
  • Low quality AI PRs will not receive review and will be closed
  • Do not ask to be assigned unless you've contributed before

Thank you for contributing to TypeCellOS/BlockNote!

Attempt Started (UTC) Solution Actions
🟢 @jkcs Jul 19, 2024, 06:51:23 AM #953 Reward
🟢 @Recxsmacx Feb 24, 2025, 06:50:35 AM WIP
🟢 @Kartikayy007 May 25, 2025, 08:29:14 PM WIP
🟢 @b4s36t4 May 28, 2024, 12:40:09 PM WIP

algora-pbc[bot] avatar May 28 '24 12:05 algora-pbc[bot]

/attempt #741

Algora profile Completed bounties Tech Active attempts Options
@b4s36t4 3 bounties from 2 projects
TypeScript, JavaScript,
Rust
Cancel attempt

b4s36t4 avatar May 28 '24 12:05 b4s36t4

Maybe I can give this a try?

jkcs avatar Jun 06 '24 10:06 jkcs

https://github.com/TypeCellOS/BlockNote/assets/55526740/0dbf0c31-a580-4582-aaa4-b169532ae7a9

I customized Custom Block using sample of Formatting Toolbar.

Navong avatar Jun 06 '24 13:06 Navong

💡 @jkcs submitted a pull request that claims the bounty. You can visit your bounty board to reward.

algora-pbc[bot] avatar Jul 19 '24 06:07 algora-pbc[bot]

/attempt #741

Options

Recxsmacx avatar Feb 24 '25 06:02 Recxsmacx

is still open?

breno-ribeiro706 avatar Apr 23 '25 10:04 breno-ribeiro706

/attempt #741

Kartikayy007 avatar May 25 '25 20:05 Kartikayy007