Does the Rich Text Editor (with Markdown) support math equations?

Hi everyone,

I’m using the Rich Text Editor (with Markdown) in WeWeb and I’m wondering if it currently supports rendering math equations using LaTeX or MathJax/Katex syntax or any other syntax?

I’ve tried a few standard formats, including:

  • Inline math: $a^2 + b^2 = c^2$
  • Block math:
$
E = mc^2
$
  • Bracketed blocks:
\[
\frac{1}{2}mv^2
\]
  • Markdown code blocks with math:
```math
\frac{1}{2}mv^2

But none of them seem to render as equations, just plain text. Does the WeWeb Rich Text Editor currently support math rendering?

Hi Erik :waving_hand:,

I don’t think our rich text editor has this functionality (at least without forking it and modifying it extensively)

Here’s how some other members have tried solving this:
(they embed Latex directly)

Let me know if these help.

2 Likes

Hi, you could use the Mathematics extension | Tiptap Editor Docs but as Augustin mentioned, it would require the fork of the current editor.

1 Like

@Broberto @Agustin_Carozo Thanks to both :slight_smile: Would be great to get this on the roadmap, so it can be suppoorted in the rich text field in the future.

Where can I submit feature requests again? :sweat_smile:

feedback.weweb.io - but there is very low chance that it’ll get implemented within a reasonable time.

1 Like

Hi @Broberto @Agustin_Carozo

justed wanted to let you know that this is being implementend by Weweb as we speak and it should be released soon! :slight_smile:

Not sure which approach they are going for, but yeah good news anyways!

3 Likes

Awesome!

Confused Rooster Teeth GIF by Achievement Hunter

Good news everyone!

The Rich text editor now supports writing and rendering math expressions!

Users of your apps can now write formulas, calculations, and other mathematical notation:

*Releasing Aug 27th

Read the docs

Animated GIF

1 Like

Hi Agustin! I am trying to render maths equations (LaTeX) but when I click either the inlineMath option or blockMath in the toolbar I’m getting this console error. It’s interesting because the ‘deprecated’ rich text editor block displays the latex fine. User error or bug? :slight_smile:

Hey Jamie, this looks like a bug :confused:

Would you mind submitting a bug ticket here if you haven’t already?

2 Likes

Hey @Jamier693 :waving_hand:

The team just pushed a bug fix to production. The math features should be back up and running :slight_smile:

How can we disable this functionality? We use the rich text editor in a chat pane. When users try to mention more than one currency value it converts all text to a failed equation. “$6,500 or $3,700” results in this:

Hi Derek :waving_hand:

This looks likes a bug. Would you mind creating a bug ticket here?

I’d do it myself to save you some time but that way you’ll be notified when the fix is live :slight_smile:

I’ll create a ticket, however it is not a bug per se. According to LaTex docs, the two dollar signs triggers the functionality, however we need a way to disable it.

1 Like

Yeah, that makes sense. It’s technically expected behavior from LaTeX, but we could probably tweak our parsing so $$ only triggers when it’s actually part of a valid math expression.

Feel free to report is as feedback instead if it’s not a blocker for you. Either way, the team will take a look and find a solution but, if it’s a blocker, you should create a bug ticket and let us know so we can prioritize accordingly: